From fcd789dad40711f5fb2c5a389e4718838f5fd1d8 Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Thu, 16 Jul 2020 20:46:28 -0700 Subject: [PATCH] Keep client certs when server authentication set WiFiClientSecure.setInsecure() was clearing the secret key (but not the _chain public client cert) incorrectly. The other server authentication modes also had the same effect. The only way for it to work would be if the app first set the server authentication method and then the client keys. There's no good reason for this. Adjust the connection to only clear the server id methods and leave the client ID untouched. Fixes #7455 --- libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp b/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp index 773f68cfdc..89621b3671 100644 --- a/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp +++ b/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp @@ -96,11 +96,8 @@ void WiFiClientSecure::_clearAuthenticationSettings() { _use_fingerprint = false; _use_self_signed = false; _knownkey = nullptr; - _sk = nullptr; _ta = nullptr; _axtls_ta = nullptr; - _axtls_chain = nullptr; - _axtls_sk = nullptr; }