From adfc28d7d8a8c97ecfc8aed0a5fff66e4e61c3c5 Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Thu, 8 Aug 2019 21:54:59 -0700 Subject: [PATCH] Fix basic SSL server definitions (#6402) A typo was present in several ifdefs which would allow a server to negotiate an EC connection even when in basic SSL mode. When this happened, a crash would occur (since there were no EC or advanced AES modes installed). Fix the typo, fixes #6397 --- libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp b/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp index 5691f1cf5..c5a09cedb 100644 --- a/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp +++ b/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp @@ -819,7 +819,7 @@ extern "C" { BR_TLS_RSA_WITH_3DES_EDE_CBC_SHA #endif }; -#ifndef BEARSSL_BASIC +#ifndef BEARSSL_SSL_BASIC // Server w/EC has one set, not possible with basic SSL config static const uint16_t suites_server_ec_P [] PROGMEM = { BR_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, @@ -852,7 +852,7 @@ extern "C" { #endif static const uint16_t suites_server_rsa_P[] PROGMEM = { -#ifndef BEARSSL_BASIC +#ifndef BEARSSL_SSL_BASIC BR_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, BR_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, BR_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, @@ -871,7 +871,7 @@ extern "C" { BR_TLS_RSA_WITH_AES_256_CBC_SHA256, BR_TLS_RSA_WITH_AES_128_CBC_SHA, BR_TLS_RSA_WITH_AES_256_CBC_SHA, -#ifndef BEARSSL_BASIC +#ifndef BEARSSL_SSL_BASIC BR_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, BR_TLS_RSA_WITH_3DES_EDE_CBC_SHA #endif