From ed74febf597117054119c755ac7e8aabcc0281ae Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Wed, 22 Jul 2020 20:26:59 -0700 Subject: [PATCH] Fix uninitted class variables from #7464 PR #7464 removed the reset of client authentication settings when server authentication settings were changed, however it never did initialize the client authentication information to nullptr in the constructor. This can result in crashes during connections when client certs are not applied. Fix by resetting the client authenticaion variables on object construction. --- libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp b/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp index 89621b3671..c94ac79e0f 100644 --- a/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp +++ b/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp @@ -105,6 +105,9 @@ WiFiClientSecure::WiFiClientSecure() : WiFiClient() { _clear(); _clearAuthenticationSettings(); _certStore = nullptr; // Don't want to remove cert store on a clear, should be long lived + _sk = nullptr; + _axtls_chain = nullptr; + _axtls_sk = nullptr; stack_thunk_add_ref(); }