summaryrefslogtreecommitdiff
path: root/lib/fips.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2015-07-21 08:37:34 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2015-07-21 09:10:39 +0200
commit042c41433f2fb2429685ee82cd88404c555de31b (patch)
treeeff9af22824abe7b3c15fd55166fbb29ac19657a /lib/fips.c
parent395cd2603408b10e8ab67819dde200526e028fba (diff)
downloadgnutls-042c41433f2fb2429685ee82cd88404c555de31b.tar.gz
fips: use gnutls_hex_decode for MAC decoding
Diffstat (limited to 'lib/fips.c')
-rw-r--r--lib/fips.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/fips.c b/lib/fips.c
index 565976e4af..e5028d958f 100644
--- a/lib/fips.c
+++ b/lib/fips.c
@@ -27,6 +27,7 @@
#include <fips.h>
#include <gnutls/self-test.h>
#include <stdio.h>
+#include <extras/hex.h>
#include <random.h>
unsigned int _gnutls_lib_mode = LIB_STATE_POWERON;
@@ -224,8 +225,8 @@ static unsigned check_binary_integrity(const char* libname, const char* symbol)
}
}
- hmac_size = sizeof(hmac);
- ret = _gnutls_hex2bin((void*)data.data, data.size, hmac, &hmac_size);
+ hmac_size = hex_data_size(data->size);
+ ret = gnutls_hex_decode(&data, hmac, hmac_size);
gnutls_free(data.data);
if (ret < 0) {