From 91427a1695bb753fc600713810ef117b9826adf6 Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Fri, 17 Jul 2020 14:02:17 -0700 Subject: [PATCH] Keep client certs when server authentication set (#7464) 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 773f68cfd..89621b367 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; }