diff options
Diffstat (limited to 'src/lib/libcrypto/man/PKCS12_parse.3')
-rw-r--r-- | src/lib/libcrypto/man/PKCS12_parse.3 | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/PKCS12_parse.3 b/src/lib/libcrypto/man/PKCS12_parse.3 new file mode 100644 index 0000000000..6930bdf339 --- /dev/null +++ b/src/lib/libcrypto/man/PKCS12_parse.3 | |||
@@ -0,0 +1,90 @@ | |||
1 | .Dd $Mdocdate: November 3 2016 $ | ||
2 | .Dt PKCS12_PARSE 3 | ||
3 | .Os | ||
4 | .Sh NAME | ||
5 | .Nm PKCS12_parse | ||
6 | .Nd parse a PKCS#12 structure | ||
7 | .Sh SYNOPSIS | ||
8 | .In openssl/pkcs12.h | ||
9 | .Ft int | ||
10 | .Fo PKCS12_parse | ||
11 | .Fa "PKCS12 *p12" | ||
12 | .Fa "const char *pass" | ||
13 | .Fa "EVP_PKEY **pkey" | ||
14 | .Fa "X509 **cert" | ||
15 | .Fa "STACK_OF(X509) **ca" | ||
16 | .Fc | ||
17 | .Sh DESCRIPTION | ||
18 | .Fn PKCS12_parse | ||
19 | parses a PKCS12 structure. | ||
20 | .Pp | ||
21 | .Fa p12 | ||
22 | is the | ||
23 | .Vt PKCS12 | ||
24 | structure to parse. | ||
25 | .Fa pass | ||
26 | is the passphrase to use. | ||
27 | If successful, the private key will be written to | ||
28 | .Pf * Fa pkey , | ||
29 | the corresponding certificate to | ||
30 | .Pf * Fa cert , | ||
31 | and any additional certificates to | ||
32 | .Pf * Fa ca . | ||
33 | .Pp | ||
34 | The parameters | ||
35 | .Fa pkey | ||
36 | and | ||
37 | .Fa cert | ||
38 | cannot be | ||
39 | .Dv NULL . | ||
40 | .Fa ca | ||
41 | can be | ||
42 | .Dv NULL , | ||
43 | in which case additional certificates will be discarded. | ||
44 | .Pf * Fa ca | ||
45 | can also be a valid STACK in which case additional certificates are | ||
46 | appended to | ||
47 | .Pf * Fa ca . | ||
48 | If | ||
49 | .Pf * Fa ca | ||
50 | is | ||
51 | .Dv NULL , | ||
52 | a new STACK will be allocated. | ||
53 | .Pp | ||
54 | The | ||
55 | .Sy friendlyName | ||
56 | and | ||
57 | .Sy localKeyID | ||
58 | attributes (if present) of each certificate will be stored in the | ||
59 | .Fa alias | ||
60 | and | ||
61 | .Fa keyid | ||
62 | attributes of the | ||
63 | .Vt X509 | ||
64 | structure. | ||
65 | .Sh RETURN VALUES | ||
66 | .Fn PKCS12_parse | ||
67 | returns 1 for success and 0 if an error occurred. | ||
68 | .Pp | ||
69 | The error can be obtained from | ||
70 | .Xr ERR_get_error 3 . | ||
71 | .Sh SEE ALSO | ||
72 | .Xr d2i_PKCS12 3 | ||
73 | .Sh HISTORY | ||
74 | PKCS12_parse was added in OpenSSL 0.9.3. | ||
75 | .Sh BUGS | ||
76 | Only a single private key and corresponding certificate is returned by | ||
77 | this function. | ||
78 | More complex PKCS#12 files with multiple private keys will only return | ||
79 | the first match. | ||
80 | .Pp | ||
81 | Only | ||
82 | .Sy friendlyName | ||
83 | and | ||
84 | .Sy localKeyID | ||
85 | attributes are currently stored in certificates. | ||
86 | Other attributes are discarded. | ||
87 | .Pp | ||
88 | Attributes currently cannot be stored in the private key | ||
89 | .Vt EVP_PKEY | ||
90 | structure. | ||