From 81c610d1ebb7eca7f28062dca27c448edf785361 Mon Sep 17 00:00:00 2001 From: tb Date: Thu, 15 Apr 2021 16:13:22 +0000 Subject: [PATCH] Merge documentation for SSL_is_dtls() from OpenSSL --- lib/libssl/man/SSL_get_version.3 | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/lib/libssl/man/SSL_get_version.3 b/lib/libssl/man/SSL_get_version.3 index 7935b75f920..a6cefb055b4 100644 --- a/lib/libssl/man/SSL_get_version.3 +++ b/lib/libssl/man/SSL_get_version.3 @@ -1,5 +1,5 @@ -.\" $OpenBSD: SSL_get_version.3,v 1.8 2021/03/31 18:03:13 tb Exp $ -.\" full merge up to: OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400 +.\" $OpenBSD: SSL_get_version.3,v 1.9 2021/04/15 16:13:22 tb Exp $ +.\" full merge up to: OpenSSL e417070c Jun 8 11:37:06 2016 -0400 .\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 .\" .\" This file was written by Lutz Jaenicke . @@ -49,11 +49,12 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED .\" OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: March 31 2021 $ +.Dd $Mdocdate: April 15 2021 $ .Dt SSL_GET_VERSION 3 .Os .Sh NAME .Nm SSL_get_version , +.Nm SSL_is_dtls , .Nm SSL_version .\" The following are intentionally undocumented because .\" - the longer term plan is to remove them @@ -61,25 +62,33 @@ .\" - and they have the wrong namespace prefix .\" Nm TLS1_get_version .\" Nm TLS1_get_client_version -.Nd get the protocol version of a connection +.Nd get the protocol information of a connection .Sh SYNOPSIS .In openssl/ssl.h .Ft const char * .Fn SSL_get_version "const SSL *ssl" .Ft int +.Fn SSL_is_dtls "const SSL *ssl" +.Ft int .Fn SSL_version "const SSL *ssl" .Sh DESCRIPTION .Fn SSL_get_version returns the name of the protocol used for the connection .Fa ssl . .Pp +.Fn SSL_is_dtls +returns 1 if the connection is using DTLS, 0 if not. +.Pp .Fn SSL_version returns an integer constant representing that protocol. .Pp These functions only return reliable results after the initial handshake has been completed. .Sh RETURN VALUES -The following strings or integers can be returned: +The following strings or integers can be returned by +.Fn SSL_get_version +and +.Fn SSL_version : .Bl -tag -width Ds .It Qo TLSv1 Qc No or Dv TLS1_VERSION The connection uses the TLSv1.0 protocol. @@ -97,6 +106,9 @@ The connection uses the Datagram Transport Layer Security 1.2 protocol. This indicates an unknown protocol version; it cannot currently happen with LibreSSL. .El +.Pp +.Fn SSL_is_dtls +returns 1 if the connection uses DTLS, 0 if not. .Sh SEE ALSO .Xr ssl 3 .Sh HISTORY @@ -105,3 +117,7 @@ and .Fn SSL_version first appeared in SSLeay 0.8.0 and have been available since .Ox 2.4 . +.Pp +.Fn SSL_is_dtls +first appeared in OpenSSL 1.1.0 and has been available since +.Ox 6.9 . -- 2.20.1