1 .\" $OpenBSD: PKCS12_create.3,v 1.4 2016/11/28 22:41:38 schwarze Exp $
2 .\" OpenSSL 05ea606a May 20 20:52:46 2016 -0400
4 .\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
5 .\" Copyright (c) 2002, 2015 The OpenSSL Project. All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in
16 .\" the documentation and/or other materials provided with the
19 .\" 3. All advertising materials mentioning features or use of this
20 .\" software must display the following acknowledgment:
21 .\" "This product includes software developed by the OpenSSL Project
22 .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24 .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
25 .\" endorse or promote products derived from this software without
26 .\" prior written permission. For written permission, please contact
27 .\" openssl-core@openssl.org.
29 .\" 5. Products derived from this software may not be called "OpenSSL"
30 .\" nor may "OpenSSL" appear in their names without prior written
31 .\" permission of the OpenSSL Project.
33 .\" 6. Redistributions of any form whatsoever must retain the following
35 .\" "This product includes software developed by the OpenSSL Project
36 .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)"
38 .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
39 .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
40 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
41 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
42 .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
45 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
46 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
47 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49 .\" OF THE POSSIBILITY OF SUCH DAMAGE.
51 .Dd $Mdocdate: November 28 2016 $
56 .Nd create a PKCS#12 structure
65 .Fa "STACK_OF(X509) *ca"
74 creates a PKCS#12 structure.
77 is the passphrase to use.
81 to use for the supplied certificate and key.
83 is the private key to include in the structure and
85 its corresponding certificates.
87 is an optional set of certificates to also include in the structure.
92 to indicate that no key or certificate is required.
97 are the encryption algorithms that should be used for the key and
98 certificate, respectively.
103 is set to -1, no encryption will be used.
106 is the encryption algorithm iteration count to use and
108 is the MAC iteration count to use.
111 is set to -1, the MAC will be omitted entirely.
123 can all be set to zero and sensible defaults will be used.
125 These defaults are: 40-bit RC2 encryption for certificates, triple DES
126 encryption for private keys, a key iteration count of
127 PKCS12_DEFAULT_ITER (currently 2048) and a MAC iteration count of 1.
129 The default MAC iteration count is 1 in order to retain compatibility
130 with old software which did not interpret MAC iteration counts.
131 If such compatibility is not required then
133 should be set to PKCS12_DEFAULT_ITER.
136 adds a flag to the store private key.
137 This is a non-standard extension that is only currently interpreted by
139 If set to zero the flag is omitted; if set to
141 the key can be used for signing only; and if set to
143 it can be used for signing and encryption.
144 This option was useful for old export grade software which could use
145 signing only keys of arbitrary size but had restrictions on the
146 permissible sizes of keys which could be used for encryption.
148 If a certificate contains an
152 then this will be used for the corresponding
156 in the PKCS12 structure.
160 PKCS12_create was added in OpenSSL 0.9.3.
162 Before OpenSSL 0.9.8, neither
168 and a value of -1 was not allowed for