Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ bool WiFiClientSecure::_clientConnected() {
}

uint8_t WiFiClientSecure::connected() {
if (available() || (_clientConnected() && _handshake_done)) {
if (available() || (_clientConnected() && _handshake_done && (br_ssl_engine_current_state(_eng) != BR_SSL_CLOSED))) {
return true;
}
return false;
Expand Down Expand Up @@ -1003,6 +1003,12 @@ bool WiFiClientSecure::_connectSSL(const char* hostName) {
DEBUG_BSSL("Connected!\n");
}
#endif

// Session is already validated here, there is no need to keep following
_x509_minimal = nullptr;
_x509_insecure = nullptr;
_x509_knownkey = nullptr;

return ret;
}

Expand Down