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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_mutl.c b/src/lib/libcrypto/pkcs12/p12_mutl.c
index 513aa54ada..4a9d0f9757 100644
--- a/src/lib/libcrypto/pkcs12/p12_mutl.c
+++ b/src/lib/libcrypto/pkcs12/p12_mutl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_mutl.c,v 1.39 2025/05/10 05:54:38 tb Exp $ */ 1/* $OpenBSD: p12_mutl.c,v 1.40 2025/06/03 08:42:15 kenjiro Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -189,10 +189,10 @@ PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen)
189 PKCS12error(PKCS12_R_MAC_GENERATION_ERROR); 189 PKCS12error(PKCS12_R_MAC_GENERATION_ERROR);
190 return 0; 190 return 0;
191 } 191 }
192 if ((maclen != (unsigned int)p12->mac->dinfo->digest->length) || 192 if (maclen != (unsigned int)p12->mac->dinfo->digest->length)
193 memcmp(mac, p12->mac->dinfo->digest->data, maclen))
194 return 0; 193 return 0;
195 return 1; 194
195 return timingsafe_memcmp(mac, p12->mac->dinfo->digest->data, maclen) == 0;
196} 196}
197LCRYPTO_ALIAS(PKCS12_verify_mac); 197LCRYPTO_ALIAS(PKCS12_verify_mac);
198 198