LIBRESSL-SSL_CTX_SET_TMP_RSA_CALLBACK(3)
π SSL_CTX_SET_TMP_RSA_CALL(3) β the libssl one, bestie
okay so real talk: this page lives in libssl, and honestly it's giving "vintage mall decoration that nobody's allowed to take down." Come learn about it with me β¨
π¦ SYNOPSIS
library βlibsslβ 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);
(yes, SSL_set_tmp_rsa_callback really does take an SSL_CTX *ctx up there β that's literally what it says, I'm not touching it π)
πΈ DESCRIPTION
okay so storytime: these functions are all deprecated, full stop. They only ever mattered for RSA authentication that was deliberately insecure, because the historical U.S. export restrictions literally mandated it. So likeβ¦ yeah. Not the vibe anymore. π
And here's the thing β they currently 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() will issue error messages when you call them. That's it. That's the whole personality. They yell at you and then do nothing. Weird flex but okay π«
if you were hoping to actually manage ephemeral RSA keys with these β nope. They're museum pieces. Don't call them in new code, periodt.
β¨ RETURN VALUES
These functions always return 0, indicating failure. Every single one. Zero rizz, zero success, just 0. π
π SEE ALSO
ssl(3)SSL_CTX_set_cipher_list(3)SSL_CTX_set_options(3)SSL_CTX_set_tmp_dh_callback(3)SSL_new(3)SSL_set_tmp_ecdh(3)
go read these instead, they're the main characters π
π HISTORY
SSL_CTX_set_tmp_rsa_callback(), SSL_CTX_set_tmp_rsa(), and SSL_CTX_need_tmp_RSA() β those three slayed their way into existence in SSLeay 0.8.0, and have been available since OpenBSD 2.4. iconic longevity honestly β
Then SSL_set_tmp_rsa_callback(), SSL_set_tmp_rsa(), and SSL_need_tmp_RSA() showed up later in OpenSSL 0.9.2b, available since OpenBSD 2.6. the sequel nobody asked for but we respect it π
and that's the whole page bestie π¦ this little artifact came out of the Debian build dated June 8, 2025, filed under SSL_CTX_SET_TMP_RSA_CALLBACK(3) β stay safe, stay deprecated, mwah π
π
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2001, 2006, 2013 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms