diff options
-rw-r--r-- | lib/x509/pkcs12.c | 4 | ||||
-rw-r--r-- | lib/x509/pkcs7.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/x509/pkcs12.c b/lib/x509/pkcs12.c index 2b7b8d6402..a985d69386 100644 --- a/lib/x509/pkcs12.c +++ b/lib/x509/pkcs12.c @@ -1038,7 +1038,7 @@ int gnutls_pkcs12_verify_mac(gnutls_pkcs12_t pkcs12, const char *pass) return _gnutls_asn2err(result); } - algo = gnutls_oid_to_digest(oid); + algo = gnutls_oid_to_mac(oid); if (algo == GNUTLS_MAC_UNKNOWN) { unknown_mac: gnutls_assert(); @@ -1880,7 +1880,7 @@ gnutls_pkcs12_mac_info(gnutls_pkcs12_t pkcs12, unsigned int *mac, *oid = (char*)tmp.data; } - algo = gnutls_oid_to_digest((char*)tmp.data); + algo = gnutls_oid_to_mac((char*)tmp.data); if (algo == GNUTLS_MAC_UNKNOWN || mac_to_entry(algo) == NULL) { gnutls_assert(); return GNUTLS_E_UNKNOWN_HASH_ALGORITHM; diff --git a/lib/x509/pkcs7.c b/lib/x509/pkcs7.c index 955cb5ae9c..90e0702207 100644 --- a/lib/x509/pkcs7.c +++ b/lib/x509/pkcs7.c @@ -2283,7 +2283,7 @@ static int write_attributes(ASN1_TYPE c2, const char *root, /* If we add any attribute we should add them all */ /* Add hash */ digest_size = _gnutls_hash_get_algo_len(me); - ret = gnutls_hash_fast(me->id, data->data, data->size, digest); + ret = gnutls_hash_fast((gnutls_digest_algorithm_t)me->id, data->data, data->size, digest); if (ret < 0) { gnutls_assert(); return ret; |