5 SSL_client_version, SSL_get_version, SSL_is_dtls, SSL_version - get the
6 protocol information of a connection
10 #include <openssl/ssl.h>
12 int SSL_client_version(const SSL *s);
14 const char *SSL_get_version(const SSL *ssl);
16 int SSL_is_dtls(const SSL *ssl);
18 int SSL_version(const SSL *s);
22 SSL_client_version() returns the protocol version used by the client when
23 initiating the connection.
25 SSL_get_version() returns the name of the protocol used for the
28 SSL_is_dtls() returns one if the connection is using DTLS, zero if not.
30 SSL_version() returns the protocol version used for the connection.
34 SSL_get_version() returns one of the following strings:
40 The connection uses the SSLv3 protocol.
44 The connection uses the TLSv1.0 protocol.
48 The connection uses the TLSv1.1 protocol.
52 The connection uses the TLSv1.2 protocol.
56 The connection uses the TLSv1.3 protocol.
60 This indicates that no version has been set (no connection established).
64 SSL_version() and SSL_client_version() return an integer which could include any of
71 The connection uses the SSLv3 protocol.
75 The connection uses the TLSv1.0 protocol.
79 The connection uses the TLSv1.1 protocol.
83 The connection uses the TLSv1.2 protocol.
87 The connection uses the TLSv1.3 protocol.
95 SSL_is_dtls() was added in OpenSSL 1.1.0.
99 Copyright 2001-2017 The OpenSSL Project Authors. All Rights Reserved.
101 Licensed under the OpenSSL license (the "License"). You may not use
102 this file except in compliance with the License. You can obtain a copy
103 in the file LICENSE in the source distribution or at
104 L<https://www.openssl.org/source/license.html>.