1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-26 23:22:21 +01:00

Add esp8266_disable_ssl_support: config option (#2236)

This commit is contained in:
Kamil Trzciński
2021-09-19 18:46:17 +02:00
committed by GitHub
parent f76685fccf
commit 30eca885c9
5 changed files with 15 additions and 0 deletions

View File

@@ -81,6 +81,7 @@ void HttpRequestComponent::send(const std::vector<HttpRequestResponseTrigger *>
#ifdef ARDUINO_ARCH_ESP8266
std::shared_ptr<WiFiClient> HttpRequestComponent::get_wifi_client_() {
#ifdef USE_HTTP_REQUEST_ESP8266_HTTPS
if (this->secure_) {
if (this->wifi_client_secure_ == nullptr) {
this->wifi_client_secure_ = std::make_shared<BearSSL::WiFiClientSecure>();
@@ -89,6 +90,7 @@ std::shared_ptr<WiFiClient> HttpRequestComponent::get_wifi_client_() {
}
return this->wifi_client_secure_;
}
#endif
if (this->wifi_client_ == nullptr) {
this->wifi_client_ = std::make_shared<WiFiClient>();