SSL_SET_TMP_RSA_CALLBACK(3ssl)

πŸ“¦ version 4.1.0, in opensuse-leap 16.0

πŸ’… SSL_CTX_SET_TMP_RSA_CALL(3) β€” like, the Library Functions Manual edition πŸŽ€

okay so bestie, gather round, because this one is a ride. This page lives in the Library Functions Manual, and it's about a whole little family of RSA key-exchange functions that are, and I say this with love, completely over. πŸ’€


✨ NAME ✨

SSL_CTX_set_tmp_rsa_callback, SSL_CTX_set_tmp_rsa, SSL_CTX_need_tmp_RSA, SSL_set_tmp_rsa_callback, SSL_set_tmp_rsa, SSL_need_tmp_RSA β€” the gang that used to handle RSA keys for ephemeral key exchange πŸ¦‹


🌸 SYNOPSIS 🌸

#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, the signatures are exactly like that, don't come for me, I just report what the page says πŸ’–)


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜• β€” these functions mattered only for deliberately insecure RSA authentication that was mandated by historical U.S. export restrictions. Like, the government said "you may only ship the weak one" and everyone had to nod and smile. πŸ™ˆ That era is gone, and so is the point of these functions.

So: they are all deprecated and they have no effect, with one tiny dramatic exception β€” 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. not them being messy on main 😭

bestie, real talk: don't use these. they're deprecated, they do nothing, and four of them will literally yell at you. the vibe check is failed, the energy is not main character. ✨

πŸ‘‘ RETURN VALUES πŸ‘‘

These functions always return 0, indicating failure. Every time. No cap. Not even a little success arc. πŸ’€


🌈 SEE ALSO 🌈

go read those, they're giving much more useful energy fr fr 🫢


⭐ HISTORY ⭐

So the timeline is literally:

  1. 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. ancient. iconic. vintage. 🏺
  2. 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. also ancient, slightly later. πŸŽ€

and that's the whole page!! mwah πŸ’‹ this lil rewrite was brought to you by Debian, dated March 29, 2022, and the original page signs off as SSL_CTX_SET_TMP_RSA_CALLBACK(3). slay, stay safe, don't call deprecated functions πŸ’œβœ¨

πŸ“¦ where this page comes from