Merge pull request #13449 from s-hadinger/fix_tls_revert

Roll back from #13435
This commit is contained in:
Theo Arends 2021-10-23 17:56:45 +02:00 committed by GitHub
commit f07f1bcf1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -303,7 +303,7 @@ int WiFiClientSecure_light::connect(IPAddress ip, uint16_t port, int32_t timeout
}
return _connectSSL(nullptr);
}
#endif // ESP32
#else // ESP32
int WiFiClientSecure_light::connect(IPAddress ip, uint16_t port) {
DEBUG_BSSL("connect(%s,%d)", ip.toString().c_str(), port);
clearLastError();
@ -313,6 +313,7 @@ int WiFiClientSecure_light::connect(IPAddress ip, uint16_t port) {
}
return _connectSSL(nullptr);
}
#endif
#ifdef ESP32
int WiFiClientSecure_light::connect(const char* name, uint16_t port, int32_t timeout) {
@ -333,7 +334,7 @@ int WiFiClientSecure_light::connect(const char* name, uint16_t port, int32_t tim
LOG_HEAP_SIZE("Before calling _connectSSL");
return _connectSSL(name);
}
#endif // ESP32
#else // ESP32
int WiFiClientSecure_light::connect(const char* name, uint16_t port) {
DEBUG_BSSL("connect(%s,%d)\n", name, port);
IPAddress remote_addr;
@ -352,6 +353,7 @@ int WiFiClientSecure_light::connect(const char* name, uint16_t port) {
LOG_HEAP_SIZE("Before calling _connectSSL");
return _connectSSL(name);
}
#endif
void WiFiClientSecure_light::_freeSSL() {
_ctx_present = false;

View File

@ -41,10 +41,11 @@ class WiFiClientSecure_light : public WiFiClient {
#ifdef ESP32 // the method to override in ESP32 has timeout argument
int connect(IPAddress ip, uint16_t port, int32_t timeout) override;
int connect(const char* name, uint16_t port, int32_t timeout) override;
#endif
#else
int connect(IPAddress ip, uint16_t port) override;
int connect(const char* name, uint16_t port) override;
#endif
uint8_t connected() override;
size_t write(const uint8_t *buf, size_t size) override;
#ifdef ESP8266