1EVP_PKEY_set1_RSA(3) OpenSSL EVP_PKEY_set1_RSA(3)
2
3
4
6 EVP_PKEY_set1_RSA, EVP_PKEY_set1_DSA, EVP_PKEY_set1_DH,
7 EVP_PKEY_set1_EC_KEY, EVP_PKEY_get1_RSA, EVP_PKEY_get1_DSA,
8 EVP_PKEY_get1_DH, EVP_PKEY_get1_EC_KEY, EVP_PKEY_assign_RSA,
9 EVP_PKEY_assign_DSA, EVP_PKEY_assign_DH, EVP_PKEY_assign_EC_KEY,
10 EVP_PKEY_type - EVP_PKEY assignment functions.
11
13 #include <openssl/evp.h>
14
15 int EVP_PKEY_set1_RSA(EVP_PKEY *pkey,RSA *key);
16 int EVP_PKEY_set1_DSA(EVP_PKEY *pkey,DSA *key);
17 int EVP_PKEY_set1_DH(EVP_PKEY *pkey,DH *key);
18 int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey,EC_KEY *key);
19
20 RSA *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
21 DSA *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
22 DH *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
23 EC_KEY *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
24
25 int EVP_PKEY_assign_RSA(EVP_PKEY *pkey,RSA *key);
26 int EVP_PKEY_assign_DSA(EVP_PKEY *pkey,DSA *key);
27 int EVP_PKEY_assign_DH(EVP_PKEY *pkey,DH *key);
28 int EVP_PKEY_assign_EC_KEY(EVP_PKEY *pkey,EC_KEY *key);
29
30 int EVP_PKEY_type(int type);
31
33 EVP_PKEY_set1_RSA(), EVP_PKEY_set1_DSA(), EVP_PKEY_set1_DH() and
34 EVP_PKEY_set1_EC_KEY() set the key referenced by pkey to key.
35
36 EVP_PKEY_get1_RSA(), EVP_PKEY_get1_DSA(), EVP_PKEY_get1_DH() and
37 EVP_PKEY_get1_EC_KEY() return the referenced key in pkey or NULL if the
38 key is not of the correct type.
39
40 EVP_PKEY_assign_RSA() EVP_PKEY_assign_DSA(), EVP_PKEY_assign_DH() and
41 EVP_PKEY_assign_EC_KEY() also set the referenced key to key however
42 these use the supplied key internally and so key will be freed when the
43 parent pkey is freed.
44
45 EVP_PKEY_type() returns the type of key corresponding to the value
46 type. The type of a key can be obtained with EVP_PKEY_type(pkey->type).
47 The return value will be EVP_PKEY_RSA, EVP_PKEY_DSA, EVP_PKEY_DH or
48 EVP_PKEY_EC for the corresponding key types or NID_undef if the key
49 type is unassigned.
50
52 In accordance with the OpenSSL naming convention the key obtained from
53 or assigned to the pkey using the 1 functions must be freed as well as
54 pkey.
55
56 EVP_PKEY_assign_RSA() EVP_PKEY_assign_DSA(), EVP_PKEY_assign_DH()
57 EVP_PKEY_assign_EC_KEY() are implemented as macros.
58
60 EVP_PKEY_set1_RSA(), EVP_PKEY_set1_DSA(), EVP_PKEY_set1_DH() and
61 EVP_PKEY_set1_EC_KEY() return 1 for success or 0 for failure.
62
63 EVP_PKEY_get1_RSA(), EVP_PKEY_get1_DSA(), EVP_PKEY_get1_DH() and
64 EVP_PKEY_get1_EC_KEY() return the referenced key or NULL if an error
65 occurred.
66
67 EVP_PKEY_assign_RSA() EVP_PKEY_assign_DSA(), EVP_PKEY_assign_DH() and
68 EVP_PKEY_assign_EC_KEY() return 1 for success and 0 for failure.
69
71 EVP_PKEY_new(3)
72
74 TBA
75
76
77
781.0.0e 2002-10-07 EVP_PKEY_set1_RSA(3)