diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-06-15 20:52:11 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-06-15 21:40:37 +0200 |
commit | 2e6fbad4423350f2357f05266e6a6f3dffcc27cf (patch) | |
tree | a17f81f08a10d65c77044b6b8178c67de95c09b1 /lib | |
parent | 7f0fcc3395a01e5253dd251b300fa298283aabb6 (diff) | |
download | gnutls-2e6fbad4423350f2357f05266e6a6f3dffcc27cf.tar.gz |
define ck_bool_t to be compatible with PKCS #11 bool type.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gnutls_privkey.c | 1 | ||||
-rw-r--r-- | lib/gnutls_pubkey.c | 1 | ||||
-rw-r--r-- | lib/pkcs11.c | 2 | ||||
-rw-r--r-- | lib/pkcs11_int.h | 2 | ||||
-rw-r--r-- | lib/pkcs11_privkey.c | 1 | ||||
-rw-r--r-- | lib/pkcs11_secret.c | 2 | ||||
-rw-r--r-- | lib/pkcs11_write.c | 4 |
7 files changed, 5 insertions, 8 deletions
diff --git a/lib/gnutls_privkey.c b/lib/gnutls_privkey.c index f701ec426b..45731d32cf 100644 --- a/lib/gnutls_privkey.c +++ b/lib/gnutls_privkey.c @@ -23,7 +23,6 @@ #include <gnutls_int.h> #include <gnutls/pkcs11.h> #include <stdio.h> -#include <stdbool.h> #include <string.h> #include <gnutls_errors.h> #include <gnutls_datum.h> diff --git a/lib/gnutls_pubkey.c b/lib/gnutls_pubkey.c index 3199492ac2..2a09808d72 100644 --- a/lib/gnutls_pubkey.c +++ b/lib/gnutls_pubkey.c @@ -23,7 +23,6 @@ #include <gnutls_int.h> #include <gnutls/pkcs11.h> #include <stdio.h> -#include <stdbool.h> #include <string.h> #include <gnutls_errors.h> #include <gnutls_datum.h> diff --git a/lib/pkcs11.c b/lib/pkcs11.c index 7b3e1063ae..b07cac9477 100644 --- a/lib/pkcs11.c +++ b/lib/pkcs11.c @@ -1054,7 +1054,7 @@ pkcs11_obj_import_pubkey (struct ck_function_list *module, opaque tmp1[2048]; opaque tmp2[2048]; int ret; - unsigned int tval; + ck_bool_t tval; a[0].type = CKA_KEY_TYPE; a[0].value = &key_type; diff --git a/lib/pkcs11_int.h b/lib/pkcs11_int.h index 70df3bac03..7ff7869c1e 100644 --- a/lib/pkcs11_int.h +++ b/lib/pkcs11_int.h @@ -11,8 +11,8 @@ #define PKCS11_ID_SIZE 128 #define PKCS11_LABEL_SIZE 128 -#define P11_KIT_API_SUBJECT_TO_CHANGE 1 #include <p11-kit/uri.h> +typedef unsigned char ck_bool_t; struct token_info { diff --git a/lib/pkcs11_privkey.c b/lib/pkcs11_privkey.c index 0485c9a243..a6ed247142 100644 --- a/lib/pkcs11_privkey.c +++ b/lib/pkcs11_privkey.c @@ -23,7 +23,6 @@ #include <gnutls_int.h> #include <gnutls/pkcs11.h> #include <stdio.h> -#include <stdbool.h> #include <string.h> #include <gnutls_errors.h> #include <gnutls_datum.h> diff --git a/lib/pkcs11_secret.c b/lib/pkcs11_secret.c index 6ae355fca9..aab723ffce 100644 --- a/lib/pkcs11_secret.c +++ b/lib/pkcs11_secret.c @@ -58,7 +58,7 @@ gnutls_pkcs11_copy_secret_key (const char *token_url, gnutls_datum_t * key, ck_object_class_t class = CKO_SECRET_KEY; ck_object_handle_t obj; ck_key_type_t keytype = CKK_GENERIC_SECRET; - unsigned int tval = 1; + ck_bool_t tval = 1; int a_val; opaque id[16]; diff --git a/lib/pkcs11_write.c b/lib/pkcs11_write.c index bc20b725cd..aeca5a5904 100644 --- a/lib/pkcs11_write.c +++ b/lib/pkcs11_write.c @@ -58,7 +58,7 @@ gnutls_pkcs11_copy_x509_crt (const char *token_url, ck_object_class_t class = CKO_CERTIFICATE; ck_certificate_type_t type = CKC_X_509; ck_object_handle_t obj; - unsigned int tval = 1; + ck_bool_t tval = 1; int a_val; ret = pkcs11_url_to_info (token_url, &info); @@ -199,7 +199,7 @@ gnutls_pkcs11_copy_x509_privkey (const char *token_url, ck_object_class_t class = CKO_PRIVATE_KEY; ck_object_handle_t obj; ck_key_type_t type; - unsigned int tval = 1; + ck_bool_t tval = 1; int a_val; gnutls_pk_algorithm_t pk; gnutls_datum_t p, q, g, y, x; |