mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-24 05:00:45 -04:00
Call mbedtls_ssl_set_hostname in the generic endpoint setup in unit tests
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
2c33c75725
commit
1f6864b174
@ -855,6 +855,10 @@ int mbedtls_test_ssl_endpoint_init(
|
||||
ret = mbedtls_ssl_setup(&(ep->ssl), &(ep->conf));
|
||||
TEST_ASSERT(ret == 0);
|
||||
|
||||
if (MBEDTLS_SSL_IS_CLIENT == endpoint_type) {
|
||||
ret = mbedtls_ssl_set_hostname(&(ep->ssl), "localhost");
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_SSL_PROTO_DTLS) && defined(MBEDTLS_SSL_SRV_C)
|
||||
if (endpoint_type == MBEDTLS_SSL_IS_SERVER && dtls_context != NULL) {
|
||||
mbedtls_ssl_conf_dtls_cookies(&(ep->conf), NULL, NULL, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user