summaryrefslogtreecommitdiff
path: root/trust/tests/test-module.c
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-03-18 13:13:24 +0100
committerStef Walter <stefw@gnome.org>2013-03-18 13:13:24 +0100
commita904e98b78b55e7a6213356225e45a04fdc457e1 (patch)
treee879e446a5402e59f4be13b7711e071c858edc26 /trust/tests/test-module.c
parentf71baf6adf00626e73326149d55183bc62f827ae (diff)
Refine looking up of attributes in arrays
There was a class of bugs for looking up invalid or empty attributes in the internal PKCS#11 attribute arrays. * Refine what p11_attrs_find_valid() treats as valid * Rename p11_attrs_is_empty() to p11_attrs_terminator() for clarity
Diffstat (limited to 'trust/tests/test-module.c')
-rw-r--r--trust/tests/test-module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/trust/tests/test-module.c b/trust/tests/test-module.c
index 45af62a..4606a31 100644
--- a/trust/tests/test-module.c
+++ b/trust/tests/test-module.c
@@ -388,7 +388,7 @@ check_trust_object_hashes (CuTest *cu,
rv = test.module->C_GetAttributeValue (session, trust, hashes, 2);
CuAssertTrue (cu, rv == CKR_OK);
- value = p11_attrs_find (cert, CKA_VALUE);
+ value = p11_attrs_find_valid (cert, CKA_VALUE);
CuAssertPtrNotNull (cu, value);
p11_checksum_md5 (check, value->pValue, value->ulValueLen, NULL);
@@ -410,7 +410,7 @@ check_has_trust_object (CuTest *cu,
CK_ATTRIBUTE *attr;
CK_ULONG count;
- attr = p11_attrs_find (cert, CKA_ID);
+ attr = p11_attrs_find_valid (cert, CKA_ID);
CuAssertPtrNotNull (cu, attr);
match = p11_attrs_build (NULL, &klass, attr, NULL);