diff options
author | Emilia Kasper <emilia@openssl.org> | 2015-05-27 17:12:13 +0200 |
---|---|---|
committer | Emilia Kasper <emilia@openssl.org> | 2015-06-08 14:55:50 +0200 |
commit | 1e4a355dcabe2f75df5bb8b41b394d37037169d2 (patch) | |
tree | aac26a71e92cf32f361342fbe2c3fe4edde4395d /crypto/pkcs12 | |
parent | Increase buffer size for passwords in pkcs12 CLI (diff) | |
download | openssl-1e4a355dcabe2f75df5bb8b41b394d37037169d2.tar.xz openssl-1e4a355dcabe2f75df5bb8b41b394d37037169d2.zip |
Use CRYPTO_memcmp when comparing authenticators
Pointed out by Victor Vasiliev (vasilvv@mit.edu) via Adam Langley
(Google).
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/pkcs12')
-rw-r--r-- | crypto/pkcs12/p12_mutl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/pkcs12/p12_mutl.c b/crypto/pkcs12/p12_mutl.c index 4025e3fc41..9382b39d12 100644 --- a/crypto/pkcs12/p12_mutl.c +++ b/crypto/pkcs12/p12_mutl.c @@ -59,6 +59,7 @@ # include <stdio.h> # include "internal/cryptlib.h" +#include <openssl/crypto.h> # include <openssl/hmac.h> # include <openssl/rand.h> # include <openssl/pkcs12.h> @@ -123,7 +124,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)) + || CRYPTO_memcmp(mac, p12->mac->dinfo->digest->data, maclen)) return 0; return 1; } |