diff options
Diffstat (limited to 'trust/builder.c')
-rw-r--r-- | trust/builder.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/trust/builder.c b/trust/builder.c index 85abe5b..f4ababa 100644 --- a/trust/builder.c +++ b/trust/builder.c @@ -40,9 +40,9 @@ #include "asn1.h" #include "attrs.h" #include "builder.h" -#include "checksum.h" #include "constants.h" #include "debug.h" +#include "hash.h" #include "index.h" #include "library.h" #include "oid.h" @@ -222,8 +222,8 @@ calc_check_value (const unsigned char *data, size_t length, CK_BYTE *check_value) { - unsigned char checksum[P11_CHECKSUM_SHA1_LENGTH]; - p11_checksum_sha1 (checksum, data, length, NULL); + unsigned char checksum[P11_HASH_SHA1_LEN]; + p11_hash_sha1 (checksum, data, length, NULL); memcpy (check_value, checksum, 3); } @@ -412,7 +412,7 @@ certificate_value_attrs (CK_ATTRIBUTE *attrs, const unsigned char *der, size_t der_len) { - unsigned char checksum[P11_CHECKSUM_SHA1_LENGTH]; + unsigned char checksum[P11_HASH_SHA1_LEN]; CK_BBOOL falsev = CK_FALSE; CK_ULONG zero = 0UL; CK_BYTE checkv[3]; @@ -1057,8 +1057,8 @@ replace_nss_trust_object (p11_builder *builder, CK_RV rv; CK_OBJECT_CLASS klassv = CKO_NSS_TRUST; - CK_BYTE sha1v[P11_CHECKSUM_SHA1_LENGTH]; - CK_BYTE md5v[P11_CHECKSUM_MD5_LENGTH]; + CK_BYTE sha1v[P11_HASH_SHA1_LEN]; + CK_BYTE md5v[P11_HASH_MD5_LEN]; CK_BBOOL generatedv = CK_FALSE; CK_BBOOL falsev = CK_FALSE; @@ -1094,8 +1094,8 @@ replace_nss_trust_object (p11_builder *builder, md5_hash.type = CKA_INVALID; sha1_hash.type = CKA_INVALID; } else { - p11_checksum_md5 (md5v, value, length, NULL); - p11_checksum_sha1 (sha1v, value, length, NULL); + p11_hash_md5 (md5v, value, length, NULL); + p11_hash_sha1 (sha1v, value, length, NULL); } if (!issuer) issuer = &invalid; |