Skip to content

Commit cd43337

Browse files
earlephilhowerdevyte
authored andcommitted
Fix connection options and update github pubkey (#5120)
As part of the "clear connection configuration for reused objects" patch, a ::stop would reset the self-signed, trust anchors, etc. WiFiClient, unfortunately, calls ::stop as part of the connection process, so all of these settings were lost. Now only clear the connection settings on ::stop if we've already been connected. Also update the github public key which changed yet again. Fixes #5086
1 parent 991d738 commit cd43337

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

libraries/ESP8266WiFi/examples/BearSSL_Validation/BearSSL_Validation.ino

+7-7
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ able to establish communications.
131131
// Extracted by: openssl x509 -pubkey -noout -in servercert.pem
132132
static const char pubkey[] PROGMEM = R"KEY(
133133
-----BEGIN PUBLIC KEY-----
134-
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqcCPMEktuxLoDAxdHQgI
135-
95FweH4Fa6+LslU2qmmUBF+pu4ZOUvpIQxVU5wqdWaxZauxG1nYUTrAWdPb1n0um
136-
gLsGE7WYXJnQPJewIK4Qhua0LsrirIdHkcwHQ83NEYj+lswhg0fUQURt06Uta5ak
137-
LovDdJPLqTuTS/nshOa76hR0ouWnrqucLL1szcvX/obB+Nsbmr58Mrg8prQfRoK6
138-
ibzlZysV88qPcCpc57lq6QBKQ2F9WgQMssQigXfTNm8lAAQ+L6gCZngd4KfHYPSJ
139-
YA07oFWmuSOalgh00Wh8PUjuRGrcNxWpmgfALQHHFYgoDcD+a8+GoJk+GdJd3ong
140-
ZQIDAQAB
134+
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy+3Up8qBkIn/7S9AfWlH
135+
Od8SdXmnWx+JCIHvnWzjFcLeLvQb2rMqqCDL5XDlvkyC5SZ8ZyLITemej5aJYuBv
136+
zcKPzyZ0QfYZiskU9nzL2qBQj8alzJJ/Cc32AWuuWrPrzVxBmOEW9gRCGFCD3m0z
137+
53y6GjcmBS2wcX7RagqbD7g2frEGko4G7kmW96H6dyh2j9Rou8TwAK6CnbiXPAM/
138+
5Q6dyfdYlHOCgP75F7hhdKB5gpprm9A/OnQsmZjUPzy4u0EKCxE8MfhBerZrZdod
139+
88ZdDG3CvTgm050bc+lGlbsT+s09lp0dgxSZIeI8+syV2Owt4YF/PdjeeymtzQdI
140+
wQIDAQAB
141141
-----END PUBLIC KEY-----
142142
)KEY";
143143
BearSSL::WiFiClientSecure client;

libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,10 @@ void WiFiClientSecure::stop() {
179179
_client->abort();
180180
}
181181
WiFiClient::stop();
182-
_clearAuthenticationSettings();
182+
// Only if we've already connected, clear the connection options
183+
if (_handshake_done) {
184+
_clearAuthenticationSettings();
185+
}
183186
_freeSSL();
184187
}
185188

0 commit comments

Comments
 (0)