diff options
Diffstat (limited to 'src/lib/libcrypto/man/PKCS12_create.3')
-rw-r--r-- | src/lib/libcrypto/man/PKCS12_create.3 | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/PKCS12_create.3 b/src/lib/libcrypto/man/PKCS12_create.3 new file mode 100644 index 0000000000..0a7f0c2ab5 --- /dev/null +++ b/src/lib/libcrypto/man/PKCS12_create.3 | |||
@@ -0,0 +1,122 @@ | |||
1 | .Dd $Mdocdate: November 3 2016 $ | ||
2 | .Dt PKCS12_CREATE 3 | ||
3 | .Os | ||
4 | .Sh NAME | ||
5 | .Nm PKCS12_create | ||
6 | .Nd create a PKCS#12 structure | ||
7 | .Sh SYNOPSIS | ||
8 | .In openssl/pkcs12.h | ||
9 | .Ft PKCS12 * | ||
10 | .Fo PKCS12_create | ||
11 | .Fa "char *pass" | ||
12 | .Fa "char *name" | ||
13 | .Fa "EVP_PKEY *pkey" | ||
14 | .Fa "X509 *cert" | ||
15 | .Fa "STACK_OF(X509) *ca" | ||
16 | .Fa "int nid_key" | ||
17 | .Fa "int nid_cert" | ||
18 | .Fa "int iter" | ||
19 | .Fa "int mac_iter" | ||
20 | .Fa "int keytype" | ||
21 | .Fc | ||
22 | .Sh DESCRIPTION | ||
23 | .Fn PKCS12_create | ||
24 | creates a PKCS#12 structure. | ||
25 | .Pp | ||
26 | .Fa pass | ||
27 | is the passphrase to use. | ||
28 | .Fa name | ||
29 | is the | ||
30 | .Sy friendlyName | ||
31 | to use for the supplied certificate and key. | ||
32 | .Fa pkey | ||
33 | is the private key to include in the structure and | ||
34 | .Fa cert | ||
35 | its corresponding certificates. | ||
36 | .Fa ca | ||
37 | is an optional set of certificates to also include in the structure. | ||
38 | .Fa pkey , | ||
39 | .Fa cert , | ||
40 | or both can be | ||
41 | .Dv NULL | ||
42 | to indicate that no key or certificate is required. | ||
43 | .Pp | ||
44 | .Fa nid_key | ||
45 | and | ||
46 | .Fa nid_cert | ||
47 | are the encryption algorithms that should be used for the key and | ||
48 | certificate, respectively. | ||
49 | If either | ||
50 | .Fa nid_key | ||
51 | or | ||
52 | .Fa nid_cert | ||
53 | is set to -1, no encryption will be used. | ||
54 | .Pp | ||
55 | .Fa iter | ||
56 | is the encryption algorithm iteration count to use and | ||
57 | .Fa mac_iter | ||
58 | is the MAC iteration count to use. | ||
59 | If | ||
60 | .Fa mac_iter | ||
61 | is set to -1, the MAC will be omitted entirely. | ||
62 | .Pp | ||
63 | .Fa keytype | ||
64 | is the type of key. | ||
65 | .Pp | ||
66 | The parameters | ||
67 | .Fa nid_key , | ||
68 | .Fa nid_cert , | ||
69 | .Fa iter , | ||
70 | .Fa mac_iter , | ||
71 | and | ||
72 | .Fa keytype | ||
73 | can all be set to zero and sensible defaults will be used. | ||
74 | .Pp | ||
75 | These defaults are: 40 bit RC2 encryption for certificates, triple DES | ||
76 | encryption for private keys, a key iteration count of | ||
77 | PKCS12_DEFAULT_ITER (currently 2048) and a MAC iteration count of 1. | ||
78 | .Pp | ||
79 | The default MAC iteration count is 1 in order to retain compatibility | ||
80 | with old software which did not interpret MAC iteration counts. | ||
81 | If such compatibility is not required then | ||
82 | .Fa mac_iter | ||
83 | should be set to PKCS12_DEFAULT_ITER. | ||
84 | .Pp | ||
85 | .Fa keytype | ||
86 | adds a flag to the store private key. | ||
87 | This is a non standard extension that is only currently interpreted by | ||
88 | MSIE. | ||
89 | If set to zero the flag is omitted, if set to | ||
90 | .Dv KEY_SIG | ||
91 | the key can be used for signing only, and if set to | ||
92 | .Dv KEY_EX | ||
93 | it can be used for signing and encryption. | ||
94 | This option was useful for old export grade software which could use | ||
95 | signing only keys of arbitrary size but had restrictions on the | ||
96 | permissible sizes of keys which could be used for encryption. | ||
97 | .Pp | ||
98 | If a certificate contains an | ||
99 | .Sy alias | ||
100 | or | ||
101 | .Sy keyid | ||
102 | then this will be used for the corresponding | ||
103 | .Sy friendlyName | ||
104 | or | ||
105 | .Sy localKeyID | ||
106 | in the PKCS12 structure. | ||
107 | .Sh SEE ALSO | ||
108 | .Xr d2i_PKCS12 3 | ||
109 | .Sh HISTORY | ||
110 | PKCS12_create was added in OpenSSL 0.9.3. | ||
111 | .Pp | ||
112 | Before OpenSSL 0.9.8, neither | ||
113 | .Fa pkey | ||
114 | nor | ||
115 | .Fa cert | ||
116 | were allowed to be | ||
117 | .Dv NULL , | ||
118 | and a value of -1 was not allowed for | ||
119 | .Fa nid_key , | ||
120 | .Fa nid_cert , | ||
121 | and | ||
122 | .Fa mac_iter . | ||