diff options
author | Stef Walter <stefw@collabora.co.uk> | 2011-06-07 20:20:17 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-06-07 20:21:13 +0200 |
commit | 18cb0a89d3eb08847fc3ecc8cd9438bb88c7b4fa (patch) | |
tree | 1c5362536fc4df64222c6b837d9e1bae5d958456 /lib/gnutls_pubkey.c | |
parent | 91b0db8967863694dee39d9722895e153ca8d580 (diff) | |
download | gnutls-18cb0a89d3eb08847fc3ecc8cd9438bb88c7b4fa.tar.gz |
The attached patch ports gnutls to p11-kit.
p11-kit is added as a dependency. p11-kit itself has no dependencies outside of basic libc stuff. The source code for p11-kit is available both in git and tarball form. [3]
If the gnutls dependency on p11-kit is disabled (via a configure option) then the PKCS#11 support is disabled. This is useful in bare bones embedded systems or places where very minimal dependencies are limited.
Diffstat (limited to 'lib/gnutls_pubkey.c')
-rw-r--r-- | lib/gnutls_pubkey.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/gnutls_pubkey.c b/lib/gnutls_pubkey.c index 6352bbbeed..3199492ac2 100644 --- a/lib/gnutls_pubkey.c +++ b/lib/gnutls_pubkey.c @@ -21,7 +21,6 @@ */ #include <gnutls_int.h> -#include <pakchois/pakchois.h> #include <gnutls/pkcs11.h> #include <stdio.h> #include <stdbool.h> @@ -34,7 +33,6 @@ #include <gnutls_pk.h> #include <x509_int.h> #include <openpgp/openpgp_int.h> -#include <pkcs11_int.h> #include <gnutls_num.h> #include <x509/common.h> #include <x509_b64.h> @@ -252,6 +250,7 @@ gnutls_pubkey_get_preferred_hash_algorithm (gnutls_pubkey_t key, return ret; } +#ifdef ENABLE_PKCS11 /** * gnutls_pubkey_import_pkcs11: Imports a public key from a pkcs11 key @@ -305,6 +304,8 @@ gnutls_pubkey_import_pkcs11 (gnutls_pubkey_t key, return 0; } +#endif /* ENABLE_PKCS11 */ + #ifdef ENABLE_OPENPGP /** * gnutls_pubkey_import_openpgp: Imports a public key from an openpgp key @@ -919,6 +920,8 @@ gnutls_pubkey_set_key_usage (gnutls_pubkey_t key, unsigned int usage) return 0; } +#ifdef ENABLE_PKCS11 + /** * gnutls_pubkey_import_pkcs11_url: * @key: A key of type #gnutls_pubkey_t @@ -968,6 +971,8 @@ cleanup: return ret; } +#endif /* ENABLE_PKCS11 */ + /** * gnutls_pubkey_import_rsa_raw: * @key: Is a structure will hold the parameters |