Use CRYPTO_memcmp when comparing authenticators
[openssl.git] / crypto / pkcs12 / p12_mutl.c
index b193da1b3d054bfdabe462bf60b4d46240c63523..9382b39d123d5ac19e56e8dd38afc65988d0ca55 100644 (file)
@@ -58,7 +58,8 @@
  */
 
 # include <stdio.h>
-# include "cryptlib.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;
 }