PR: 2209
[openssl.git] / doc / crypto / EVP_PKEY_new.pod
1 =pod
2
3 =head1 NAME
4
5 EVP_PKEY_new, EVP_PKEY_free - private key allocation functions.
6
7 =head1 SYNOPSIS
8
9  #include <openssl/evp.h>
10
11  EVP_PKEY *EVP_PKEY_new(void);
12  void EVP_PKEY_free(EVP_PKEY *key);
13
14
15 =head1 DESCRIPTION
16
17 The EVP_PKEY_new() function allocates an empty B<EVP_PKEY> 
18 structure which is used by OpenSSL to store private keys.
19
20 EVP_PKEY_free() frees up the private key B<key>.
21
22 =head1 NOTES
23
24 The B<EVP_PKEY> structure is used by various OpenSSL functions
25 which require a general private key without reference to any
26 particular algorithm.
27
28 The structure returned by EVP_PKEY_new() is empty. To add a
29 private key to this empty structure the functions described in
30 L<EVP_PKEY_set1_RSA(3)|EVP_PKEY_set1_RSA(3)> should be used.
31
32 =head1 RETURN VALUES
33
34 EVP_PKEY_new() returns either the newly allocated B<EVP_PKEY>
35 structure of B<NULL> if an error occurred.
36
37 EVP_PKEY_free() does not return a value.
38
39 =head1 SEE ALSO
40
41 L<EVP_PKEY_set1_RSA(3)|EVP_PKEY_set1_RSA(3)>
42
43 =head1 HISTORY
44
45 TBA
46
47 =cut