summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/PKCS12_create.3
diff options
context:
space:
mode:
authorschwarze <>2016-11-03 15:20:36 +0000
committerschwarze <>2016-11-03 15:20:36 +0000
commit60d59582dc15b87539a8dc135d2baf8a181ff37b (patch)
tree1ce08c06c8b7c83fa9592d241cddc0d7b95ce2ce /src/lib/libcrypto/man/PKCS12_create.3
parent05002f727738ee445b4a9367f51474995302c6a6 (diff)
downloadopenbsd-60d59582dc15b87539a8dc135d2baf8a181ff37b.tar.gz
openbsd-60d59582dc15b87539a8dc135d2baf8a181ff37b.tar.bz2
openbsd-60d59582dc15b87539a8dc135d2baf8a181ff37b.zip
convert PEM and PKCS manuals from pod to mdoc
Diffstat (limited to 'src/lib/libcrypto/man/PKCS12_create.3')
-rw-r--r--src/lib/libcrypto/man/PKCS12_create.3122
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
24creates a PKCS#12 structure.
25.Pp
26.Fa pass
27is the passphrase to use.
28.Fa name
29is the
30.Sy friendlyName
31to use for the supplied certificate and key.
32.Fa pkey
33is the private key to include in the structure and
34.Fa cert
35its corresponding certificates.
36.Fa ca
37is an optional set of certificates to also include in the structure.
38.Fa pkey ,
39.Fa cert ,
40or both can be
41.Dv NULL
42to indicate that no key or certificate is required.
43.Pp
44.Fa nid_key
45and
46.Fa nid_cert
47are the encryption algorithms that should be used for the key and
48certificate, respectively.
49If either
50.Fa nid_key
51or
52.Fa nid_cert
53is set to -1, no encryption will be used.
54.Pp
55.Fa iter
56is the encryption algorithm iteration count to use and
57.Fa mac_iter
58is the MAC iteration count to use.
59If
60.Fa mac_iter
61is set to -1, the MAC will be omitted entirely.
62.Pp
63.Fa keytype
64is the type of key.
65.Pp
66The parameters
67.Fa nid_key ,
68.Fa nid_cert ,
69.Fa iter ,
70.Fa mac_iter ,
71and
72.Fa keytype
73can all be set to zero and sensible defaults will be used.
74.Pp
75These defaults are: 40 bit RC2 encryption for certificates, triple DES
76encryption for private keys, a key iteration count of
77PKCS12_DEFAULT_ITER (currently 2048) and a MAC iteration count of 1.
78.Pp
79The default MAC iteration count is 1 in order to retain compatibility
80with old software which did not interpret MAC iteration counts.
81If such compatibility is not required then
82.Fa mac_iter
83should be set to PKCS12_DEFAULT_ITER.
84.Pp
85.Fa keytype
86adds a flag to the store private key.
87This is a non standard extension that is only currently interpreted by
88MSIE.
89If set to zero the flag is omitted, if set to
90.Dv KEY_SIG
91the key can be used for signing only, and if set to
92.Dv KEY_EX
93it can be used for signing and encryption.
94This option was useful for old export grade software which could use
95signing only keys of arbitrary size but had restrictions on the
96permissible sizes of keys which could be used for encryption.
97.Pp
98If a certificate contains an
99.Sy alias
100or
101.Sy keyid
102then this will be used for the corresponding
103.Sy friendlyName
104or
105.Sy localKeyID
106in the PKCS12 structure.
107.Sh SEE ALSO
108.Xr d2i_PKCS12 3
109.Sh HISTORY
110PKCS12_create was added in OpenSSL 0.9.3.
111.Pp
112Before OpenSSL 0.9.8, neither
113.Fa pkey
114nor
115.Fa cert
116were allowed to be
117.Dv NULL ,
118and a value of -1 was not allowed for
119.Fa nid_key ,
120.Fa nid_cert ,
121and
122.Fa mac_iter .