From 1dc227b4fce16fcc721276925492f4ba4db00b4f Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 20 Mar 2013 08:59:49 +0100 Subject: hash: Rename file and functions for hashes We're going to be adding other hashes. Also build as part of a different common library. --- tools/extract-openssl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tools/extract-openssl.c') diff --git a/tools/extract-openssl.c b/tools/extract-openssl.c index bc7427a..8e02421 100644 --- a/tools/extract-openssl.c +++ b/tools/extract-openssl.c @@ -37,11 +37,11 @@ #include "asn1.h" #include "attrs.h" #include "buffer.h" -#include "checksum.h" #include "compat.h" #include "debug.h" #include "dict.h" #include "extract.h" +#include "hash.h" #include "library.h" #include "oid.h" #include "pem.h" @@ -520,7 +520,7 @@ p11_openssl_canon_name_der (p11_dict *asn1_defs, static char * symlink_for_subject_hash (p11_extract_info *ex) { - unsigned char md[P11_CHECKSUM_SHA1_LENGTH]; + unsigned char md[P11_HASH_SHA1_LEN]; p11_buffer der; CK_ATTRIBUTE *subject; unsigned long hash; @@ -535,7 +535,7 @@ symlink_for_subject_hash (p11_extract_info *ex) return_val_if_fail (der.data != NULL, NULL); if (p11_openssl_canon_name_der (ex->asn1_defs, &der)) { - p11_checksum_sha1 (md, der.data, der.len, NULL); + p11_hash_sha1 (md, der.data, der.len, NULL); hash = ( ((unsigned long)md[0] ) | ((unsigned long)md[1] << 8L) | @@ -553,7 +553,7 @@ symlink_for_subject_hash (p11_extract_info *ex) static char * symlink_for_subject_old_hash (p11_extract_info *ex) { - unsigned char md[P11_CHECKSUM_MD5_LENGTH]; + unsigned char md[P11_HASH_MD5_LEN]; CK_ATTRIBUTE *subject; unsigned long hash; char *linkname; @@ -562,7 +562,7 @@ symlink_for_subject_old_hash (p11_extract_info *ex) if (!subject) return NULL; - p11_checksum_md5 (md, subject->pValue, subject->ulValueLen, NULL); + p11_hash_md5 (md, subject->pValue, subject->ulValueLen, NULL); hash = ( ((unsigned long)md[0] ) | ((unsigned long)md[1] << 8L) | -- cgit v1.1