1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-20 21:01:25 +03:00

Fix uninitted class variables from #7464 (#7478)

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.
This commit is contained in:
Earle F. Philhower, III
2020-07-22 22:10:44 -07:00
committed by GitHub
parent c94d36d80e
commit f42cf7a5a4

View File

@ -105,6 +105,9 @@ WiFiClientSecure::WiFiClientSecure() : WiFiClient() {
_clear(); _clear();
_clearAuthenticationSettings(); _clearAuthenticationSettings();
_certStore = nullptr; // Don't want to remove cert store on a clear, should be long lived _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(); stack_thunk_add_ref();
} }