From 520ceb27266ab021b1689183b5bc81f0088c220c Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 12 Feb 2025 23:35:54 +0100 Subject: [PATCH] Update the documentation of ssl->hostname Signed-off-by: Gilles Peskine --- include/mbedtls/ssl.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index 9cdf3a3ebb..a18edbbca0 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -1403,8 +1403,14 @@ struct mbedtls_ssl_context { * User settings */ #if defined(MBEDTLS_X509_CRT_PARSE_C) - char *hostname; /*!< expected peer CN for verification - (and SNI if available) */ + /** Expected peer CN for verification. + * + * Also used on clients for SNI. + * + * If this is \p NULL, the peer name verification is skipped, and + * the server_name extension is not sent. + */ + char *hostname; #endif /* MBEDTLS_X509_CRT_PARSE_C */ #if defined(MBEDTLS_SSL_ALPN)