SSL_SESSION_GET0_CIPHER(3)

NAME
SSL_SESSION_get0_cipher - retrieve the SSL cipher associated with a session

SYNOPSIS
#include <openssl/ssl.h>
const SSL_CIPHER *
SSL_SESSION_get0_cipher(const SSL_SESSION *session);

DESCRIPTION
SSL_SESSION_get0_cipher() retrieves the cipher that was used by the connection when the session was created, or NULL if it cannot be determined.

The value returned is a pointer to an object maintained within session and should not be released.

RETURN VALUES
SSL_SESSION_get0_cipher() returns the SSL_CIPHER associated with session or NULL if it cannot be determined.

SEE ALSO
ssl(3), SSL_CIPHER_get_name(3), SSL_get_current_cipher(3), SSL_get_session(3), SSL_SESSION_new(3)

HISTORY
The SSL_SESSION_get0_cipher() function first appeared in OpenSSL 1.1.0 and has been available since OpenBSD 7.0.