Skip to content

Commit ae812f2

Browse files
committed
Drop X509 context after successful server verification to save heap space
1 parent 0ab76fc commit ae812f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,12 @@ bool WiFiClientSecure::_connectSSL(const char* hostName) {
10031003
DEBUG_BSSL("Connected!\n");
10041004
}
10051005
#endif
1006+
1007+
// Session is already validated here, there is no need to keep following
1008+
_x509_minimal = nullptr;
1009+
_x509_insecure = nullptr;
1010+
_x509_knownkey = nullptr;
1011+
10061012
return ret;
10071013
}
10081014

0 commit comments

Comments
 (0)