Import OpenSSL-0.9.8i.
[dragonfly.git] / crypto / openssl-0.9.7d / doc / crypto / RSA_new.pod
blob3d15b928243d55c2145404f0c6c31c0096926c6f
1 =pod
3 =head1 NAME
5 RSA_new, RSA_free - allocate and free RSA objects
7 =head1 SYNOPSIS
9  #include <openssl/rsa.h>
11  RSA * RSA_new(void);
13  void RSA_free(RSA *rsa);
15 =head1 DESCRIPTION
17 RSA_new() allocates and initializes an B<RSA> structure. It is equivalent to
18 calling RSA_new_method(NULL).
20 RSA_free() frees the B<RSA> structure and its components. The key is
21 erased before the memory is returned to the system.
23 =head1 RETURN VALUES
25 If the allocation fails, RSA_new() returns B<NULL> and sets an error
26 code that can be obtained by L<ERR_get_error(3)|ERR_get_error(3)>. Otherwise it returns
27 a pointer to the newly allocated structure.
29 RSA_free() returns no value.
31 =head1 SEE ALSO
33 L<ERR_get_error(3)|ERR_get_error(3)>, L<rsa(3)|rsa(3)>,
34 L<RSA_generate_key(3)|RSA_generate_key(3)>,
35 L<RSA_new_method(3)|RSA_new_method(3)>
37 =head1 HISTORY
39 RSA_new() and RSA_free() are available in all versions of SSLeay and OpenSSL.
41 =cut