]> granicus.if.org Git - p11-kit/commitdiff
common: Change the CKA_X_PUBLIC_KEY_INFO constant to CKA_PUBLIC_KEY_INFO
authorStef Walter <stefw@redhat.com>
Thu, 4 Sep 2014 13:59:17 +0000 (15:59 +0200)
committerStef Walter <stef@thewalter.net>
Wed, 10 Sep 2014 06:03:11 +0000 (08:03 +0200)
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

common/attrs.c
common/constants.c
common/pkcs11x.h
trust/builder.c
trust/enumerate.c
trust/list.c
trust/parser.c
trust/test-builder.c
trust/test-enumerate.c
trust/test-openssl.c
trust/test-parser.c

index 4a3d655748865a3ed1d30161cb65d0fb2dc1727d..bbf2c581bda61a34da1eff37d34c7b0b294bece0 100644 (file)
@@ -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)
index a2427c91f7178a5b1b3db6a5967cd498c615e5d3..218ce93ac39d25ab7cf5c8ecccb9e3ade48082aa 100644 (file)
@@ -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 },
 };
 
index d1c52c3f08790cffe7a2b240e4faa7ff8f6ccff7..ea0e3039cc504293de925a2f854f819240137e21 100644 (file)
@@ -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 */
 
index 5f766084f82b3a8226b29f1d6201e08502702cd4..000c723d56a3088df377e3fdb64efcbd045b28a8 100644 (file)
@@ -120,14 +120,14 @@ lookup_extension (p11_builder *builder,
        node_asn *node;
 
        CK_ATTRIBUTE match[] = {
-               { CKA_X_PUBLIC_KEY_INFO, },
+               { CKA_PUBLIC_KEY_INFO, },
                { CKA_OBJECT_ID, (void *)oid, p11_oid_length (oid) },
                { CKA_CLASS, &klass, sizeof (klass) },
                { CKA_INVALID },
        };
 
        if (public_key == NULL || public_key->type == CKA_INVALID)
-               public_key = p11_attrs_find_valid (cert, CKA_X_PUBLIC_KEY_INFO);
+               public_key = p11_attrs_find_valid (cert, CKA_PUBLIC_KEY_INFO);
 
        /* Look for a stapled certificate extension */
        if (public_key != NULL) {
@@ -651,7 +651,7 @@ certificate_value_attrs (CK_ATTRIBUTE *attrs,
                end_date.ulValueLen = 0;
 
        if (calc_element (node, der, der_len, "tbsCertificate.subjectPublicKeyInfo", public_key))
-               public_key->type = CKA_X_PUBLIC_KEY_INFO;
+               public_key->type = CKA_PUBLIC_KEY_INFO;
        else
                public_key->type = CKA_INVALID;
        calc_element (node, der, der_len, "tbsCertificate.issuer.rdnSequence", &issuer);
@@ -783,7 +783,7 @@ const static builder_schema certificate_schema = {
          { CKA_HASH_OF_SUBJECT_PUBLIC_KEY, CREATE },
          { CKA_HASH_OF_ISSUER_PUBLIC_KEY, CREATE },
          { CKA_JAVA_MIDP_SECURITY_DOMAIN, CREATE, type_ulong },
-         { CKA_X_PUBLIC_KEY_INFO, WANT, type_der_key },
+         { CKA_PUBLIC_KEY_INFO, WANT, type_der_key },
          { CKA_INVALID },
        }, certificate_populate, certificate_validate,
 };
@@ -823,7 +823,7 @@ const static builder_schema extension_schema = {
        NORMAL_BUILD,
        { COMMON_ATTRS,
          { CKA_VALUE, REQUIRE | CREATE, type_der_ext },
-         { CKA_X_PUBLIC_KEY_INFO, REQUIRE | CREATE, type_der_key },
+         { CKA_PUBLIC_KEY_INFO, REQUIRE | CREATE, type_der_key },
          { CKA_OBJECT_ID, CREATE | WANT, type_der_oid },
          { CKA_ID, CREATE | MODIFY },
          { CKA_INVALID },
@@ -1718,7 +1718,7 @@ replace_compat_for_ext (p11_builder *builder,
        CK_ATTRIBUTE *public_key;
        int i;
 
-       public_key = p11_attrs_find_valid (attrs, CKA_X_PUBLIC_KEY_INFO);
+       public_key = p11_attrs_find_valid (attrs, CKA_PUBLIC_KEY_INFO);
        if (public_key == NULL)
                return;
 
@@ -1749,7 +1749,7 @@ update_related_category (p11_builder *builder,
                { CKA_INVALID, },
        };
 
-       public_key = p11_attrs_find_valid (attrs, CKA_X_PUBLIC_KEY_INFO);
+       public_key = p11_attrs_find_valid (attrs, CKA_PUBLIC_KEY_INFO);
        if (public_key == NULL)
                return;
 
index 679b635f849ae707be3d1d765d8ed2590c27b311..d469b5c1c1d05a9ebfc1400537e7a1adee293667 100644 (file)
@@ -101,7 +101,7 @@ load_stapled_extensions (p11_enumerate *ex,
 
        CK_ATTRIBUTE match[] = {
                { CKA_CLASS, &extension, sizeof (extension) },
-               { CKA_X_PUBLIC_KEY_INFO, spki->pValue, spki->ulValueLen },
+               { CKA_PUBLIC_KEY_INFO, spki->pValue, spki->ulValueLen },
        };
 
        CK_ATTRIBUTE template[] = {
@@ -286,7 +286,7 @@ extract_info (p11_enumerate *ex)
                { CKA_TRUSTED, },
                { CKA_CERTIFICATE_CATEGORY },
                { CKA_X_DISTRUSTED },
-               { CKA_X_PUBLIC_KEY_INFO },
+               { CKA_PUBLIC_KEY_INFO },
                { CKA_INVALID, },
        };
 
@@ -312,7 +312,7 @@ extract_info (p11_enumerate *ex)
        if (!extract_certificate (ex))
                return false;
 
-       attr = p11_attrs_find_valid (ex->attrs, CKA_X_PUBLIC_KEY_INFO);
+       attr = p11_attrs_find_valid (ex->attrs, CKA_PUBLIC_KEY_INFO);
        if (attr) {
                ex->stapled = load_stapled_extensions (ex, attr);
                if (!ex->stapled)
@@ -393,14 +393,14 @@ static bool
 public_key_equal (const void *one,
                   const void *two)
 {
-       return p11_attr_equal (p11_attrs_find_valid ((CK_ATTRIBUTE *)one, CKA_X_PUBLIC_KEY_INFO),
-                              p11_attrs_find_valid ((CK_ATTRIBUTE *)two, CKA_X_PUBLIC_KEY_INFO));
+       return p11_attr_equal (p11_attrs_find_valid ((CK_ATTRIBUTE *)one, CKA_PUBLIC_KEY_INFO),
+                              p11_attrs_find_valid ((CK_ATTRIBUTE *)two, CKA_PUBLIC_KEY_INFO));
 }
 
 static unsigned int
 public_key_hash (const void *data)
 {
-       return p11_attr_hash (p11_attrs_find_valid ((CK_ATTRIBUTE *)data, CKA_X_PUBLIC_KEY_INFO));
+       return p11_attr_hash (p11_attrs_find_valid ((CK_ATTRIBUTE *)data, CKA_PUBLIC_KEY_INFO));
 }
 
 static bool
@@ -438,7 +438,7 @@ blacklist_load (p11_enumerate *ex)
 
        CK_ATTRIBUTE template[] = {
                { CKA_SERIAL_NUMBER, },
-               { CKA_X_PUBLIC_KEY_INFO, },
+               { CKA_PUBLIC_KEY_INFO, },
                { CKA_ISSUER, },
        };
 
@@ -470,7 +470,7 @@ blacklist_load (p11_enumerate *ex)
                }
 
                /* A blacklisted item with a public key */
-               public_key = p11_attrs_find_valid (attrs, CKA_X_PUBLIC_KEY_INFO);
+               public_key = p11_attrs_find_valid (attrs, CKA_PUBLIC_KEY_INFO);
                if (public_key != NULL) {
                        key = p11_attrs_build (NULL, public_key, NULL);
                        if (!public_key || !p11_dict_set (ex->blacklist_public_key, key, "x"))
index c3f5759f6ab4af9183d419800495727c66e3e6be..12120e5fdd80836a57c030add777adab5de2641a 100644 (file)
@@ -146,7 +146,7 @@ list_iterate (p11_enumerate *ex,
                }
 
                if (details) {
-                       attr = p11_attrs_find_valid (ex->attrs, CKA_X_PUBLIC_KEY_INFO);
+                       attr = p11_attrs_find_valid (ex->attrs, CKA_PUBLIC_KEY_INFO);
                        if (attr) {
                                p11_buffer_init (&buf, 1024);
                                bytes = attr->pValue;
index 6bf8c9427e342c29556f54e384c4646d36f8e256..ff0f15f151c6cc5cf31ed77a9d84cf25c3463ac6 100644 (file)
@@ -503,7 +503,7 @@ parse_openssl_trusted_certificate (p11_parser *parser,
        CK_ATTRIBUTE *attrs;
        CK_BYTE idv[ID_LENGTH];
        CK_ATTRIBUTE id = { CKA_ID, idv, sizeof (idv) };
-       CK_ATTRIBUTE public_key_info = { CKA_X_PUBLIC_KEY_INFO };
+       CK_ATTRIBUTE public_key_info = { CKA_PUBLIC_KEY_INFO };
        CK_ATTRIBUTE *value;
        char *label = NULL;
        node_asn *cert;
index 29bac07ce8fe2d622dc61f2b4c67382b20d7a9ee..e584741431e3457729f4a3f47d899d9eb51dc9af 100644 (file)
@@ -402,7 +402,7 @@ test_build_certificate_staple_ca (void)
                { CKA_CLASS, &certificate_extension, sizeof (certificate_extension) },
                { CKA_OBJECT_ID, (void *)P11_OID_BASIC_CONSTRAINTS, sizeof (P11_OID_BASIC_CONSTRAINTS) },
                { CKA_VALUE, "\x30\x0f\x06\x03\x55\x1d\x13\x01\x01\xff\x04\x05\x30\x03\x01\x01\xff", 17 },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)entrust_public_key, sizeof (entrust_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)entrust_public_key, sizeof (entrust_public_key) },
                { CKA_INVALID },
        };
 
@@ -453,7 +453,7 @@ test_build_certificate_staple_ca_backwards (void)
                { CKA_CLASS, &certificate_extension, sizeof (certificate_extension) },
                { CKA_OBJECT_ID, (void *)P11_OID_BASIC_CONSTRAINTS, sizeof (P11_OID_BASIC_CONSTRAINTS) },
                { CKA_VALUE, "\x30\x0f\x06\x03\x55\x1d\x13\x01\x01\xff\x04\x05\x30\x03\x01\x01\xff", 17 },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)entrust_public_key, sizeof (entrust_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)entrust_public_key, sizeof (entrust_public_key) },
                { CKA_INVALID },
        };
 
@@ -547,7 +547,7 @@ test_build_extension (void)
 {
        CK_ATTRIBUTE input[] = {
                { CKA_CLASS, &certificate_extension, sizeof (certificate_extension) },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
                { CKA_VALUE, "\x30\x11\x06\x03\x55\x1d\x50\x04\x0a\x74\x68\x65\x20\x76\x61\x6c\x75\x65\x0a", 19 },
                { CKA_INVALID },
        };
@@ -559,7 +559,7 @@ test_build_extension (void)
                { CKA_PRIVATE, &falsev, sizeof (falsev) },
                { CKA_OBJECT_ID, "\x06\x03\x55\x1d\x50", 5 },
                { CKA_VALUE, "\x30\x11\x06\x03\x55\x1d\x50\x04\x0a\x74\x68\x65\x20\x76\x61\x6c\x75\x65\x0a", 19 },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
                { CKA_LABEL, "", 0 },
                { CKA_INVALID },
        };
@@ -1078,14 +1078,14 @@ static void
 test_create_not_settable (void)
 {
        /*
-        * CKA_X_PUBLIC_KEY_INFO cannot be created/modified
+        * CKA_PUBLIC_KEY_INFO cannot be created/modified
         */
 
        CK_ATTRIBUTE input[] = {
                { CKA_CLASS, &certificate, sizeof (certificate) },
                { CKA_CERTIFICATE_TYPE, &x509, sizeof (x509) },
                { CKA_VALUE, (void *)test_cacert3_ca_der, sizeof (test_cacert3_ca_der) },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)verisign_v1_ca_public_key, sizeof (verisign_v1_ca_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)verisign_v1_ca_public_key, sizeof (verisign_v1_ca_public_key) },
                { CKA_INVALID },
        };
 
@@ -1111,7 +1111,7 @@ static void
 test_create_but_loadable (void)
 {
        /*
-        * CKA_X_PUBLIC_KEY_INFO cannot be set on creation, but can be set if we're
+        * CKA_PUBLIC_KEY_INFO cannot be set on creation, but can be set if we're
         * loading from our store. This is signified by batching.
         */
 
@@ -1119,7 +1119,7 @@ test_create_but_loadable (void)
                { CKA_CLASS, &certificate, sizeof (certificate) },
                { CKA_CERTIFICATE_TYPE, &x509, sizeof (x509) },
                { CKA_VALUE, (void *)test_cacert3_ca_der, sizeof (test_cacert3_ca_der) },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)verisign_v1_ca_public_key, sizeof (verisign_v1_ca_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)verisign_v1_ca_public_key, sizeof (verisign_v1_ca_public_key) },
                { CKA_INVALID },
        };
 
@@ -1587,7 +1587,7 @@ test_changed_trusted_certificate (void)
        CK_ATTRIBUTE eku_extension_server_and_client[] = {
                { CKA_CLASS, &certificate_extension, sizeof (certificate_extension), },
                { CKA_OBJECT_ID, (void *)P11_OID_EXTENDED_KEY_USAGE, sizeof (P11_OID_EXTENDED_KEY_USAGE) },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
                { CKA_LABEL, "Custom Label", 12 },
                { CKA_VALUE, eku_server_and_client, sizeof (eku_server_and_client) },
                { CKA_ID, "cacert3", 7 },
@@ -1602,7 +1602,7 @@ test_changed_trusted_certificate (void)
        static CK_ATTRIBUTE reject_extension_email[] = {
                { CKA_CLASS, &certificate_extension, sizeof (certificate_extension), },
                { CKA_OBJECT_ID, (void *)P11_OID_OPENSSL_REJECT, sizeof (P11_OID_OPENSSL_REJECT) },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
                { CKA_LABEL, "Custom Label", 12 },
                { CKA_VALUE, eku_client_email, sizeof (eku_client_email) },
                { CKA_ID, "cacert3", 7 },
@@ -1721,7 +1721,7 @@ test_changed_distrust_value (void)
                { CKA_CLASS, &certificate_extension, sizeof (certificate_extension), },
                { CKA_OBJECT_ID, (void *)P11_OID_EXTENDED_KEY_USAGE, sizeof (P11_OID_EXTENDED_KEY_USAGE) },
                { CKA_VALUE, "\x30\x18\x06\x03\x55\x1d\x25\x01\x01\xff\x04\x0e\x30\x0c\x06\x0a\x2b\x06\x01\x04\x01\x99\x77\x06\x0a\x10", 26 },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
                { CKA_ID, "cacert3", 7 },
                { CKA_INVALID },
        };
@@ -1730,7 +1730,7 @@ test_changed_distrust_value (void)
                { CKA_CLASS, &certificate_extension, sizeof (certificate_extension), },
                { CKA_OBJECT_ID, (void *)P11_OID_OPENSSL_REJECT, sizeof (P11_OID_OPENSSL_REJECT) },
                { CKA_VALUE, "\x30\x1a\x06\x0a\x2b\x06\x01\x04\x01\x99\x77\x06\x0a\x01\x04\x0c\x30\x0a\x06\x08\x2b\x06\x01\x05\x05\x07\x03\x02", 28 },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
                { CKA_ID, "cacert3", 7 },
                { CKA_INVALID },
        };
@@ -2077,7 +2077,7 @@ test_changed_staple_ca (void)
                { CKA_CLASS, &certificate_extension, sizeof (certificate_extension) },
                { CKA_OBJECT_ID, (void *)P11_OID_BASIC_CONSTRAINTS, sizeof (P11_OID_BASIC_CONSTRAINTS) },
                { CKA_VALUE, "\x30\x0c\x06\x03\x55\x1d\x13\x04\x05\x30\x03\x01\x01\xff", 14 },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)entrust_public_key, sizeof (entrust_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)entrust_public_key, sizeof (entrust_public_key) },
                { CKA_ID, "the id", 6 },
                { CKA_INVALID },
        };
@@ -2125,7 +2125,7 @@ test_changed_staple_ku (void)
                { CKA_CLASS, &certificate_extension, sizeof (certificate_extension) },
                { CKA_OBJECT_ID, (void *)P11_OID_KEY_USAGE, sizeof (P11_OID_KEY_USAGE) },
                { CKA_VALUE, "\x30\x0c\x06\x03\x55\x1d\x0f\x04\x05\x03\x03\x07\xc0\x00", 14 },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)entrust_public_key, sizeof (entrust_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)entrust_public_key, sizeof (entrust_public_key) },
                { CKA_ID, "the id", 6 },
                { CKA_INVALID },
        };
index e11373f5a1afbe343aac7ea9b8708e707d8bafc9..930b6455b554aaf6c15c2a88469a7035f0f972bd 100644 (file)
@@ -191,7 +191,7 @@ static CK_ATTRIBUTE cacert3_trusted[] = {
        { CKA_SUBJECT, (void *)test_cacert3_ca_subject, sizeof (test_cacert3_ca_subject) },
        { CKA_ISSUER, (void *)test_cacert3_ca_issuer, sizeof (test_cacert3_ca_issuer) },
        { CKA_SERIAL_NUMBER, (void *)test_cacert3_ca_serial, sizeof (test_cacert3_ca_serial) },
-       { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+       { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
        { CKA_TRUSTED, &truev, sizeof (truev) },
        { CKA_ID, "ID1", 3 },
        { CKA_INVALID },
@@ -211,7 +211,7 @@ static CK_ATTRIBUTE cacert3_distrusted[] = {
 
 static CK_ATTRIBUTE cacert3_distrusted_by_key[] = {
        { CKA_CLASS, &public_key_class, sizeof (public_key_class) },
-       { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+       { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
        { CKA_X_DISTRUSTED, &truev, sizeof (truev) },
        { CKA_INVALID },
 };
@@ -226,7 +226,7 @@ static CK_ATTRIBUTE extension_eku_server_client[] = {
        { CKA_ID, "ID1", 3 },
        { CKA_OBJECT_ID, (void *)P11_OID_EXTENDED_KEY_USAGE, sizeof (P11_OID_EXTENDED_KEY_USAGE) },
        { CKA_VALUE, "\x30\x1d\x06\x03\x55\x1d\x25\x04\x16\x30\x14\x06\x08\x2b\x06\x01\x05\x05\x07\x03\x01\x06\x08\x2b\x06\x01\x05\x05\x07\x03\x02", 31 },
-       { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+       { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
        { CKA_INVALID },
 };
 
@@ -234,7 +234,7 @@ static CK_ATTRIBUTE extension_eku_invalid[] = {
        { CKA_CLASS, &extension_class, sizeof (extension_class) },
        { CKA_ID, "ID1", 3 },
        { CKA_OBJECT_ID, (void *)P11_OID_EXTENDED_KEY_USAGE, sizeof (P11_OID_EXTENDED_KEY_USAGE) },
-       { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+       { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
        { CKA_VALUE, "\x30\x0e\x06\x03\x55\x1d\x25\x04\x07\x69\x6e\x76\x61\x6c\x69\x64", 16 },
        { CKA_INVALID },
 };
index 9f7c4d64c9d7696cc941cb57591e13b0b9883131..3cba1ed89b29d911033e6521a9dc219cf507e69c 100644 (file)
@@ -108,7 +108,7 @@ static CK_ATTRIBUTE cacert3_authority_attrs[] = {
        { CKA_CERTIFICATE_TYPE, &x509_type, sizeof (x509_type) },
        { CKA_LABEL, "Custom Label", 12 },
        { CKA_SUBJECT, (void *)test_cacert3_ca_subject, sizeof (test_cacert3_ca_subject) },
-       { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+       { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
        { CKA_TRUSTED, &vtrue, sizeof (vtrue) },
        { CKA_INVALID },
 };
@@ -119,7 +119,7 @@ static CK_ATTRIBUTE verisign_v1_attrs[] = {
        { CKA_CERTIFICATE_TYPE, &x509_type, sizeof (x509_type) },
        { CKA_LABEL, "Custom Label", 12 },
        { CKA_SUBJECT, (void *)verisign_v1_ca_subject, sizeof (verisign_v1_ca_subject) },
-       { CKA_X_PUBLIC_KEY_INFO, (void *)verisign_v1_ca_public_key, sizeof (verisign_v1_ca_public_key) },
+       { CKA_PUBLIC_KEY_INFO, (void *)verisign_v1_ca_public_key, sizeof (verisign_v1_ca_public_key) },
        { CKA_TRUSTED, &vtrue, sizeof (vtrue) },
        { CKA_INVALID },
 };
@@ -127,7 +127,7 @@ static CK_ATTRIBUTE verisign_v1_attrs[] = {
 static CK_ATTRIBUTE extension_eku_server[] = {
        { CKA_CLASS, &extension_class, sizeof (extension_class) },
        { CKA_OBJECT_ID, (void *)P11_OID_EXTENDED_KEY_USAGE, sizeof (P11_OID_EXTENDED_KEY_USAGE) },
-       { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+       { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
        { CKA_VALUE, "\x30\x13\x06\x03\x55\x1d\x25\x04\x0c\x30\x0a\x06\x08\x2b\x06\x01\x05\x05\x07\x03\x01", 21 },
        { CKA_INVALID },
 };
@@ -136,7 +136,7 @@ static CK_ATTRIBUTE extension_reject_email[] = {
        { CKA_CLASS, &extension_class, sizeof (extension_class) },
        { CKA_OBJECT_ID, (void *)P11_OID_OPENSSL_REJECT, sizeof (P11_OID_OPENSSL_REJECT) },
        { CKA_VALUE, "\x30\x1a\x06\x0a\x2b\x06\x01\x04\x01\x99\x77\x06\x0a\x01\x04\x0c\x30\x0a\x06\x08\x2b\x06\x01\x05\x05\x07\x03\x04", 28 },
-       { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+       { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
        { CKA_INVALID },
 };
 
@@ -231,7 +231,7 @@ test_keyid (void)
                { CKA_CLASS, &certificate_class, sizeof (certificate_class) },
                { CKA_CERTIFICATE_TYPE, &x509_type, sizeof (x509_type) },
                { CKA_SUBJECT, (void *)test_cacert3_ca_subject, sizeof (test_cacert3_ca_subject) },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
                { CKA_TRUSTED, &vtrue, sizeof (vtrue) },
                { CKA_INVALID },
        };
@@ -239,7 +239,7 @@ test_keyid (void)
        static CK_ATTRIBUTE extension_subject_key_identifier[] = {
                { CKA_CLASS, &extension_class, sizeof (extension_class) },
                { CKA_OBJECT_ID, (void *)P11_OID_SUBJECT_KEY_IDENTIFIER, sizeof (P11_OID_SUBJECT_KEY_IDENTIFIER) },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
                { CKA_VALUE, "\x30\x0e\x06\x03\x55\x1d\x0e\x04\x07\x00\x01\x02\x03\x04\x05\x06", 16 },
                { CKA_INVALID },
        };
index bdb67df8ddcc0c68fef3e29e9f66b89ed853dc96..be5e49642a4bbe5ef4053e40dff02f291f36e9d0 100644 (file)
@@ -200,7 +200,7 @@ test_parse_openssl_trusted (void)
        CK_ATTRIBUTE eku_extension[] = {
                { CKA_CLASS, &certificate_extension, sizeof (certificate_extension), },
                { CKA_OBJECT_ID, (void *)P11_OID_EXTENDED_KEY_USAGE, sizeof (P11_OID_EXTENDED_KEY_USAGE) },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
                { CKA_VALUE, "\x30\x16\x06\x03\x55\x1d\x25\x01\x01\xff\x04\x0c\x30\x0a\x06\x08\x2b\x06\x01\x05\x05\x07\x03\x01", 24 },
                { CKA_INVALID },
        };
@@ -208,7 +208,7 @@ test_parse_openssl_trusted (void)
        CK_ATTRIBUTE reject_extension[] = {
                { CKA_CLASS, &certificate_extension, sizeof (certificate_extension), },
                { CKA_OBJECT_ID, (void *)P11_OID_OPENSSL_REJECT, sizeof (P11_OID_OPENSSL_REJECT) },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)test_cacert3_ca_public_key, sizeof (test_cacert3_ca_public_key) },
                { CKA_VALUE, "\x30\x1a\x06\x0a\x2b\x06\x01\x04\x01\x99\x77\x06\x0a\x01\x04\x0c\x30\x0a\x06\x08\x2b\x06\x01\x05\x05\x07\x03\x04", 28 },
                { CKA_INVALID },
        };
@@ -280,7 +280,7 @@ test_parse_openssl_distrusted (void)
        CK_ATTRIBUTE eku_extension[] = {
                { CKA_CLASS, &certificate_extension, sizeof (certificate_extension), },
                { CKA_OBJECT_ID, (void *)P11_OID_EXTENDED_KEY_USAGE, sizeof (P11_OID_EXTENDED_KEY_USAGE) },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)distrust_public_key, sizeof (distrust_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)distrust_public_key, sizeof (distrust_public_key) },
                { CKA_VALUE, "\x30\x18\x06\x03\x55\x1d\x25\x01\x01\xff\x04\x0e\x30\x0c\x06\x0a\x2b\x06\x01\x04\x01\x99\x77\x06\x0a\x10", 26 },
                { CKA_INVALID },
        };
@@ -288,7 +288,7 @@ test_parse_openssl_distrusted (void)
        CK_ATTRIBUTE reject_extension[] = {
                { CKA_CLASS, &certificate_extension, sizeof (certificate_extension), },
                { CKA_OBJECT_ID, (void *)P11_OID_OPENSSL_REJECT, sizeof (P11_OID_OPENSSL_REJECT) },
-               { CKA_X_PUBLIC_KEY_INFO, (void *)distrust_public_key, sizeof (distrust_public_key) },
+               { CKA_PUBLIC_KEY_INFO, (void *)distrust_public_key, sizeof (distrust_public_key) },
                { CKA_VALUE, "\x30\x1a\x06\x0a\x2b\x06\x01\x04\x01\x99\x77\x06\x0a\x01\x04\x0c\x30\x0a\x06\x08\x2b\x06\x01\x05\x05\x07\x03\x02", 28 },
                { CKA_INVALID },
        };