From: Nikos Mavrogiannopoulos Date: Wed, 15 Jun 2011 18:52:11 +0000 (+0200) Subject: define ck_bool_t to be compatible with PKCS #11 bool type. X-Git-Tag: gnutls_2_99_3~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e6fbad4423350f2357f05266e6a6f3dffcc27cf;p=thirdparty%2Fgnutls.git define ck_bool_t to be compatible with PKCS #11 bool type. --- 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 #include #include -#include #include #include #include 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 #include #include -#include #include #include #include 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 +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 #include #include -#include #include #include #include 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;