From 189a140dddd9b21689178a6fe2e7ae3b7601da7d Mon Sep 17 00:00:00 2001 From: Ritesh Kudkelwar Date: Thu, 11 Sep 2025 10:08:34 +0530 Subject: [PATCH] doc: clarify SSL_SESSION_get0_hostname() DESCRIPTION MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Also refine RETURN VALUES. Reviewed-by: Viktor Dukhovni Reviewed-by: Saša Nedvědický Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/28393) (cherry picked from commit 32ec97521397597764f72d4e7c279c4e815352ee) --- doc/man3/SSL_SESSION_get0_hostname.pod | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/man3/SSL_SESSION_get0_hostname.pod b/doc/man3/SSL_SESSION_get0_hostname.pod index f7add16d7bd..0140deee9a5 100644 --- a/doc/man3/SSL_SESSION_get0_hostname.pod +++ b/doc/man3/SSL_SESSION_get0_hostname.pod @@ -23,9 +23,10 @@ SSL_SESSION_set1_alpn_selected =head1 DESCRIPTION -SSL_SESSION_get0_hostname() retrieves the SNI value that was sent by the -client when the session was created if it was accepted by the server. Otherwise -NULL is returned. +SSL_SESSION_get0_hostname() retrieves the Server Name Indication (SNI) value +that was sent by the client when the session was created if the server +acknowledged the client's SNI extension by including an empty SNI extension +in response. Otherwise NULL is returned. The value returned is a pointer to memory maintained within B and should not be free'd. @@ -44,8 +45,7 @@ B. =head1 RETURN VALUES -SSL_SESSION_get0_hostname() returns either a string or NULL based on if there -is the SNI value sent by client. +SSL_SESSION_get0_hostname() returns the SNI string if available, or NULL if not. SSL_SESSION_set1_hostname() returns 1 on success or 0 on error. -- 2.47.3