summaryrefslogtreecommitdiff
path: root/cipher/mac-hmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'cipher/mac-hmac.c')
-rw-r--r--cipher/mac-hmac.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/cipher/mac-hmac.c b/cipher/mac-hmac.c
index 5edd7e82..2c660e98 100644
--- a/cipher/mac-hmac.c
+++ b/cipher/mac-hmac.c
@@ -35,6 +35,8 @@ map_mac_algo_to_md (int mac_algo)
{
default:
return GCRY_MD_NONE;
+ case GCRY_MAC_HMAC_MD2:
+ return GCRY_MD_MD2;
case GCRY_MAC_HMAC_MD4:
return GCRY_MD_MD4;
case GCRY_MAC_HMAC_MD5:
@@ -270,3 +272,9 @@ gcry_mac_spec_t _gcry_mac_type_spec_hmac_md4 = {
&hmac_ops
};
#endif
+#if USE_MD2
+gcry_mac_spec_t _gcry_mac_type_spec_hmac_md2 = {
+ GCRY_MAC_HMAC_MD2, {0, 0}, "HMAC_MD2",
+ &hmac_ops
+};
+#endif