Skip to content

Commit e84612f

Browse files
committed
Merge branch 'feature/add_domain_name_check' into 'master'
esp_tls_wolfssl: Add domain name check See merge request sdk/ESP8266_RTOS_SDK!1600
2 parents c2eb86b + 3e92464 commit e84612f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/esp-tls/esp_tls_wolfssl.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ static esp_err_t set_client_config(const char *hostname, size_t hostlen, esp_tls
247247
return ESP_ERR_NO_MEM;
248248
}
249249
/* Hostname set here should match CN in server certificate */
250-
if ((ret = wolfSSL_set_tlsext_host_name( (WOLFSSL *)tls->priv_ssl, use_host))!= WOLFSSL_SUCCESS) {
251-
ESP_LOGE(TAG, "wolfSSL_set_tlsext_host_name returned -0x%x", -ret);
250+
if ((ret = wolfSSL_check_domain_name( (WOLFSSL *)tls->priv_ssl, use_host))!= WOLFSSL_SUCCESS) {
251+
ESP_LOGE(TAG, "wolfSSL_check_domain_name returned -0x%x", -ret);
252252
ESP_INT_EVENT_TRACKER_CAPTURE(tls->error_handle, ERR_TYPE_WOLFSSL, -ret);
253253
free(use_host);
254254
return ESP_ERR_WOLFSSL_SSL_SET_HOSTNAME_FAILED;

0 commit comments

Comments
 (0)