RSA_NEW(3ossl)
π RSA_NEW(3ossl) π
okay bestie, welcome to the RSA_new page from the OpenSSL manuals π this one's a lil vintage-coded ngl, but we're gonna get through it together, hand in hand π«Ά
β¨ NAME β¨
RSA_new, RSA_free β allocate and free RSA objects π
πΈ SYNOPSIS πΈ
#include <openssl/rsa.h>
so like, fair warning: the following functions have been deprecated since OpenSSL 3.0, and you can hide them entirely by defining OPENSSL_API_COMPAT with a suitable version value β check out openssl_user_macros(7) for the deets π
RSA *RSA_new(void);
void RSA_free(RSA *rsa);
π¦ DESCRIPTION π¦
RSA_new() allocates and initializes an RSA structure. It's literally equivalent to calling RSA_new_method(NULL) β same thing, no cap β¨
RSA_free() frees the RSA structure and all its components. and bestie, listen β the key is erased before the memory gets handed back to the system π§Ήπ so your secrets aren't just vibing in freed memory, periodt. If rsa is NULL, nothing happens. literally nothing. it just moves on with its day π
π RETURN VALUES π
If the allocation fails, RSA_new() returns NULL and sets an error code that you can grab with ERR_get_error(3) π Otherwise it returns a pointer to the newly allocated structure β slay π
RSA_free() returns no value. it's a void girlie. gives nothing, takes nothing π
π₯ SEE ALSO π₯
β HISTORY β
All functions described here were deprecated in OpenSSL 3.0 π For a replacement, see EVP_PKEY-RSA(7) β that's the main character now π
π COPYRIGHT π
Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
and that's the whole page bestie, we ate and left no crumbs π this was version 3.5.9, dated 2026-09-29, brought to you by the RSA_NEW(3ossl) girlies themselves π mwah, ily, go call EVP_PKEY-RSA(7) instead πβ¨
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms