diff options
| author | Stef Walter <stefw@gnome.org> | 2013-03-20 08:59:49 +0100 |
|---|---|---|
| committer | Stef Walter <stefw@gnome.org> | 2013-03-20 09:31:50 +0100 |
| commit | 1dc227b4fce16fcc721276925492f4ba4db00b4f (patch) | |
| tree | 1a0b070061e27e967c07208f2f21891c29969986 /trust/tests/test-module.c | |
| parent | ef8c54a355d3f9814cc53a0aad72d61247b169a0 (diff) | |
hash: Rename file and functions for hashes
We're going to be adding other hashes. Also build as part of a
different common library.
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 57df78e..1d97f9b 100644 --- a/trust/tests/test-module.c +++ b/trust/tests/test-module.c @@ -42,8 +42,8 @@ #define CRYPTOKI_EXPORTS #include "attrs.h" -#include "checksum.h" #include "debug.h" +#include "hash.h" #include "library.h" #include "pkcs11x.h" #include "test-data.h" @@ -385,8 +385,8 @@ check_trust_object_hashes (CuTest *cu, CK_OBJECT_HANDLE trust, CK_ATTRIBUTE *cert) { - unsigned char sha1[P11_CHECKSUM_SHA1_LENGTH]; - unsigned char md5[P11_CHECKSUM_MD5_LENGTH]; + unsigned char sha1[P11_HASH_SHA1_LEN]; + unsigned char md5[P11_HASH_MD5_LEN]; unsigned char check[128]; CK_ATTRIBUTE *value; CK_RV rv; @@ -403,10 +403,10 @@ check_trust_object_hashes (CuTest *cu, value = p11_attrs_find_valid (cert, CKA_VALUE); CuAssertPtrNotNull (cu, value); - p11_checksum_md5 (check, value->pValue, value->ulValueLen, NULL); + p11_hash_md5 (check, value->pValue, value->ulValueLen, NULL); CuAssertTrue (cu, memcmp (md5, check, sizeof (md5)) == 0); - p11_checksum_sha1 (check, value->pValue, value->ulValueLen, NULL); + p11_hash_sha1 (check, value->pValue, value->ulValueLen, NULL); CuAssertTrue (cu, memcmp (sha1, check, sizeof (sha1)) == 0); } |
