diff --git a/src/hmac/hmac_sha1.c b/src/hmac/hmac_sha1.c index dc5a45a..1fdf0c5 100644 --- a/src/hmac/hmac_sha1.c +++ b/src/hmac/hmac_sha1.c @@ -8,6 +8,7 @@ #ifdef USE_OPENSSL #include #include +#include #else #include #endif @@ -38,8 +39,10 @@ void hmac_sha1(const uint8_t *k, /* secret key */ size_t t) { #ifdef USE_OPENSSL - (void)HMAC(EVP_sha1(), k, (int)lk, d, ld, out, NULL); (void)t; + + if (!HMAC(EVP_sha1(), k, (int)lk, d, ld, out, NULL)) + ERR_clear_error(); #else SHA_CTX ictx, octx; uint8_t isha[SHA_DIGEST_LENGTH], osha[SHA_DIGEST_LENGTH];