Skip to content

Commit 811e8c1

Browse files
author
pfchen
committed
[fix][mbedtls]fix https not set SNI issue
1 parent a7dc0d7 commit 811e8c1

File tree

1 file changed

+3
-1
lines changed
  • examples/wifi/sta/wifi_https/https/src

1 file changed

+3
-1
lines changed

examples/wifi/sta/wifi_https/https/src/https.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,9 @@ int32_t bl_TcpSslConnect(const char *dst, uint16_t port)
200200
printf("mbedtls_ssl_setup returned -0x%x\r\n", -ret);
201201
return BL_TCP_CREATE_CONNECT_ERR;
202202
}
203-
203+
#ifdef MBEDTLS_SSL_SERVER_NAME_INDICATION
204+
mbedtls_ssl_set_hostname(&bl_hsbuf->ssl, dst);
205+
#endif
204206
mbedtls_net_init(&bl_hsbuf->server_fd);
205207

206208
bl_hsbuf->server_fd.fd = socket(AF_INET, SOCK_STREAM, 0);

0 commit comments

Comments
 (0)