gtpc1m5yTransmission Control Protocol/Internet Protocol

SSL_get_version

The SSL_get_version function returns the protocol version of the current Secure Sockets Layer (SSL) connection.

Format

#include <openssl/ssl.h>
const char * SSL_get_version(SSL *ssl)
 

ssl
A pointer to a token returned on the SSL_new call

Normal Return

Returns a character pointer to the name of the protocol version in use. Possible values are:

SSLv2
SSL version 2

SSLv3
SSL version 3

TLSv1
TLS version 1

Error Return

If the SSL session has not been started, it returns a pointer to the character string (NONE).

Programming Considerations

Issue this call only after the SSL handshake has been completed.

Examples

For sample SSL applications, go to http://www.ibm.com/tpf/pubs/tpfpubs.htm, click SSL for the TPF 4.1 System: An Online User's Guide, and click Examples from the left navigation bar.

Related Information

SSL_new.