summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorStef Walter <stefw@redhat.com>2014-09-04 15:59:17 +0200
committerStef Walter <stef@thewalter.net>2014-09-10 08:03:11 +0200
commitb1cd802e4241aa81c12ba4ecccdb17404799ff03 (patch)
treec90732b3603d16c5ea0eb3c8541a474646b9da8c /common
parent9ba2165ef75c63960ce95c9b1b085a0a630cfb14 (diff)
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 <nmav@redhat.com> https://bugs.freedesktop.org/show_bug.cgi?id=83495
Diffstat (limited to 'common')
-rw-r--r--common/attrs.c2
-rw-r--r--common/constants.c2
-rw-r--r--common/pkcs11x.h6
3 files changed, 7 insertions, 3 deletions
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 */