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