diff options
author | Stef Walter <stefw@gnome.org> | 2013-03-08 22:50:06 +0100 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-03-08 22:50:06 +0100 |
commit | 6ecf586a1e31f2874c7b185f4f2061aa9e83c08a (patch) | |
tree | 560ac07862231310b165f51de84880de12cd1480 /trust/tests | |
parent | 66fbcf7b6aac7fb808d3146335625cc15d4d2959 (diff) |
trust: Use the new NSS PKCS#11 extension codes
NSS had subtly changed the values of the distrust CK_TRUST codes
so update them to stay in sync.
Diffstat (limited to 'trust/tests')
-rw-r--r-- | trust/tests/test-module.c | 4 | ||||
-rw-r--r-- | trust/tests/test-parser.c | 22 |
2 files changed, 13 insertions, 13 deletions
diff --git a/trust/tests/test-module.c b/trust/tests/test-module.c index 2e085ba..2d0e488 100644 --- a/trust/tests/test-module.c +++ b/trust/tests/test-module.c @@ -192,7 +192,7 @@ static void check_has_trust_object (CuTest *cu, CK_ATTRIBUTE *cert) { - CK_OBJECT_CLASS trust_object = CKO_NETSCAPE_TRUST; + CK_OBJECT_CLASS trust_object = CKO_NSS_TRUST; CK_ATTRIBUTE klass = { CKA_CLASS, &trust_object, sizeof (trust_object) }; CK_OBJECT_HANDLE objects[2]; CK_ATTRIBUTE *match; @@ -314,7 +314,7 @@ test_find_certificates (CuTest *cu) static void test_find_builtin (CuTest *cu) { - CK_OBJECT_CLASS klass = CKO_NETSCAPE_BUILTIN_ROOT_LIST; + CK_OBJECT_CLASS klass = CKO_NSS_BUILTIN_ROOT_LIST; CK_BBOOL vtrue = CK_TRUE; CK_BBOOL vfalse = CK_FALSE; diff --git a/trust/tests/test-parser.c b/trust/tests/test-parser.c index 581ff5e..0f40748 100644 --- a/trust/tests/test-parser.c +++ b/trust/tests/test-parser.c @@ -154,11 +154,11 @@ test_parse_pem_certificate (CuTest *cu) static void test_parse_openssl_trusted (CuTest *cu) { - CK_TRUST trusted = CKT_NETSCAPE_TRUSTED_DELEGATOR; - CK_TRUST distrusted = CKT_NETSCAPE_UNTRUSTED; - CK_TRUST unknown = CKT_NETSCAPE_TRUST_UNKNOWN; + CK_TRUST trusted = CKT_NSS_TRUSTED_DELEGATOR; + CK_TRUST distrusted = CKT_NSS_NOT_TRUSTED; + CK_TRUST unknown = CKT_NSS_TRUST_UNKNOWN; CK_OBJECT_CLASS certificate_extension = CKO_X_CERTIFICATE_EXTENSION; - CK_OBJECT_CLASS trust_object = CKO_NETSCAPE_TRUST; + CK_OBJECT_CLASS trust_object = CKO_NSS_TRUST; CK_OBJECT_CLASS trust_assertion = CKO_X_TRUST_ASSERTION; CK_X_ASSERTION_TYPE anchored_certificate = CKT_X_ANCHORED_CERTIFICATE; CK_X_ASSERTION_TYPE distrusted_certificate = CKT_X_DISTRUSTED_CERTIFICATE; @@ -294,9 +294,9 @@ test_parse_openssl_trusted (CuTest *cu) static void test_parse_openssl_distrusted (CuTest *cu) { - CK_TRUST distrusted = CKT_NETSCAPE_UNTRUSTED; + CK_TRUST distrusted = CKT_NSS_NOT_TRUSTED; CK_OBJECT_CLASS certificate_extension = CKO_X_CERTIFICATE_EXTENSION; - CK_OBJECT_CLASS trust_object = CKO_NETSCAPE_TRUST; + CK_OBJECT_CLASS trust_object = CKO_NSS_TRUST; CK_OBJECT_CLASS klass = CKO_CERTIFICATE; CK_OBJECT_CLASS trust_assertion = CKO_X_TRUST_ASSERTION; CK_X_ASSERTION_TYPE distrusted_certificate = CKT_X_DISTRUSTED_CERTIFICATE; @@ -515,10 +515,10 @@ test_parse_openssl_distrusted (CuTest *cu) static void test_parse_with_key_usage (CuTest *cu) { - CK_TRUST trusted = CKT_NETSCAPE_TRUSTED; - CK_TRUST unknown = CKT_NETSCAPE_TRUST_UNKNOWN; + CK_TRUST trusted = CKT_NSS_TRUSTED; + CK_TRUST unknown = CKT_NSS_TRUST_UNKNOWN; CK_OBJECT_CLASS klass = CKO_CERTIFICATE; - CK_OBJECT_CLASS trust_object = CKO_NETSCAPE_TRUST; + CK_OBJECT_CLASS trust_object = CKO_NSS_TRUST; CK_BBOOL vtrue = CK_TRUE; CK_BBOOL vfalse = CK_FALSE; CK_CERTIFICATE_TYPE x509 = CKC_X_509; @@ -606,9 +606,9 @@ static void test_parse_anchor (CuTest *cu) { CK_BBOOL vtrue = CK_TRUE; - CK_OBJECT_CLASS trust_object = CKO_NETSCAPE_TRUST; + CK_OBJECT_CLASS trust_object = CKO_NSS_TRUST; CK_ATTRIBUTE trusted = { CKA_TRUSTED, &vtrue, sizeof (vtrue) }; - CK_TRUST delegator = CKT_NETSCAPE_TRUSTED_DELEGATOR; + CK_TRUST delegator = CKT_NSS_TRUSTED_DELEGATOR; CK_OBJECT_CLASS trust_assertion = CKO_X_TRUST_ASSERTION; CK_X_ASSERTION_TYPE anchored_certificate = CKT_X_ANCHORED_CERTIFICATE; |