libressl-SSL_SESSION_get0_cipher(3)

libressl-SSL_SESSION_get0_cipher3

Retrieve the ssl cipher associated with a session

Usage

SSL Library (libssl, -lssl) libcrypto

#include <openssl/ssl.h>

const SSL_CIPHER *

SSL_SESSION_get0_cipher(const SSL_SESSION *session);

Overview

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.

History

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

From libressl 4.4.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's mdoc source.