diff options
author | Stef Walter <stef@thewalter.net> | 2013-07-10 14:28:15 +0200 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2013-07-10 15:07:55 +0200 |
commit | edd04b610c1c83f26ed036569ad95b89a41fc558 (patch) | |
tree | 7ec7040b9ef612b36a399592c018c0a131ddfa75 /trust/tests/test-module.c | |
parent | eca5a6e491f5f85ba1f06afcea3177c3442ae557 (diff) |
Add support for using freebl3 for SHA1 and MD5 hashing
Since we don't want to link freebl3 to libp11-kit.so where it isn't
needed, move the SHA-1 and MD5 digest functionality to the trust/
directory.
Diffstat (limited to 'trust/tests/test-module.c')
-rw-r--r-- | trust/tests/test-module.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/trust/tests/test-module.c b/trust/tests/test-module.c index 33cdd48..80747da 100644 --- a/trust/tests/test-module.c +++ b/trust/tests/test-module.c @@ -43,7 +43,7 @@ #include <string.h> #include "attrs.h" -#include "hash.h" +#include "digest.h" #include "library.h" #include "path.h" #include "parser.h" @@ -485,8 +485,8 @@ check_trust_object_hashes (CK_SESSION_HANDLE session, CK_OBJECT_HANDLE trust, CK_ATTRIBUTE *cert) { - unsigned char sha1[P11_HASH_SHA1_LEN]; - unsigned char md5[P11_HASH_MD5_LEN]; + unsigned char sha1[P11_DIGEST_SHA1_LEN]; + unsigned char md5[P11_DIGEST_MD5_LEN]; unsigned char check[128]; CK_ATTRIBUTE *value; CK_RV rv; @@ -503,10 +503,10 @@ check_trust_object_hashes (CK_SESSION_HANDLE session, value = p11_attrs_find_valid (cert, CKA_VALUE); assert_ptr_not_null (value); - p11_hash_md5 (check, value->pValue, value->ulValueLen, NULL); + p11_digest_md5 (check, value->pValue, value->ulValueLen, NULL); assert (memcmp (md5, check, sizeof (md5)) == 0); - p11_hash_sha1 (check, value->pValue, value->ulValueLen, NULL); + p11_digest_sha1 (check, value->pValue, value->ulValueLen, NULL); assert (memcmp (sha1, check, sizeof (sha1)) == 0); } |