Allow HTTPClient to access HTTPS without providing a certificate

This commit is contained in:
me-no-dev 2017-09-28 20:19:23 +08:00
parent af35773d65
commit 4230aeca83

View File

@ -107,14 +107,10 @@ bool HTTPClient::begin(String url, const char* CAcert)
{
_transportTraits.reset(nullptr);
_port = 443;
if (strlen(CAcert) == 0) {
return false;
}
if (!beginInternal(url, "https")) {
return false;
}
_transportTraits = TransportTraitsPtr(new TLSTraits(CAcert));
//log_d("[HTTP-Client][begin] CAcert: %s", CAcert.c_str());
return true;
}