xref: /freebsd/crypto/openssl/doc/man3/RSA_new.pod (revision b077aed3)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5e71b7053SJung-uk KimRSA_new, RSA_free - allocate and free RSA objects
6e71b7053SJung-uk Kim
7e71b7053SJung-uk Kim=head1 SYNOPSIS
8e71b7053SJung-uk Kim
9e71b7053SJung-uk Kim #include <openssl/rsa.h>
10e71b7053SJung-uk Kim
11*b077aed3SPierre ProncheryThe following functions have been deprecated since OpenSSL 3.0, and can be
12*b077aed3SPierre Proncheryhidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
13*b077aed3SPierre Proncherysee L<openssl_user_macros(7)>:
14*b077aed3SPierre Pronchery
15e71b7053SJung-uk Kim RSA *RSA_new(void);
16e71b7053SJung-uk Kim
17e71b7053SJung-uk Kim void RSA_free(RSA *rsa);
18e71b7053SJung-uk Kim
19e71b7053SJung-uk Kim=head1 DESCRIPTION
20e71b7053SJung-uk Kim
21e71b7053SJung-uk KimRSA_new() allocates and initializes an B<RSA> structure. It is equivalent to
22e71b7053SJung-uk Kimcalling RSA_new_method(NULL).
23e71b7053SJung-uk Kim
24e71b7053SJung-uk KimRSA_free() frees the B<RSA> structure and its components. The key is
25e71b7053SJung-uk Kimerased before the memory is returned to the system.
26e71b7053SJung-uk KimIf B<rsa> is NULL nothing is done.
27e71b7053SJung-uk Kim
28e71b7053SJung-uk Kim=head1 RETURN VALUES
29e71b7053SJung-uk Kim
30e71b7053SJung-uk KimIf the allocation fails, RSA_new() returns B<NULL> and sets an error
31e71b7053SJung-uk Kimcode that can be obtained by L<ERR_get_error(3)>. Otherwise it returns
32e71b7053SJung-uk Kima pointer to the newly allocated structure.
33e71b7053SJung-uk Kim
34e71b7053SJung-uk KimRSA_free() returns no value.
35e71b7053SJung-uk Kim
36e71b7053SJung-uk Kim=head1 SEE ALSO
37e71b7053SJung-uk Kim
38e71b7053SJung-uk KimL<ERR_get_error(3)>,
39e71b7053SJung-uk KimL<RSA_generate_key(3)>,
40e71b7053SJung-uk KimL<RSA_new_method(3)>
41e71b7053SJung-uk Kim
42*b077aed3SPierre Pronchery=head1 HISTORY
43*b077aed3SPierre Pronchery
44*b077aed3SPierre ProncheryAll functions described here were deprecated in OpenSSL 3.0.
45*b077aed3SPierre ProncheryFor replacement see EVP_PKEY-RSA(7).
46*b077aed3SPierre Pronchery
47e71b7053SJung-uk Kim=head1 COPYRIGHT
48e71b7053SJung-uk Kim
49*b077aed3SPierre ProncheryCopyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
50e71b7053SJung-uk Kim
51*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
52e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
53e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
54e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
55e71b7053SJung-uk Kim
56e71b7053SJung-uk Kim=cut
57