]>
Commit | Line | Data |
---|---|---|
2186cd8e UM |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
5 | RSA_new, RSA_free - allocate and free RSA objects | |
6 | ||
7 | =head1 SYNOPSIS | |
8 | ||
9 | #include <openssl/rsa.h> | |
10 | ||
3dbf8243 MC |
11 | The following functions have been deprecated since OpenSSL 3.0, and can be |
12 | hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value, | |
13 | see L<openssl_user_macros(7)>: | |
f9253152 | 14 | |
e9b77246 | 15 | RSA *RSA_new(void); |
2186cd8e UM |
16 | |
17 | void RSA_free(RSA *rsa); | |
18 | ||
19 | =head1 DESCRIPTION | |
20 | ||
ac120e20 GT |
21 | RSA_new() allocates and initializes an B<RSA> structure. It is equivalent to |
22 | calling RSA_new_method(NULL). | |
2186cd8e UM |
23 | |
24 | RSA_free() frees the B<RSA> structure and its components. The key is | |
60b52453 | 25 | erased before the memory is returned to the system. |
d6407083 | 26 | If B<rsa> is NULL nothing is done. |
2186cd8e UM |
27 | |
28 | =head1 RETURN VALUES | |
29 | ||
30 | If the allocation fails, RSA_new() returns B<NULL> and sets an error | |
9b86974e | 31 | code that can be obtained by L<ERR_get_error(3)>. Otherwise it returns |
2186cd8e UM |
32 | a pointer to the newly allocated structure. |
33 | ||
34 | RSA_free() returns no value. | |
35 | ||
36 | =head1 SEE ALSO | |
37 | ||
53934822 | 38 | L<ERR_get_error(3)>, |
9b86974e RS |
39 | L<RSA_generate_key(3)>, |
40 | L<RSA_new_method(3)> | |
2186cd8e | 41 | |
f9253152 DDO |
42 | =head1 HISTORY |
43 | ||
44 | All functions described here were deprecated in OpenSSL 3.0. | |
45 | For replacement see EVP_PKEY-RSA(7). | |
46 | ||
e2f92610 RS |
47 | =head1 COPYRIGHT |
48 | ||
0789c7d8 | 49 | Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. |
e2f92610 | 50 | |
4746f25a | 51 | Licensed under the Apache License 2.0 (the "License"). You may not use |
e2f92610 RS |
52 | this file except in compliance with the License. You can obtain a copy |
53 | in the file LICENSE in the source distribution or at | |
54 | L<https://www.openssl.org/source/license.html>. | |
55 | ||
56 | =cut |