libressl-SSL_CTX_set_tmp_rsa_callback(3)

libressl-SSL_CTX_set_tmp_rsa_callback3

Handle rsa keys for ephemeral key exchange

Usage

SSL Library (libssl, -lssl) libcrypto

#include <openssl/ssl.h>

void

SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx, RSA *(*tmp_rsa_callback)(SSL *ssl, int is_export, int keylength));

long

SSL_CTX_set_tmp_rsa(SSL_CTX *ctx, RSA *rsa);

long

SSL_CTX_need_tmp_RSA(SSL_CTX *ctx);

void

SSL_set_tmp_rsa_callback(SSL_CTX *ctx, RSA *(*tmp_rsa_callback)(SSL *ssl, int is_export, int keylength));

long

SSL_set_tmp_rsa(SSL *ssl, RSA *rsa);

long

SSL_need_tmp_RSA(SSL *ssl);

Overview

Since they mattered only for deliberately insecure RSA authentication mandated by historical U.S. export restrictions, these functions are all deprecated and have no effect except that SSL_CTX_set_tmp_rsa_callback(), SSL_CTX_set_tmp_rsa(), SSL_set_tmp_rsa_callback(), and SSL_set_tmp_rsa() issue error messages when called.

Return values

These functions always return 0, indicating failure.

History

SSL_CTX_set_tmp_rsa_callback(), SSL_CTX_set_tmp_rsa(), and SSL_CTX_need_tmp_RSA() first appeared in SSLeay 0.8.0 and have been available since OpenBSD 2.4.

SSL_set_tmp_rsa_callback(), SSL_set_tmp_rsa(), and SSL_need_tmp_RSA() first appeared in OpenSSL 0.9.2b and have been available since OpenBSD 2.6.

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