diff options
Diffstat (limited to 'src/lib/libcrypto/pkcs12/p12_mutl.c')
-rw-r--r-- | src/lib/libcrypto/pkcs12/p12_mutl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_mutl.c b/src/lib/libcrypto/pkcs12/p12_mutl.c index 2060358188..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.38 2024/03/24 06:48:03 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 | */ |
@@ -64,10 +64,10 @@ | |||
64 | 64 | ||
65 | #ifndef OPENSSL_NO_HMAC | 65 | #ifndef OPENSSL_NO_HMAC |
66 | 66 | ||
67 | #include <openssl/err.h> | ||
68 | #include <openssl/hmac.h> | 67 | #include <openssl/hmac.h> |
69 | #include <openssl/pkcs12.h> | 68 | #include <openssl/pkcs12.h> |
70 | 69 | ||
70 | #include "err_local.h" | ||
71 | #include "evp_local.h" | 71 | #include "evp_local.h" |
72 | #include "hmac_local.h" | 72 | #include "hmac_local.h" |
73 | #include "pkcs12_local.h" | 73 | #include "pkcs12_local.h" |
@@ -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 | } |
197 | LCRYPTO_ALIAS(PKCS12_verify_mac); | 197 | LCRYPTO_ALIAS(PKCS12_verify_mac); |
198 | 198 | ||