From 7cbf496329053725b9aa5344a1428db456cde330 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Wed, 15 Apr 2020 12:54:44 -0700 Subject: [PATCH] Encrypt key requirements check The file wc_encrypt.c offers a function named wc_CryptKey(), which requires PWDBASED and ASN. Added the check for ASN. --- wolfcrypt/src/wc_encrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/wc_encrypt.c b/wolfcrypt/src/wc_encrypt.c index 2d8364939..39dbeec5a 100644 --- a/wolfcrypt/src/wc_encrypt.c +++ b/wolfcrypt/src/wc_encrypt.c @@ -363,7 +363,7 @@ int wc_BufferKeyEncrypt(EncryptedInfo* info, byte* der, word32 derSz, #endif /* WOLFSSL_ENCRYPTED_KEYS */ -#ifndef NO_PWDBASED +#if !defined(NO_PWDBASED) && !defined(NO_ASN) #if defined(HAVE_PKCS8) || defined(HAVE_PKCS12) /* Decrypt/Encrypt input in place from parameters based on id