SSL_get_version.3ssl man page

SSL_get_version, SSL_is_dtls — get the protocol information of a connection

Synopsis

 #include <openssl/ssl.h>

 const char *SSL_get_version(const SSL *ssl);

 int SSL_is_dtls(const SSL *ssl);

Description

SSL_get_version() returns the name of the protocol used for the connection ssl.

SSL_is_dtls() returns one if the connection is using DTLS, zero if not.

Return Values

SSL_get_version() returns one of the following strings:

SSLv3

The connection uses the SSLv3 protocol.

TLSv1

The connection uses the TLSv1.0 protocol.

TLSv1.1

The connection uses the TLSv1.1 protocol.

TLSv1.2

The connection uses the TLSv1.2 protocol.

unknown

This indicates that no version has been set (no connection established).

See Also

ssl(3)

History

SSL_is_dtls() was added in OpenSSL 1.1.0.

Referenced By

ssl.3ssl(3), ssl.7ssl(7), SSL_CTX_set_generate_session_id.3ssl(3).

2017-11-02 1.1.0g OpenSSL