summaryrefslogtreecommitdiff
path: root/tools/extract-openssl.c
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-03-20 08:59:49 +0100
committerStef Walter <stefw@gnome.org>2013-03-20 09:31:50 +0100
commit1dc227b4fce16fcc721276925492f4ba4db00b4f (patch)
tree1a0b070061e27e967c07208f2f21891c29969986 /tools/extract-openssl.c
parentef8c54a355d3f9814cc53a0aad72d61247b169a0 (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 'tools/extract-openssl.c')
-rw-r--r--tools/extract-openssl.c10
1 files changed, 5 insertions, 5 deletions
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) |