libressl-SSL_CTX_set_keylog_callback(3)

libressl-SSL_CTX_set_keylog_callback3

Set and get the unused key logging callback

Usage

SSL Library (libssl, -lssl) libcrypto

#include <openssl/ssl.h>

typedef void

(*SSL_CTX_keylog_cb_func)(const SSL *ssl, const char *line);

void

SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb);

SSL_CTX_keylog_cb_func

SSL_CTX_get_keylog_callback(const SSL_CTX *ctx);

Overview

SSL_CTX_set_keylog_callback() sets the TLS key logging callback. This callback is never called in LibreSSL.

SSL_CTX_get_keylog_callback() retrieves the previously set TLS key logging callback.

These functions are provided only for compatibility with OpenSSL.

Return values

SSL_CTX_get_keylog_callback() returns the previously set TLS key logging callback, or NULL if no callback has been set.

History

These functions first appeared in OpenSSL 1.1.1 and have been available since OpenBSD 7.1.

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