Merge branch 'bugfix/fix_use_wolfssl_build_error' into 'master'

fix(tls): wolfSSL_set_tlsext_host_name function not support in wolfssl lib in...

See merge request sdk/ESP8266_RTOS_SDK!1348
This commit is contained in:
Dong Heng
2020-03-31 13:37:46 +08:00

View File

@ -231,6 +231,7 @@ static esp_err_t set_client_config(const char *hostname, size_t hostlen, esp_tls
}
if (!cfg->skip_common_name) {
#ifdef HAVE_SNI
char *use_host = NULL;
if (cfg->common_name != NULL) {
use_host = strdup(cfg->common_name);
@ -248,6 +249,7 @@ static esp_err_t set_client_config(const char *hostname, size_t hostlen, esp_tls
return ESP_ERR_WOLFSSL_SSL_SET_HOSTNAME_FAILED;
}
free(use_host);
#endif /* HAVE_SNI */
}
if (cfg->alpn_protos) {