From b1cd802e4241aa81c12ba4ecccdb17404799ff03 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 4 Sep 2014 15:59:17 +0200 Subject: common: Change the CKA_X_PUBLIC_KEY_INFO constant to CKA_PUBLIC_KEY_INFO CKA_PUBLIC_KEY_INFO is defined in the PKCS#11 2.40 draft, so use that rather than defining our own. * Fixed up by Nikos Mavrogiannopoulos https://bugs.freedesktop.org/show_bug.cgi?id=83495 --- common/attrs.c | 2 +- common/constants.c | 2 +- common/pkcs11x.h | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/attrs.c b/common/attrs.c index 4a3d655..bbf2c58 100644 --- a/common/attrs.c +++ b/common/attrs.c @@ -669,7 +669,7 @@ attribute_is_sensitive (const CK_ATTRIBUTE *attr, X (CKA_X_PEER) X (CKA_X_DISTRUSTED) X (CKA_X_CRITICAL) - X (CKA_X_PUBLIC_KEY_INFO) + X (CKA_PUBLIC_KEY_INFO) X (CKA_NSS_URL) X (CKA_NSS_EMAIL) X (CKA_NSS_SMIME_INFO) diff --git a/common/constants.c b/common/constants.c index a2427c9..218ce93 100644 --- a/common/constants.c +++ b/common/constants.c @@ -98,6 +98,7 @@ const p11_constant p11_constant_types[] = { CT (CKA_EXPONENT_1, "exponent-1") CT (CKA_EXPONENT_2, "exponent-2") CT (CKA_COEFFICIENT, "coefficient") + CT2 (CKA_PUBLIC_KEY_INFO, "public-key-info", "x-public-key-info") CT (CKA_PRIME, "prime") CT (CKA_SUBPRIME, "subprime") CT (CKA_BASE, "base") @@ -176,7 +177,6 @@ const p11_constant p11_constant_types[] = { CT (CKA_X_PEER, "x-peer") CT (CKA_X_DISTRUSTED, "x-distrusted") CT (CKA_X_CRITICAL, "x-critical") - CT (CKA_X_PUBLIC_KEY_INFO, "x-public-key-info") { CKA_INVALID }, }; diff --git a/common/pkcs11x.h b/common/pkcs11x.h index d1c52c3..ea0e303 100644 --- a/common/pkcs11x.h +++ b/common/pkcs11x.h @@ -146,7 +146,11 @@ typedef CK_ULONG CK_X_ASSERTION_TYPE; #define CKO_X_CERTIFICATE_EXTENSION (CKO_X_VENDOR + 200) #define CKA_X_DISTRUSTED (CKA_X_VENDOR + 100) #define CKA_X_CRITICAL (CKA_X_VENDOR + 101) -#define CKA_X_PUBLIC_KEY_INFO (CKA_X_VENDOR + 102) + +/* From the 2.40 draft */ +#ifndef CKA_PUBLIC_KEY_INFO +#define CKA_PUBLIC_KEY_INFO 0x00000129UL +#endif #endif /* CRYPTOKI_X_VENDOR_DEFINED */ -- cgit v1.1