mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-18 12:55:21 +00:00
Make function mbedtls_ssl_set_hostname(...) as optional
Now function mbedtls_ssl_set_hostname is compile-time configurable in config.h with define MBEDTLS_X509_REMOVE_HOSTNAME_VERIFICATION. This affects to many x509 API's. See config.h for details.
This commit is contained in:
parent
f0f01e1f0a
commit
4009d8f377
23 changed files with 313 additions and 57 deletions
|
|
@ -2053,7 +2053,7 @@ int main( int argc, char *argv[] )
|
|||
goto exit;
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_X509_CRT_PARSE_C)
|
||||
#if defined(MBEDTLS_X509_CRT_PARSE_C) && !defined(MBEDTLS_X509_REMOVE_HOSTNAME_VERIFICATION)
|
||||
if( ( ret = mbedtls_ssl_set_hostname( &ssl, opt.server_name ) ) != 0 )
|
||||
{
|
||||
mbedtls_printf( " failed\n ! mbedtls_ssl_set_hostname returned %d\n\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue