From ff704663dd95053cb1cdf4af37d2908c176b6510 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Fri, 6 Sep 2019 14:09:56 -0700 Subject: [PATCH] Fix a bug with the AES support. AES keys weren't set if only AES-CBC or AES-CTR were enabled. Changed the AND comparison to OR. --- src/internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index d3083fc..7108c6c 100644 --- a/src/internal.c +++ b/src/internal.c @@ -6247,7 +6247,7 @@ int SendNewKeys(WOLFSSH* ssh) #ifdef WOLFSSL_AES_COUNTER case ID_AES128_CTR: #endif -#if defined(HAVE_AES_CBC) && defined(WOLFSSL_AES_COUNTER) +#if defined(HAVE_AES_CBC) || defined(WOLFSSL_AES_COUNTER) WLOG(WS_LOG_DEBUG, "SNK: using cipher aes128-cbc/ctr"); ret = wc_AesSetKey(&ssh->encryptCipher.aes, ssh->keys.encKey, ssh->keys.encKeySz,