Fix build error with WOLFSSL_AES_DIRECT

pull/5432/head
Eric Blankenhorn 2022-08-03 08:54:19 -05:00
parent f713c75a73
commit ecdccb6180
2 changed files with 5 additions and 2 deletions

View File

@ -5683,7 +5683,7 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD* type)
#if defined(HAVE_AES_CBC) || defined(WOLFSSL_AES_COUNTER) || \
defined(HAVE_AES_ECB) || defined(WOLFSSL_AES_CFB) || \
defined(WOLFSSL_AES_OFB)
defined(WOLFSSL_AES_OFB) || defined(WOLFSSL_AES_DIRECT)
#define AES_SET_KEY
#endif

View File

@ -688,7 +688,10 @@ int wc_CryptKey(const char* password, int passwordSz, byte* salt,
}
}
if (key != NULL) {
#ifdef WOLFSSL_SMALL_STACK
if (key != NULL)
#endif
{
ForceZero(key, PKCS_MAX_KEY_SIZE);
#ifdef WOLFSSL_SMALL_STACK
XFREE(key, NULL, DYNAMIC_TYPE_TMP_BUFFER);