SSL_get_version - get the protocol version of a connection.
#include <openssl/ssl.h> const char *SSL_get_version(const SSL *ssl);
SSL_get_version(3openssl) OpenSSL SSL_get_version(3openssl) NAME SSL_get_version - get the protocol version of a connection. SYNOPSIS #include <openssl/ssl.h> const char *SSL_get_version(const SSL *ssl); DESCRIPTION SSL_get_version() returns the name of the protocol used for the connection ssl. It should only be called after the initial handshake has been completed. Prior to that the results returned from this function may be unreliable. RETURN VALUES The following strings can be returned: 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 an unknown protocol version. ATTRIBUTES See attributes(7) for descriptions of the following attributes: +---------------+--------------------------+ |ATTRIBUTE TYPE | ATTRIBUTE VALUE | +---------------+--------------------------+ |Availability | library/security/openssl | +---------------+--------------------------+ |Stability | Pass-through uncommitted | +---------------+--------------------------+ SEE ALSO ssl(3) NOTES Source code for open source software components in Oracle Solaris can be found at https://www.oracle.com/downloads/opensource/solaris-source- code-downloads.html. This software was built from source available at https://github.com/oracle/solaris-userland. The original community source was downloaded from https://www.openssl.org/source/openssl-1.0.2ze.tar.gz. Further information about this software can be found on the open source community website at https://www.openssl.org/. 1.0.2ze 2022-06-28 SSL_get_version(3openssl)