gtpc1m5tTransmission Control Protocol/Internet Protocol

SSL_get_cipher

The SSL_get_cipher function returns the name of the cipher associated with a specific Secure Sockets Layer (SSL) session.

Format

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

ssl
A pointer to a token returned on the SSL_new call.

Normal Return

Returns a pointer to the cipher name. Possible values are:

NULL-MD5
No data encryption; MD5 for message integrity.

NULL-SHA
No data encryption; SHA for message integrity.

EXP-RC4-MD5
Export RC4 (40-bit key) for data encryption; MD5 for message integrity.

RC4-MD5
RC4 (128-bit key) for data encryption; MD5 for message integrity.

RC4-SHA
RC4 (128-bit key) for data encryption; SHA for message integrity.

EXP-RC2-CBC-MD5
Export RC2 (40-bit key) for data encryption; MD5 for message integrity.

EXP-RC4-MD5
Export RC4 (40-bit key) for data encryption; MD5 for message integrity.

EXP-DES-CBC-SHA
Export DES (40-bit key) for data encryption; SHA for message integrity.

DES-CBC3-SHA
Triple-DES (168-bit key) for data encryption; SHA for message integrity.

DES-CBC-MD5
DES (56-bit key) for data encryption; MD5 for message integrity.

DES-CBC3-MD5
Triple-DES (168-bit key) for data encryption; MD5 for message integrity.

RC2-CBC-MD5
RC2 (128-bit key) for data encryption; MD5 for message integrity.

Error Return

Returns a pointer to the text string unknown.

Programming Considerations

The SSL session must be started before this function is issued, which means that the SSL_connect and SSL_accept functions must be issued before this function is issued.

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