@@ -127,7 +127,7 @@ int WiFiClientSecure::connect(const char *host, uint16_t port, const char *CA_ce
127127 if (_timeout > 0 ){
128128 sslclient->handshake_timeout = _timeout;
129129 }
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 );
131131 _lastError = ret;
132132 if (ret < 0 ) {
133133 log_e (" start_ssl_client: %d" , ret);
@@ -147,7 +147,7 @@ int WiFiClientSecure::connect(const char *host, uint16_t port, const char *pskId
147147 if (_timeout > 0 ){
148148 sslclient->handshake_timeout = _timeout;
149149 }
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 );
151151 _lastError = ret;
152152 if (ret < 0 ) {
153153 log_e (" start_ssl_client: %d" , ret);
@@ -341,3 +341,8 @@ void WiFiClientSecure::setHandshakeTimeout(unsigned long handshake_timeout)
341341{
342342 sslclient->handshake_timeout = handshake_timeout * 1000 ;
343343}
344+
345+ void WiFiClientSecure::setAlpnProtocols (const char **alpn_protos)
346+ {
347+ _alpn_protos = alpn_protos;
348+ }
0 commit comments