summaryrefslogtreecommitdiff
path: root/lib/crypto-api.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/crypto-api.c')
-rw-r--r--lib/crypto-api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/crypto-api.c b/lib/crypto-api.c
index caf8d713a3..00ecdd31b2 100644
--- a/lib/crypto-api.c
+++ b/lib/crypto-api.c
@@ -563,7 +563,7 @@ int
gnutls_hash_init(gnutls_hash_hd_t * dig,
gnutls_digest_algorithm_t algorithm)
{
- if (is_mac_algo_forbidden(algorithm))
+ if (is_mac_algo_forbidden(DIG_TO_MAC(algorithm)))
return gnutls_assert_val(GNUTLS_E_UNWANTED_ALGORITHM);
*dig = gnutls_malloc(sizeof(digest_hd_st));
@@ -659,7 +659,7 @@ int
gnutls_hash_fast(gnutls_digest_algorithm_t algorithm,
const void *ptext, size_t ptext_len, void *digest)
{
- if (is_mac_algo_forbidden(algorithm))
+ if (is_mac_algo_forbidden(DIG_TO_MAC(algorithm)))
return gnutls_assert_val(GNUTLS_E_UNWANTED_ALGORITHM);
return _gnutls_hash_fast(algorithm, ptext, ptext_len, digest);