xref: /freebsd/crypto/openssl/doc/man3/RSA_new.pod (revision 2f513db72b034fd5ef7f080b11be5c711c15186a)
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
11 RSA *RSA_new(void);
12
13 void RSA_free(RSA *rsa);
14
15=head1 DESCRIPTION
16
17RSA_new() allocates and initializes an B<RSA> structure. It is equivalent to
18calling RSA_new_method(NULL).
19
20RSA_free() frees the B<RSA> structure and its components. The key is
21erased before the memory is returned to the system.
22If B<rsa> is NULL nothing is done.
23
24=head1 RETURN VALUES
25
26If the allocation fails, RSA_new() returns B<NULL> and sets an error
27code that can be obtained by L<ERR_get_error(3)>. Otherwise it returns
28a pointer to the newly allocated structure.
29
30RSA_free() returns no value.
31
32=head1 SEE ALSO
33
34L<ERR_get_error(3)>,
35L<RSA_generate_key(3)>,
36L<RSA_new_method(3)>
37
38=head1 COPYRIGHT
39
40Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
41
42Licensed under the OpenSSL license (the "License").  You may not use
43this file except in compliance with the License.  You can obtain a copy
44in the file LICENSE in the source distribution or at
45L<https://www.openssl.org/source/license.html>.
46
47=cut
48