From d44e050339d46b849a7fb7d92c185a12df7ad7e8 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Sat, 12 Feb 2022 00:45:21 +0100 Subject: [PATCH] get_version_number documentation: explicitly mention VERSION_UNKNOWN Signed-off-by: Gilles Peskine --- include/mbedtls/ssl.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index a4d0dde0c7..a2b4cdd242 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -4088,6 +4088,10 @@ const char *mbedtls_ssl_get_ciphersuite( const mbedtls_ssl_context *ssl ); * \brief Return the (D)TLS protocol version negotiated in the * given connection. * + * \note If you call this function too early during the initial + * handshake, before the two sides have agreed on a version, + * this function returns #MBEDTLS_SSL_VERSION_UNKNOWN. + * * \param ssl The SSL context to query. * \return The negotiated protocol version. */