---
name: "libressl-SSL_CTX_set_tmp_rsa_callback"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-SSL_CTX_set_tmp_rsa_callback"
---

# libressl-SSL\_CTX\_set\_tmp\_rsa\_callback(3)

handle RSA keys for ephemeral key exchange

## 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** – handle RSA keys for ephemeral key exchange

## SYNOPSIS

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*);

## DESCRIPTION

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.

## SEE ALSO

[ssl(3)](/ssl/3.md), 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)

## 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.
