@@ -127,7 +127,7 @@ int WiFiClientSecure::connect(const char *host, uint16_t port, const char *CA_ce
127
127
if (_timeout > 0 ){
128
128
sslclient->handshake_timeout = _timeout;
129
129
}
130
- int ret = start_ssl_client (sslclient, host, port, _timeout, CA_cert, cert, private_key, NULL , NULL , _use_insecure);
130
+ int ret = start_ssl_client (sslclient, host, port, _timeout, CA_cert, cert, private_key, NULL , NULL , _use_insecure, _alpn_protos );
131
131
_lastError = ret;
132
132
if (ret < 0 ) {
133
133
log_e (" start_ssl_client: %d" , ret);
@@ -147,7 +147,7 @@ int WiFiClientSecure::connect(const char *host, uint16_t port, const char *pskId
147
147
if (_timeout > 0 ){
148
148
sslclient->handshake_timeout = _timeout;
149
149
}
150
- int ret = start_ssl_client (sslclient, host, port, _timeout, NULL , NULL , NULL , pskIdent, psKey, _use_insecure);
150
+ int ret = start_ssl_client (sslclient, host, port, _timeout, NULL , NULL , NULL , pskIdent, psKey, _use_insecure, _alpn_protos );
151
151
_lastError = ret;
152
152
if (ret < 0 ) {
153
153
log_e (" start_ssl_client: %d" , ret);
@@ -341,3 +341,8 @@ void WiFiClientSecure::setHandshakeTimeout(unsigned long handshake_timeout)
341
341
{
342
342
sslclient->handshake_timeout = handshake_timeout * 1000 ;
343
343
}
344
+
345
+ void WiFiClientSecure::setAlpnProtocols (const char **alpn_protos)
346
+ {
347
+ _alpn_protos = alpn_protos;
348
+ }
0 commit comments