diff options
author | schwarze <> | 2016-12-13 14:31:55 +0000 |
---|---|---|
committer | schwarze <> | 2016-12-13 14:31:55 +0000 |
commit | 0f63f3483353f6878b5ce9b564f3eaa4c22e0fa3 (patch) | |
tree | 2d381fd62b08c4c6cdf07916359d8571f47d178e /src/lib | |
parent | 4be3c7bb0b60a3aeb42d3c810b2c253f94d17dfc (diff) | |
download | openbsd-0f63f3483353f6878b5ce9b564f3eaa4c22e0fa3.tar.gz openbsd-0f63f3483353f6878b5ce9b564f3eaa4c22e0fa3.tar.bz2 openbsd-0f63f3483353f6878b5ce9b564f3eaa4c22e0fa3.zip |
Write PKCS7_new(3) manual page from scratch. All the functions are
public: listed in <openssl/pkcs7.h> and OpenSSL doc/man3/X509_dup.pod.
Note that the OpenSSL documentation specifies the wrong header file.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/man/PKCS7_new.3 | 245 |
2 files changed, 247 insertions, 1 deletions
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 300051f921..2c70b7ec37 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.75 2016/12/12 22:48:02 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.76 2016/12/13 14:31:55 schwarze Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
4 | 4 | ||
@@ -145,6 +145,7 @@ MAN= \ | |||
145 | PKCS5_PBKDF2_HMAC.3 \ | 145 | PKCS5_PBKDF2_HMAC.3 \ |
146 | PKCS7_decrypt.3 \ | 146 | PKCS7_decrypt.3 \ |
147 | PKCS7_encrypt.3 \ | 147 | PKCS7_encrypt.3 \ |
148 | PKCS7_new.3 \ | ||
148 | PKCS7_sign.3 \ | 149 | PKCS7_sign.3 \ |
149 | PKCS7_sign_add_signer.3 \ | 150 | PKCS7_sign_add_signer.3 \ |
150 | PKCS7_verify.3 \ | 151 | PKCS7_verify.3 \ |
diff --git a/src/lib/libcrypto/man/PKCS7_new.3 b/src/lib/libcrypto/man/PKCS7_new.3 new file mode 100644 index 0000000000..9feecbb88b --- /dev/null +++ b/src/lib/libcrypto/man/PKCS7_new.3 | |||
@@ -0,0 +1,245 @@ | |||
1 | .\" $OpenBSD: PKCS7_new.3,v 1.1 2016/12/13 14:31:55 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: December 13 2016 $ | ||
18 | .Dt PKCS7_NEW 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm PKCS7_new , | ||
22 | .Nm PKCS7_free , | ||
23 | .Nm PKCS7_SIGNED_new , | ||
24 | .Nm PKCS7_SIGNED_free , | ||
25 | .Nm PKCS7_ENVELOPE_new , | ||
26 | .Nm PKCS7_ENVELOPE_free , | ||
27 | .Nm PKCS7_SIGN_ENVELOPE_new , | ||
28 | .Nm PKCS7_SIGN_ENVELOPE_free , | ||
29 | .Nm PKCS7_DIGEST_new , | ||
30 | .Nm PKCS7_DIGEST_free , | ||
31 | .Nm PKCS7_ENCRYPT_new , | ||
32 | .Nm PKCS7_ENCRYPT_free , | ||
33 | .Nm PKCS7_ENC_CONTENT_new , | ||
34 | .Nm PKCS7_ENC_CONTENT_free , | ||
35 | .Nm PKCS7_SIGNER_INFO_new , | ||
36 | .Nm PKCS7_SIGNER_INFO_free , | ||
37 | .Nm PKCS7_RECIP_INFO_new , | ||
38 | .Nm PKCS7_RECIP_INFO_free , | ||
39 | .Nm PKCS7_ISSUER_AND_SERIAL_new , | ||
40 | .Nm PKCS7_ISSUER_AND_SERIAL_free | ||
41 | .Nd PKCS#7 data structures | ||
42 | .Sh SYNOPSIS | ||
43 | .In openssl/pkcs7.h | ||
44 | .Ft PKCS7 * | ||
45 | .Fn PKCS7_new void | ||
46 | .Ft void | ||
47 | .Fn PKCS7_free "PKCS7 *p7" | ||
48 | .Ft PKCS7_SIGNED * | ||
49 | .Fn PKCS7_SIGNED_new void | ||
50 | .Ft void | ||
51 | .Fn PKCS7_SIGNED_free "PKCS7_SIGNED *signed" | ||
52 | .Ft PKCS7_ENVELOPE * | ||
53 | .Fn PKCS7_ENVELOPE_new void | ||
54 | .Ft void | ||
55 | .Fn PKCS7_ENVELOPE_free "PKCS7_ENVELOPE *envelope" | ||
56 | .Ft PKCS7_SIGN_ENVELOPE * | ||
57 | .Fn PKCS7_SIGN_ENVELOPE_new void | ||
58 | .Ft void | ||
59 | .Fn PKCS7_SIGN_ENVELOPE_free "PKCS7_SIGN_ENVELOPE *signed_envelope" | ||
60 | .Ft PKCS7_DIGEST * | ||
61 | .Fn PKCS7_DIGEST_new void | ||
62 | .Ft void | ||
63 | .Fn PKCS7_DIGEST_free "PKCS7_DIGEST *digested" | ||
64 | .Ft PKCS7_ENCRYPT * | ||
65 | .Fn PKCS7_ENCRYPT_new void | ||
66 | .Ft void | ||
67 | .Fn PKCS7_ENCRYPT_free "PKCS7_ENCRYPT *encrypted" | ||
68 | .Ft PKCS7_ENC_CONTENT * | ||
69 | .Fn PKCS7_ENC_CONTENT_new void | ||
70 | .Ft void | ||
71 | .Fn PKCS7_ENC_CONTENT_free "PKCS7_ENC_CONTENT *content" | ||
72 | .Ft PKCS7_SIGNER_INFO * | ||
73 | .Fn PKCS7_SIGNER_INFO_new void | ||
74 | .Ft void | ||
75 | .Fn PKCS7_SIGNER_INFO_free "PKCS7_SIGNER_INFO *signer" | ||
76 | .Ft PKCS7_RECIP_INFO * | ||
77 | .Fn PKCS7_RECIP_INFO_new void | ||
78 | .Ft void | ||
79 | .Fn PKCS7_RECIP_INFO_free "PKCS7_RECIP_INFO *recip" | ||
80 | .Ft PKCS7_ISSUER_AND_SERIAL * | ||
81 | .Fn PKCS7_ISSUER_AND_SERIAL_new void | ||
82 | .Ft void | ||
83 | .Fn PKCS7_ISSUER_AND_SERIAL_free "PKCS7_ISSUER_AND_SERIAL *cert" | ||
84 | .Sh DESCRIPTION | ||
85 | PKCS#7 is an ASN.1-based format for transmitting data that has | ||
86 | cryptography applied to it, in particular signed and encrypted data. | ||
87 | .Pp | ||
88 | .Fn PKCS7_new | ||
89 | allocates and initializes an empty | ||
90 | .Vt PKCS7 | ||
91 | object, representing an ASN.1 ContentInfo structure | ||
92 | defined in RFC 2315 section 7. | ||
93 | It is the top-level data structure able to hold any kind of content | ||
94 | that can be transmitted using PKCS#7. | ||
95 | It can be used recursively in | ||
96 | .Vt PKCS7_SIGNED | ||
97 | and | ||
98 | .Vt PKCS7_DIGEST | ||
99 | objects. | ||
100 | .Fn PKCS7_free | ||
101 | frees | ||
102 | .Fa p7 . | ||
103 | .Pp | ||
104 | .Fn PKCS7_SIGNED_new | ||
105 | allocates and initializes an empty | ||
106 | .Vt PKCS7_SIGNED | ||
107 | object, representing an ASN.1 SignedData structure | ||
108 | defined in RFC 2315 section 9. | ||
109 | It can be used inside | ||
110 | .Vt PKCS7 | ||
111 | objects and holds any kind of content together with signatures by | ||
112 | zero or more signers and information about the signing algorithm | ||
113 | and certificates used. | ||
114 | .Fn PKCS7_SIGNED_free | ||
115 | frees | ||
116 | .Fa signed . | ||
117 | .Pp | ||
118 | .Fn PKCS7_ENVELOPE_new | ||
119 | allocates and initializes an empty | ||
120 | .Vt PKCS7_ENVELOPE | ||
121 | object, representing an ASN.1 EnvelopedData structure | ||
122 | defined in RFC 2315 section 10. | ||
123 | It can be used inside | ||
124 | .Vt PKCS7 | ||
125 | objects and holds any kind of encrypted content together with | ||
126 | content-encryption keys for one or more recipients. | ||
127 | .Fn PKCS7_ENVELOPE_free | ||
128 | frees | ||
129 | .Fa envelope . | ||
130 | .Pp | ||
131 | .Fn PKCS7_SIGN_ENVELOPE_new | ||
132 | allocates and initializes an empty | ||
133 | .Vt PKCS7_SIGN_ENVELOPE | ||
134 | object, representing an ASN.1 SignedAndEnvelopedData structure | ||
135 | defined in RFC 2315 section 11. | ||
136 | It can be used inside | ||
137 | .Vt PKCS7 | ||
138 | objects and holds any kind of encrypted content together with | ||
139 | signatures by one or more signers, information about the signing | ||
140 | algorithm and certificates used, and content-encryption keys for | ||
141 | one or more recipients. | ||
142 | .Fn PKCS7_SIGN_ENVELOPE_free | ||
143 | frees | ||
144 | .Fa signed_envelope . | ||
145 | .Pp | ||
146 | .Fn PKCS7_DIGEST_new | ||
147 | allocates and initializes an empty | ||
148 | .Vt PKCS7_DIGEST | ||
149 | object, representing an ASN.1 DigestedData structure | ||
150 | defined in RFC 2315 section 12. | ||
151 | It can be used inside | ||
152 | .Vt PKCS7 | ||
153 | objects and holds any kind of content together with a message digest | ||
154 | for checking its integrity and information about the algorithm used. | ||
155 | .Fn PKCS7_DIGEST_free | ||
156 | frees | ||
157 | .Fa digested . | ||
158 | .Pp | ||
159 | .Fn PKCS7_ENCRYPT_new | ||
160 | allocates and initializes an empty | ||
161 | .Vt PKCS7_ENCRYPT | ||
162 | object, representing an ASN.1 EncryptedData structure | ||
163 | defined in RFC 2315 section 13. | ||
164 | It can be used inside | ||
165 | .Vt PKCS7 | ||
166 | objects and holds any kind of encrypted content. | ||
167 | Keys are not included and need to be communicated separately. | ||
168 | .Fn PKCS7_ENCRYPT_free | ||
169 | frees | ||
170 | .Fa encrypted . | ||
171 | .Pp | ||
172 | .Fn PKCS7_ENC_CONTENT_new | ||
173 | allocates and initializes an empty | ||
174 | .Vt PKCS7_ENC_CONTENT | ||
175 | object, representing an ASN.1 EncryptedContentInfo structure | ||
176 | defined in RFC 2315 section 10.1. | ||
177 | It can be used inside | ||
178 | .Vt PKCS7_ENVELOPE , | ||
179 | .Vt PKCS7_SIGN_ENVELOPE , | ||
180 | and | ||
181 | .Vt PKCS7_ENCRYPT | ||
182 | objects and holds encrypted content together with information about | ||
183 | the encryption algorithm used. | ||
184 | .Fn PKCS7_ENC_CONTENT_free | ||
185 | frees | ||
186 | .Fa content . | ||
187 | .Pp | ||
188 | .Fn PKCS7_SIGNER_INFO_new | ||
189 | allocates and initializes an empty | ||
190 | .Vt PKCS7_SIGNER_INFO | ||
191 | object, representing an ASN.1 SignerInfo structure | ||
192 | defined in RFC 2315 section 9.2. | ||
193 | It can be used inside | ||
194 | .Vt PKCS7_SIGNED | ||
195 | and | ||
196 | .Vt PKCS7_SIGN_ENVELOPE | ||
197 | objects and holds a signature together with information about the | ||
198 | signer and the algorithms used. | ||
199 | .Fn PKCS7_SIGNER_INFO_free | ||
200 | frees | ||
201 | .Fa signer . | ||
202 | .Pp | ||
203 | .Fn PKCS7_RECIP_INFO_new | ||
204 | allocates and initializes an empty | ||
205 | .Vt PKCS7_RECIP_INFO | ||
206 | object, representing an ASN.1 RecipientInfo structure | ||
207 | defined in RFC 2315 section 10.2. | ||
208 | It can be used inside | ||
209 | .Vt PKCS7_ENVELOPE | ||
210 | and | ||
211 | .Vt PKCS7_SIGN_ENVELOPE | ||
212 | objects and holds a content-encryption key together with information | ||
213 | about the intended recipient and the key encryption algorithm used. | ||
214 | .Fn PKCS7_RECIP_INFO_free | ||
215 | frees | ||
216 | .Fa recip . | ||
217 | .Pp | ||
218 | .Fn PKCS7_ISSUER_AND_SERIAL_new | ||
219 | allocates and initializes an empty | ||
220 | .Vt PKCS7_ISSUER_AND_SERIAL | ||
221 | object, representing an ASN.1 IssuerAndSerialNumber structure | ||
222 | defined in RFC 2315 section 6.7. | ||
223 | It can be used inside | ||
224 | .Vt PKCS7_SIGNER_INFO | ||
225 | and | ||
226 | .Vt PKCS7_RECIP_INFO | ||
227 | objects and identifies a certificate by holding the distinguished | ||
228 | name of the certificate issuer and an issuer-specific certificate | ||
229 | serial number. | ||
230 | .Fn PKCS7_ISSUER_AND_SERIAL_free | ||
231 | frees | ||
232 | .Fa cert . | ||
233 | .Sh SEE ALSO | ||
234 | .Xr i2d_PKCS7_bio_stream 3 , | ||
235 | .Xr PEM_read_PKCS7 3 , | ||
236 | .Xr PEM_write_bio_PKCS7_stream 3 , | ||
237 | .Xr PKCS7_decrypt 3 , | ||
238 | .Xr PKCS7_encrypt 3 , | ||
239 | .Xr PKCS7_sign 3 , | ||
240 | .Xr PKCS7_sign_add_signer 3 , | ||
241 | .Xr PKCS7_verify 3 , | ||
242 | .Xr SMIME_read_PKCS7 3 , | ||
243 | .Xr SMIME_write_PKCS7 3 | ||
244 | .Sh STANDARDS | ||
245 | RFC 2315: PKCS #7: Cryptographic Message Syntax Version 1.5 | ||