From edd04b610c1c83f26ed036569ad95b89a41fc558 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 10 Jul 2013 14:28:15 +0200 Subject: 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. --- trust/tests/test-module.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'trust/tests/test-module.c') 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 #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); } -- cgit v1.1