summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2020-06-03 13:41:27 +0000
committerschwarze <>2020-06-03 13:41:27 +0000
commit19f9a4a6a75ddb174cd77d6e0749b6fe9979e7c0 (patch)
treea20bd946e865f05d6bc35d05ac42fc545068567d
parentc34de2c3490495ca1d9afcbc43593161c810b669 (diff)
downloadopenbsd-19f9a4a6a75ddb174cd77d6e0749b6fe9979e7c0.tar.gz
openbsd-19f9a4a6a75ddb174cd77d6e0749b6fe9979e7c0.tar.bz2
openbsd-19f9a4a6a75ddb174cd77d6e0749b6fe9979e7c0.zip
Properly document PKCS7_final(3), which was already mentioned
in passing in some other manual pages.
-rw-r--r--src/lib/libcrypto/man/Makefile3
-rw-r--r--src/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.37
-rw-r--r--src/lib/libcrypto/man/PKCS7_dataFinal.35
-rw-r--r--src/lib/libcrypto/man/PKCS7_dataInit.325
-rw-r--r--src/lib/libcrypto/man/PKCS7_encrypt.314
-rw-r--r--src/lib/libcrypto/man/PKCS7_final.3201
-rw-r--r--src/lib/libcrypto/man/PKCS7_sign.316
-rw-r--r--src/lib/libcrypto/man/PKCS7_sign_add_signer.39
-rw-r--r--src/lib/libcrypto/man/SMIME_write_PKCS7.38
-rw-r--r--src/lib/libcrypto/man/i2d_PKCS7_bio_stream.37
10 files changed, 263 insertions, 32 deletions
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile
index 8af0c34d2b..05b992e132 100644
--- a/src/lib/libcrypto/man/Makefile
+++ b/src/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.164 2020/05/27 12:00:44 schwarze Exp $ 1# $OpenBSD: Makefile,v 1.165 2020/06/03 13:41:27 schwarze Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
@@ -218,6 +218,7 @@ MAN= \
218 PKCS7_dataInit.3 \ 218 PKCS7_dataInit.3 \
219 PKCS7_decrypt.3 \ 219 PKCS7_decrypt.3 \
220 PKCS7_encrypt.3 \ 220 PKCS7_encrypt.3 \
221 PKCS7_final.3 \
221 PKCS7_new.3 \ 222 PKCS7_new.3 \
222 PKCS7_set_content.3 \ 223 PKCS7_set_content.3 \
223 PKCS7_set_type.3 \ 224 PKCS7_set_type.3 \
diff --git a/src/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 b/src/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3
index 91a1a5cd5e..dba2a42a70 100644
--- a/src/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3
+++ b/src/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3
@@ -1,5 +1,5 @@
1.\" $OpenBSD: PEM_write_bio_PKCS7_stream.3,v 1.9 2019/06/14 13:59:32 schwarze Exp $ 1.\" $OpenBSD: PEM_write_bio_PKCS7_stream.3,v 1.10 2020/06/03 13:41:27 schwarze Exp $
2.\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 2.\" full merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
3.\" 3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
5.\" Copyright (c) 2007, 2009, 2016 The OpenSSL Project. All rights reserved. 5.\" Copyright (c) 2007, 2009, 2016 The OpenSSL Project. All rights reserved.
@@ -48,7 +48,7 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 49.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 50.\"
51.Dd $Mdocdate: June 14 2019 $ 51.Dd $Mdocdate: June 3 2020 $
52.Dt PEM_WRITE_BIO_PKCS7_STREAM 3 52.Dt PEM_WRITE_BIO_PKCS7_STREAM 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
@@ -81,6 +81,7 @@ otherwise 0 is returned and an error code can be retrieved with
81.Xr BIO_new 3 , 81.Xr BIO_new 3 ,
82.Xr i2d_PKCS7_bio_stream 3 , 82.Xr i2d_PKCS7_bio_stream 3 ,
83.Xr PEM_write_PKCS7 3 , 83.Xr PEM_write_PKCS7 3 ,
84.Xr PKCS7_final 3 ,
84.Xr PKCS7_new 3 , 85.Xr PKCS7_new 3 ,
85.Xr SMIME_write_PKCS7 3 86.Xr SMIME_write_PKCS7 3
86.Sh HISTORY 87.Sh HISTORY
diff --git a/src/lib/libcrypto/man/PKCS7_dataFinal.3 b/src/lib/libcrypto/man/PKCS7_dataFinal.3
index f9cdd62f60..e2e088d9d9 100644
--- a/src/lib/libcrypto/man/PKCS7_dataFinal.3
+++ b/src/lib/libcrypto/man/PKCS7_dataFinal.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: PKCS7_dataFinal.3,v 1.1 2020/05/27 12:00:44 schwarze Exp $ 1.\" $OpenBSD: PKCS7_dataFinal.3,v 1.2 2020/06/03 13:41:27 schwarze Exp $
2.\" 2.\"
3.\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org> 3.\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org>
4.\" 4.\"
@@ -14,7 +14,7 @@
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\" 16.\"
17.Dd $Mdocdate: May 27 2020 $ 17.Dd $Mdocdate: June 3 2020 $
18.Dt PKCS7_DATAFINAL 3 18.Dt PKCS7_DATAFINAL 3
19.Os 19.Os
20.Sh NAME 20.Sh NAME
@@ -134,6 +134,7 @@ but are silently skipped.
134.Sh SEE ALSO 134.Sh SEE ALSO
135.Xr BIO_new 3 , 135.Xr BIO_new 3 ,
136.Xr PKCS7_dataInit 3 , 136.Xr PKCS7_dataInit 3 ,
137.Xr PKCS7_final 3 ,
137.Xr PKCS7_new 3 , 138.Xr PKCS7_new 3 ,
138.Xr PKCS7_sign 3 139.Xr PKCS7_sign 3
139.Sh HISTORY 140.Sh HISTORY
diff --git a/src/lib/libcrypto/man/PKCS7_dataInit.3 b/src/lib/libcrypto/man/PKCS7_dataInit.3
index 53090ff960..cb54d3f95c 100644
--- a/src/lib/libcrypto/man/PKCS7_dataInit.3
+++ b/src/lib/libcrypto/man/PKCS7_dataInit.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: PKCS7_dataInit.3,v 1.1 2020/05/24 12:37:30 schwarze Exp $ 1.\" $OpenBSD: PKCS7_dataInit.3,v 1.2 2020/06/03 13:41:27 schwarze Exp $
2.\" 2.\"
3.\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org> 3.\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org>
4.\" 4.\"
@@ -14,7 +14,7 @@
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\" 16.\"
17.Dd $Mdocdate: May 24 2020 $ 17.Dd $Mdocdate: June 3 2020 $
18.Dt PKCS7_DATAINIT 3 18.Dt PKCS7_DATAINIT 3
19.Os 19.Os
20.Sh NAME 20.Sh NAME
@@ -110,6 +110,20 @@ are typically required to create
110to choose its desired type, and to allocate the nested 110to choose its desired type, and to allocate the nested
111.Vt ContentInfo 111.Vt ContentInfo
112structure. 112structure.
113Alternatively, for
114.Vt SignedData ,
115.Xr PKCS7_sign 3
116can be used with the
117.Dv PKCS7_PARTIAL
118or
119.Dv PKCS7_STREAM
120.Fa flags
121or for
122.Vt EnvelopedData ,
123.Xr PKCS7_encrypt 3
124with the
125.Dv PKCS7_STREAM
126flag.
113.Pp 127.Pp
114After calling 128After calling
115.Fn PKCS7_dataInit , 129.Fn PKCS7_dataInit ,
@@ -130,7 +144,10 @@ does support the
130.Vt EnvelopedData 144.Vt EnvelopedData
131and 145and
132.Vt SignedAndEnvelopedData 146.Vt SignedAndEnvelopedData
133types, using it for these types is awkward and error prone because 147types, using it for these types is awkward and error prone
148except when using
149.Xr PKCS7_encrypt 3
150for the setup because
134.Xr PKCS7_content_new 3 151.Xr PKCS7_content_new 3
135does not support these two types. 152does not support these two types.
136So in addition to creating 153So in addition to creating
@@ -183,6 +200,8 @@ or for various other reasons.
183.Xr BIO_read 3 , 200.Xr BIO_read 3 ,
184.Xr PKCS7_content_new 3 , 201.Xr PKCS7_content_new 3 ,
185.Xr PKCS7_dataFinal 3 , 202.Xr PKCS7_dataFinal 3 ,
203.Xr PKCS7_encrypt 3 ,
204.Xr PKCS7_final 3 ,
186.Xr PKCS7_new 3 , 205.Xr PKCS7_new 3 ,
187.Xr PKCS7_set_type 3 , 206.Xr PKCS7_set_type 3 ,
188.Xr PKCS7_sign 3 207.Xr PKCS7_sign 3
diff --git a/src/lib/libcrypto/man/PKCS7_encrypt.3 b/src/lib/libcrypto/man/PKCS7_encrypt.3
index 4d1b435f15..700498a1de 100644
--- a/src/lib/libcrypto/man/PKCS7_encrypt.3
+++ b/src/lib/libcrypto/man/PKCS7_encrypt.3
@@ -1,5 +1,5 @@
1.\" $OpenBSD: PKCS7_encrypt.3,v 1.10 2019/06/10 14:58:48 schwarze Exp $ 1.\" $OpenBSD: PKCS7_encrypt.3,v 1.11 2020/06/03 13:41:27 schwarze Exp $
2.\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 2.\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
3.\" 3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
5.\" Copyright (c) 2002, 2006, 2007, 2008, 2009 The OpenSSL Project. 5.\" Copyright (c) 2002, 2006, 2007, 2008, 2009 The OpenSSL Project.
@@ -49,7 +49,7 @@
49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\" 51.\"
52.Dd $Mdocdate: June 10 2019 $ 52.Dd $Mdocdate: June 3 2020 $
53.Dt PKCS7_ENCRYPT 3 53.Dt PKCS7_ENCRYPT 3
54.Os 54.Os
55.Sh NAME 55.Sh NAME
@@ -133,11 +133,12 @@ properly finalize the
133.Vt PKCS7 133.Vt PKCS7
134structure will give unpredictable results. 134structure will give unpredictable results.
135.Pp 135.Pp
136Several functions, including 136Several functions including
137.Xr PKCS7_final 3 ,
137.Xr SMIME_write_PKCS7 3 , 138.Xr SMIME_write_PKCS7 3 ,
138.Xr i2d_PKCS7_bio_stream 3 ,
139and
140.Xr PEM_write_bio_PKCS7_stream 3 , 139.Xr PEM_write_bio_PKCS7_stream 3 ,
140and
141.Xr i2d_PKCS7_bio_stream 3
141finalize the structure. 142finalize the structure.
142Alternatively finalization can be performed by obtaining the streaming 143Alternatively finalization can be performed by obtaining the streaming
143ASN.1 144ASN.1
@@ -155,6 +156,7 @@ The error can be obtained from
155.Xr ERR_get_error 3 . 156.Xr ERR_get_error 3 .
156.Sh SEE ALSO 157.Sh SEE ALSO
157.Xr PKCS7_decrypt 3 , 158.Xr PKCS7_decrypt 3 ,
159.Xr PKCS7_final 3 ,
158.Xr PKCS7_new 3 , 160.Xr PKCS7_new 3 ,
159.Xr PKCS7_sign 3 161.Xr PKCS7_sign 3
160.Sh HISTORY 162.Sh HISTORY
diff --git a/src/lib/libcrypto/man/PKCS7_final.3 b/src/lib/libcrypto/man/PKCS7_final.3
new file mode 100644
index 0000000000..593483bb6d
--- /dev/null
+++ b/src/lib/libcrypto/man/PKCS7_final.3
@@ -0,0 +1,201 @@
1.\" $OpenBSD: PKCS7_final.3,v 1.1 2020/06/03 13:41:27 schwarze Exp $
2.\"
3.\" Copyright (c) 2020 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: June 3 2020 $
18.Dt PKCS7_FINAL 3
19.Os
20.Sh NAME
21.Nm PKCS7_final
22.Nd read data from a BIO into a ContentInfo object
23.Sh SYNOPSIS
24.In openssl/pkcs7.h
25.Ft int
26.Fo PKCS7_final
27.Fa "PKCS7 *p7"
28.Fa "BIO *data"
29.Fa "int flags"
30.Fc
31.Sh DESCRIPTION
32.Fn PKCS7_final
33reads
34.Fa data
35and puts it into the appropriate content field of
36.Fa p7
37itself or of its appropriate substructure, which can be of type
38.Vt SignedData ,
39.Vt EnvelopedData ,
40.Vt SignedAndEnvelopedData ,
41.Vt DigestedData ,
42or arbitrary data.
43The
44.Xr PKCS7_dataFinal 3
45manual explains which field exactly the data is put into.
46.Pp
47The following
48.Fa flags
49are recognized:
50.Bl -tag -width PKCS7_BINARY
51.It Dv PKCS7_BINARY
52Copy the data verbatim without changing any bytes.
53By default, line endings are replaced with two-byte
54.Qq \er\en
55sequences (ASCII CR+LF).
56If this flag is set,
57.Dv PKCS7_TEXT
58is ignored.
59.It Dv PKCS7_TEXT
60Prepend
61.Qq Content-Type: text/plain
62followed by a blank line to the data.
63This flag is ignored if
64.Dv PKCS7_BINARY
65is also set.
66.El
67.Pp
68If any other bits are set in
69.Fa flags ,
70for example
71.Dv PKCS7_STREAM
72or
73.Dv PKCS7_PARTIAL ,
74they are ignored, allowing to pass the same
75.Fa flags
76argument that was already passed to
77.Xr PKCS7_sign 3
78or
79.Xr PKCS7_encrypt 3 .
80.Pp
81.Fn PKCS7_final
82is most commonly used to finalize a
83.Fa p7
84object returned from a call to
85.Xr PKCS7_sign 3
86that used
87.Fa flags
88including
89.Dv PKCS7_PARTIAL
90or
91.Dv PKCS7_STREAM .
92With these flags,
93.Xr PKCS7_sign 3
94ignores its
95.Fa data
96argument.
97The partial
98.Fa p7
99object returned can then be customized, for example setting up
100multiple signers or non-default digest algorithms with
101.Xr PKCS7_sign_add_signer 3 ,
102before calling
103.Fn PKCS7_final .
104.Pp
105Similarly,
106.Fn PKCS7_final
107can be used to finalize a
108.Fa p7
109object returned from a call to
110.Xr PKCS7_encrypt 3
111that used
112.Fa flags
113including
114.Dv PKCS7_STREAM .
115.Pp
116Since
117.Fn PKCS7_final
118starts by calling
119.Xr PKCS7_dataInit 3
120internally, using it to finalize a
121.Fa p7
122object containing
123.Vt SignedAndEnvelopedData ,
124.Vt DigestedData ,
125or arbitrary data requires the setup described in the
126.Xr PKCS7_dataInit 3
127manual.
128For
129.Vt SignedData
130and
131.Vt EnvelopedData ,
132such manual setup is also feasible, but it is more easily performed with
133.Xr PKCS7_sign 3
134or
135.Xr PKCS7_encrypt 3 ,
136respectively.
137.Pp
138.Fn PKCS7_final
139is only one among several functions that can be used to finalize
140.Fa p7 ;
141alternatives include
142.Xr SMIME_write_PKCS7 3 ,
143.Xr PEM_write_bio_PKCS7_stream 3 ,
144and
145.Xr i2d_PKCS7_bio_stream 3 .
146.Sh RETURN VALUES
147.Fn PKCS7_final
148returns 1 on success or 0 on failure.
149.Pp
150Possible reasons for failure include:
151.Pp
152.Bl -dash -compact -offset 2n -width 1n
153.It
154.Fa p7
155is
156.Dv NULL .
157.It
158The
159.Fa content
160field of
161.Fa p7
162is empty.
163.It
164The
165.Fa contentType
166of
167.Fa p7
168is unsupported.
169.It
170Signing or digesting is requested and
171.Fa p7
172is not configured to store a detached signature, but does not contain
173the required field to store the content either.
174.It
175At least one signer lacks a useable digest algorithm.
176.It
177A cipher is required but none is configured.
178.It
179Any required operation fails, for example signing or digesting.
180.It
181Memory allocation fails.
182.El
183.Pp
184Signers lacking private keys do not cause failure but are silently skipped.
185.Sh SEE ALSO
186.Xr BIO_new 3 ,
187.Xr i2d_PKCS7_bio_stream 3 ,
188.Xr PEM_write_bio_PKCS7_stream 3 ,
189.Xr PKCS7_dataFinal 3 ,
190.Xr PKCS7_dataInit 3 ,
191.Xr PKCS7_encrypt 3 ,
192.Xr PKCS7_new 3 ,
193.Xr PKCS7_sign 3 ,
194.Xr SMIME_write_PKCS7 3
195.Sh HISTORY
196.Fn PKCS7_final
197first appeared in OpenSSL 1.0.0 and has been available since
198.Ox 4.9 .
199.Sh CAVEATS
200This function does not support
201.Vt EncryptedData .
diff --git a/src/lib/libcrypto/man/PKCS7_sign.3 b/src/lib/libcrypto/man/PKCS7_sign.3
index a04e800ca9..d5f4c89c61 100644
--- a/src/lib/libcrypto/man/PKCS7_sign.3
+++ b/src/lib/libcrypto/man/PKCS7_sign.3
@@ -1,5 +1,5 @@
1.\" $OpenBSD: PKCS7_sign.3,v 1.10 2019/06/10 14:58:48 schwarze Exp $ 1.\" $OpenBSD: PKCS7_sign.3,v 1.11 2020/06/03 13:41:27 schwarze Exp $
2.\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 2.\" full merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
3.\" 3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
5.\" Copyright (c) 2002, 2003, 2006-2009, 2015 The OpenSSL Project. 5.\" Copyright (c) 2002, 2003, 2006-2009, 2015 The OpenSSL Project.
@@ -49,7 +49,7 @@
49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\" 51.\"
52.Dd $Mdocdate: June 10 2019 $ 52.Dd $Mdocdate: June 3 2020 $
53.Dt PKCS7_SIGN 3 53.Dt PKCS7_SIGN 3
54.Os 54.Os
55.Sh NAME 55.Sh NAME
@@ -166,11 +166,12 @@ properly finalize the
166.Vt PKCS7 166.Vt PKCS7
167structure will give unpredictable results. 167structure will give unpredictable results.
168.Pp 168.Pp
169Several functions, including 169Several functions including
170.Xr PKCS7_final 3 ,
170.Xr SMIME_write_PKCS7 3 , 171.Xr SMIME_write_PKCS7 3 ,
171.Xr i2d_PKCS7_bio_stream 3 ,
172and
173.Xr PEM_write_bio_PKCS7_stream 3 , 172.Xr PEM_write_bio_PKCS7_stream 3 ,
173and
174.Xr i2d_PKCS7_bio_stream 3
174finalize the structure. 175finalize the structure.
175Alternatively finalization can be performed by obtaining the streaming 176Alternatively finalization can be performed by obtaining the streaming
176ASN.1 177ASN.1
@@ -196,7 +197,7 @@ if the
196flag is set. 197flag is set.
197One or more signers can be added using the function 198One or more signers can be added using the function
198.Xr PKCS7_sign_add_signer 3 . 199.Xr PKCS7_sign_add_signer 3 .
199.Fn PKCS7_final 200.Xr PKCS7_final 3
200must also be called to finalize the structure if streaming is not 201must also be called to finalize the structure if streaming is not
201enabled. 202enabled.
202Alternative signing digests can also be specified using this method. 203Alternative signing digests can also be specified using this method.
@@ -228,6 +229,7 @@ The error can be obtained from
228.Xr ERR_get_error 3 . 229.Xr ERR_get_error 3 .
229.Sh SEE ALSO 230.Sh SEE ALSO
230.Xr PKCS7_encrypt 3 , 231.Xr PKCS7_encrypt 3 ,
232.Xr PKCS7_final 3 ,
231.Xr PKCS7_new 3 , 233.Xr PKCS7_new 3 ,
232.Xr PKCS7_sign_add_signer 3 , 234.Xr PKCS7_sign_add_signer 3 ,
233.Xr PKCS7_verify 3 235.Xr PKCS7_verify 3
diff --git a/src/lib/libcrypto/man/PKCS7_sign_add_signer.3 b/src/lib/libcrypto/man/PKCS7_sign_add_signer.3
index 41d57c2c26..f8024d9b5c 100644
--- a/src/lib/libcrypto/man/PKCS7_sign_add_signer.3
+++ b/src/lib/libcrypto/man/PKCS7_sign_add_signer.3
@@ -1,5 +1,5 @@
1.\" $OpenBSD: PKCS7_sign_add_signer.3,v 1.10 2019/06/14 13:59:32 schwarze Exp $ 1.\" $OpenBSD: PKCS7_sign_add_signer.3,v 1.11 2020/06/03 13:41:27 schwarze Exp $
2.\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 2.\" full merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
3.\" 3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
5.\" Copyright (c) 2007, 2008, 2009, 2015 The OpenSSL Project. 5.\" Copyright (c) 2007, 2008, 2009, 2015 The OpenSSL Project.
@@ -49,7 +49,7 @@
49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\" 51.\"
52.Dd $Mdocdate: June 14 2019 $ 52.Dd $Mdocdate: June 3 2020 $
53.Dt PKCS7_SIGN_ADD_SIGNER 3 53.Dt PKCS7_SIGN_ADD_SIGNER 3
54.Os 54.Os
55.Sh NAME 55.Sh NAME
@@ -100,7 +100,7 @@ flag is set, the returned
100.Dv PKCS7 100.Dv PKCS7
101structure is not complete and must be 101structure is not complete and must be
102finalized either by streaming (if applicable) or by a call to 102finalized either by streaming (if applicable) or by a call to
103.Fn PKCS7_final . 103.Xr PKCS7_final 3 .
104.Pp 104.Pp
105The main purpose of this function is to provide finer control over a 105The main purpose of this function is to provide finer control over a
106PKCS#7 signed data structure where the simpler 106PKCS#7 signed data structure where the simpler
@@ -174,6 +174,7 @@ In some cases of failure, the reason can be determined with
174.Xr ERR_get_error 3 . 174.Xr ERR_get_error 3 .
175.Sh SEE ALSO 175.Sh SEE ALSO
176.Xr EVP_DigestInit 3 , 176.Xr EVP_DigestInit 3 ,
177.Xr PKCS7_final 3 ,
177.Xr PKCS7_new 3 , 178.Xr PKCS7_new 3 ,
178.Xr PKCS7_sign 3 179.Xr PKCS7_sign 3
179.Sh HISTORY 180.Sh HISTORY
diff --git a/src/lib/libcrypto/man/SMIME_write_PKCS7.3 b/src/lib/libcrypto/man/SMIME_write_PKCS7.3
index 8baf6689a6..39d8b5d859 100644
--- a/src/lib/libcrypto/man/SMIME_write_PKCS7.3
+++ b/src/lib/libcrypto/man/SMIME_write_PKCS7.3
@@ -1,5 +1,5 @@
1.\" $OpenBSD: SMIME_write_PKCS7.3,v 1.6 2019/06/14 13:59:32 schwarze Exp $ 1.\" $OpenBSD: SMIME_write_PKCS7.3,v 1.7 2020/06/03 13:41:27 schwarze Exp $
2.\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 2.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
3.\" 3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
5.\" Copyright (c) 2002, 2003, 2006, 2007, 2015 The OpenSSL Project. 5.\" Copyright (c) 2002, 2003, 2006, 2007, 2015 The OpenSSL Project.
@@ -49,7 +49,7 @@
49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\" 51.\"
52.Dd $Mdocdate: June 14 2019 $ 52.Dd $Mdocdate: June 3 2020 $
53.Dt SMIME_WRITE_PKCS7 3 53.Dt SMIME_WRITE_PKCS7 3
54.Os 54.Os
55.Sh NAME 55.Sh NAME
@@ -132,7 +132,9 @@ otherwise 0 is returned and an error code can be retrieved with
132.Xr ERR_get_error 3 . 132.Xr ERR_get_error 3 .
133.Sh SEE ALSO 133.Sh SEE ALSO
134.Xr i2d_PKCS7_bio_stream 3 , 134.Xr i2d_PKCS7_bio_stream 3 ,
135.Xr PEM_write_bio_PKCS7_stream 3 ,
135.Xr PEM_write_PKCS7 3 , 136.Xr PEM_write_PKCS7 3 ,
137.Xr PKCS7_final 3 ,
136.Xr PKCS7_new 3 , 138.Xr PKCS7_new 3 ,
137.Xr SMIME_read_PKCS7 3 139.Xr SMIME_read_PKCS7 3
138.Sh HISTORY 140.Sh HISTORY
diff --git a/src/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 b/src/lib/libcrypto/man/i2d_PKCS7_bio_stream.3
index 463d861bec..3d5df72b3f 100644
--- a/src/lib/libcrypto/man/i2d_PKCS7_bio_stream.3
+++ b/src/lib/libcrypto/man/i2d_PKCS7_bio_stream.3
@@ -1,5 +1,5 @@
1.\" $OpenBSD: i2d_PKCS7_bio_stream.3,v 1.7 2018/03/23 04:34:23 schwarze Exp $ 1.\" $OpenBSD: i2d_PKCS7_bio_stream.3,v 1.8 2020/06/03 13:41:27 schwarze Exp $
2.\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 2.\" OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
3.\" 3.\"
4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 4.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
5.\" Copyright (c) 2007, 2008, 2009, 2013 The OpenSSL Project. 5.\" Copyright (c) 2007, 2008, 2009, 2013 The OpenSSL Project.
@@ -49,7 +49,7 @@
49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\" 51.\"
52.Dd $Mdocdate: March 23 2018 $ 52.Dd $Mdocdate: June 3 2020 $
53.Dt I2D_PKCS7_BIO_STREAM 3 53.Dt I2D_PKCS7_BIO_STREAM 3
54.Os 54.Os
55.Sh NAME 55.Sh NAME
@@ -82,6 +82,7 @@ returns 1 for success or 0 for failure.
82.Xr ERR_get_error 3 , 82.Xr ERR_get_error 3 ,
83.Xr PEM_write_bio_PKCS7_stream 3 , 83.Xr PEM_write_bio_PKCS7_stream 3 ,
84.Xr PEM_write_PKCS7 3 , 84.Xr PEM_write_PKCS7 3 ,
85.Xr PKCS7_final 3 ,
85.Xr PKCS7_new 3 , 86.Xr PKCS7_new 3 ,
86.Xr SMIME_write_PKCS7 3 87.Xr SMIME_write_PKCS7 3
87.Sh HISTORY 88.Sh HISTORY