Skip to content

ESP8266HTTPClient: optionally skip validation when using https #3933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
8 changes: 8 additions & 0 deletions libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ class TLSTraits : public TransportTraits

bool verify(WiFiClient& client, const char* host) override
{
//
// Treat '*' (a.k.a. wildcard) as skip validation, anything is valid
//
if (_fingerprint == "*")
{
return true;
}

auto wcs = static_cast<WiFiClientSecure&>(client);
return wcs.verify(_fingerprint.c_str(), host);
}
Expand Down