]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/RSA_new.pod
Add convenience functions and macros for asymmetric key generation
[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
f9253152
DDO
11Deprecated since OpenSSL 3.0:
12
e9b77246 13 RSA *RSA_new(void);
2186cd8e
UM
14
15 void RSA_free(RSA *rsa);
16
17=head1 DESCRIPTION
18
ac120e20
GT
19RSA_new() allocates and initializes an B<RSA> structure. It is equivalent to
20calling RSA_new_method(NULL).
2186cd8e
UM
21
22RSA_free() frees the B<RSA> structure and its components. The key is
60b52453 23erased before the memory is returned to the system.
d6407083 24If B<rsa> is NULL nothing is done.
2186cd8e
UM
25
26=head1 RETURN VALUES
27
28If the allocation fails, RSA_new() returns B<NULL> and sets an error
9b86974e 29code that can be obtained by L<ERR_get_error(3)>. Otherwise it returns
2186cd8e
UM
30a pointer to the newly allocated structure.
31
32RSA_free() returns no value.
33
34=head1 SEE ALSO
35
53934822 36L<ERR_get_error(3)>,
9b86974e
RS
37L<RSA_generate_key(3)>,
38L<RSA_new_method(3)>
2186cd8e 39
f9253152
DDO
40=head1 HISTORY
41
42All functions described here were deprecated in OpenSSL 3.0.
43For replacement see EVP_PKEY-RSA(7).
44
e2f92610
RS
45=head1 COPYRIGHT
46
47Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
48
4746f25a 49Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
50this file except in compliance with the License. You can obtain a copy
51in the file LICENSE in the source distribution or at
52L<https://www.openssl.org/source/license.html>.
53
54=cut