summaryrefslogtreecommitdiff
path: root/src/util/crypto_hkdf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/crypto_hkdf.c')
-rw-r--r--src/util/crypto_hkdf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/crypto_hkdf.c b/src/util/crypto_hkdf.c
index 86a814b12..7270b87b6 100644
--- a/src/util/crypto_hkdf.c
+++ b/src/util/crypto_hkdf.c
@@ -77,7 +77,11 @@ static const void *
doHMAC (gcry_md_hd_t mac, const void *key, size_t key_len, const void *buf,
size_t buf_len)
{
- gcry_md_setkey (mac, key, key_len);
+ if (GPG_ERR_NO_ERROR != gcry_md_setkey (mac, key, key_len))
+ {
+ GNUNET_break (0);
+ return NULL;
+ }
gcry_md_write (mac, buf, buf_len);
return (const void *) gcry_md_read (mac, 0);