summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pkcs12/p12_mutl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/pkcs12/p12_mutl.c')
-rw-r--r--src/lib/libcrypto/pkcs12/p12_mutl.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_mutl.c b/src/lib/libcrypto/pkcs12/p12_mutl.c
index 96de1bd11e..9ab740d51f 100644
--- a/src/lib/libcrypto/pkcs12/p12_mutl.c
+++ b/src/lib/libcrypto/pkcs12/p12_mutl.c
@@ -97,14 +97,10 @@ int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen,
97 return 0; 97 return 0;
98 } 98 }
99 HMAC_CTX_init(&hmac); 99 HMAC_CTX_init(&hmac);
100 if (!HMAC_Init_ex(&hmac, key, md_size, md_type, NULL) 100 HMAC_Init_ex(&hmac, key, md_size, md_type, NULL);
101 || !HMAC_Update(&hmac, p12->authsafes->d.data->data, 101 HMAC_Update(&hmac, p12->authsafes->d.data->data,
102 p12->authsafes->d.data->length) 102 p12->authsafes->d.data->length);
103 || !HMAC_Final(&hmac, mac, maclen)) 103 HMAC_Final(&hmac, mac, maclen);
104 {
105 HMAC_CTX_cleanup(&hmac);
106 return 0;
107 }
108 HMAC_CTX_cleanup(&hmac); 104 HMAC_CTX_cleanup(&hmac);
109 return 1; 105 return 1;
110} 106}