summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/pkcs12/p12_mutl.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/pkcs12/p12_mutl.c')
-rw-r--r--crypto/openssl/crypto/pkcs12/p12_mutl.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/crypto/openssl/crypto/pkcs12/p12_mutl.c b/crypto/openssl/crypto/pkcs12/p12_mutl.c
index 369257e..13d866d 100644
--- a/crypto/openssl/crypto/pkcs12/p12_mutl.c
+++ b/crypto/openssl/crypto/pkcs12/p12_mutl.c
@@ -106,10 +106,7 @@ int PKCS12_verify_mac (PKCS12 *p12, const char *pass, int passlen)
return 0;
}
if ((maclen != (unsigned int)p12->mac->dinfo->digest->length)
- || memcmp (mac, p12->mac->dinfo->digest->data, maclen)) {
- PKCS12err(PKCS12_F_VERIFY_MAC,PKCS12_R_MAC_VERIFY_ERROR);
- return 0;
- }
+ || memcmp (mac, p12->mac->dinfo->digest->data, maclen)) return 0;
return 1;
}
@@ -152,7 +149,7 @@ int PKCS12_setup_mac (PKCS12 *p12, int iter, unsigned char *salt, int saltlen,
}
if (!saltlen) saltlen = PKCS12_SALT_LEN;
p12->mac->salt->length = saltlen;
- if (!(p12->mac->salt->data = Malloc (saltlen))) {
+ if (!(p12->mac->salt->data = OPENSSL_malloc (saltlen))) {
PKCS12err(PKCS12_F_PKCS12_SETUP_MAC, ERR_R_MALLOC_FAILURE);
return 0;
}
OpenPOWER on IntegriCloud