Skip to content

Commit 2406fe8

Browse files
manoloddManuel Domínguez Dorado
and
Manuel Domínguez Dorado
authored
Adds the method setSSLVersions() also to WiFiClientSecure in order to use that new feature. (#7925)
Co-authored-by: Manuel Domínguez Dorado <[email protected]>
1 parent 7475ba7 commit 2406fe8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.h

+4
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,10 @@ class WiFiClientSecure : public WiFiClient {
304304
bool setCiphers(const std::vector<uint16_t> list) { return _ctx->setCiphers(list); }
305305
bool setCiphersLessSecure() { return _ctx->setCiphersLessSecure(); } // Only use the limited set of RSA ciphers without EC
306306

307+
// Limit the TLS versions BearSSL will connect with. Default is
308+
// BR_TLS10...BR_TLS12. Allowed values are: BR_TLS10, BR_TLS11, BR_TLS12
309+
bool setSSLVersion(uint32_t min = BR_TLS10, uint32_t max = BR_TLS12) { return _ctx->setSSLVersion(min, max); };
310+
307311
// Check for Maximum Fragment Length support for given len before connection (possibly insecure)
308312
static bool probeMaxFragmentLength(IPAddress ip, uint16_t port, uint16_t len);
309313
static bool probeMaxFragmentLength(const char *hostname, uint16_t port, uint16_t len);

0 commit comments

Comments
 (0)