summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/man/BIO_ctrl.36
-rw-r--r--src/lib/libcrypto/man/BIO_f_asn1.35
-rw-r--r--src/lib/libcrypto/man/BIO_new_CMS.35
-rw-r--r--src/lib/libcrypto/man/BIO_new_NDEF.3120
-rw-r--r--src/lib/libcrypto/man/Makefile5
-rw-r--r--src/lib/libcrypto/man/PEM_write_bio_ASN1_stream.390
-rw-r--r--src/lib/libcrypto/man/PEM_write_bio_CMS_stream.35
-rw-r--r--src/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.35
-rw-r--r--src/lib/libcrypto/man/RSA_check_key.38
-rw-r--r--src/lib/libcrypto/man/SMIME_crlf_copy.35
-rw-r--r--src/lib/libcrypto/man/SMIME_write_ASN1.39
-rw-r--r--src/lib/libcrypto/man/i2d_ASN1_bio_stream.396
-rw-r--r--src/lib/libcrypto/man/i2d_CMS_bio_stream.35
-rw-r--r--src/lib/libcrypto/man/i2d_PKCS7_bio_stream.35
14 files changed, 26 insertions, 343 deletions
diff --git a/src/lib/libcrypto/man/BIO_ctrl.3 b/src/lib/libcrypto/man/BIO_ctrl.3
index 1efcacfb80..b77c69b5bd 100644
--- a/src/lib/libcrypto/man/BIO_ctrl.3
+++ b/src/lib/libcrypto/man/BIO_ctrl.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: BIO_ctrl.3,v 1.22 2023/04/28 16:22:45 schwarze Exp $ 1.\" $OpenBSD: BIO_ctrl.3,v 1.23 2023/05/01 07:28:11 tb Exp $
2.\" full merge up to: OpenSSL 24a535eaf Tue Sep 22 13:14:20 2020 +0100 2.\" full merge up to: OpenSSL 24a535eaf Tue Sep 22 13:14:20 2020 +0100
3.\" selective merge up to: OpenSSL 0c5bc96f Tue Mar 15 13:57:22 2022 +0000 3.\" selective merge up to: OpenSSL 0c5bc96f Tue Mar 15 13:57:22 2022 +0000
4.\" 4.\"
@@ -66,7 +66,7 @@
66.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 66.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
67.\" OF THE POSSIBILITY OF SUCH DAMAGE. 67.\" OF THE POSSIBILITY OF SUCH DAMAGE.
68.\" 68.\"
69.Dd $Mdocdate: April 28 2023 $ 69.Dd $Mdocdate: May 1 2023 $
70.Dt BIO_CTRL 3 70.Dt BIO_CTRL 3
71.Os 71.Os
72.Sh NAME 72.Sh NAME
@@ -433,7 +433,7 @@ They are documented in the following manual pages:
433.It Dv BIO_C_GET_EX_ARG Ta Xr BIO_f_asn1 3 433.It Dv BIO_C_GET_EX_ARG Ta Xr BIO_f_asn1 3
434.It Dv BIO_C_GET_PREFIX Ta Xr BIO_asn1_get_prefix 3 434.It Dv BIO_C_GET_PREFIX Ta Xr BIO_asn1_get_prefix 3
435.It Dv BIO_C_GET_SUFFIX Ta Xr BIO_asn1_get_suffix 3 435.It Dv BIO_C_GET_SUFFIX Ta Xr BIO_asn1_get_suffix 3
436.It Dv BIO_C_SET_EX_ARG Ta Xr BIO_f_asn1 3 , Xr BIO_new_NDEF 3 436.It Dv BIO_C_SET_EX_ARG Ta Xr BIO_f_asn1 3
437.It Dv BIO_C_SET_PREFIX Ta Xr BIO_asn1_set_prefix 3 437.It Dv BIO_C_SET_PREFIX Ta Xr BIO_asn1_set_prefix 3
438.It Dv BIO_C_SET_SUFFIX Ta Xr BIO_asn1_set_suffix 3 438.It Dv BIO_C_SET_SUFFIX Ta Xr BIO_asn1_set_suffix 3
439.It Dv BIO_CTRL_DGRAM_GET_FALLBACK_MTU Ta Xr BIO_dgram_set_peer 3 439.It Dv BIO_CTRL_DGRAM_GET_FALLBACK_MTU Ta Xr BIO_dgram_set_peer 3
diff --git a/src/lib/libcrypto/man/BIO_f_asn1.3 b/src/lib/libcrypto/man/BIO_f_asn1.3
index 3bf5a51204..19aa1f1ba7 100644
--- a/src/lib/libcrypto/man/BIO_f_asn1.3
+++ b/src/lib/libcrypto/man/BIO_f_asn1.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: BIO_f_asn1.3,v 1.2 2021/12/12 17:31:18 schwarze Exp $ 1.\" $OpenBSD: BIO_f_asn1.3,v 1.3 2023/05/01 07:28:11 tb Exp $
2.\" 2.\"
3.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> 3.\" Copyright (c) 2021 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: December 12 2021 $ 17.Dd $Mdocdate: May 1 2023 $
18.Dt BIO_F_ASN1 3 18.Dt BIO_F_ASN1 3
19.Os 19.Os
20.Sh NAME 20.Sh NAME
@@ -219,7 +219,6 @@ that is not properly initialized.
219.Xr ASN1_put_object 3 , 219.Xr ASN1_put_object 3 ,
220.Xr BIO_ctrl 3 , 220.Xr BIO_ctrl 3 ,
221.Xr BIO_new 3 , 221.Xr BIO_new 3 ,
222.Xr BIO_new_NDEF 3 ,
223.Xr BIO_next 3 , 222.Xr BIO_next 3 ,
224.Xr BIO_write 3 , 223.Xr BIO_write 3 ,
225.Xr i2d_ASN1_OCTET_STRING 3 224.Xr i2d_ASN1_OCTET_STRING 3
diff --git a/src/lib/libcrypto/man/BIO_new_CMS.3 b/src/lib/libcrypto/man/BIO_new_CMS.3
index c1c47e3ad3..ab93e1c00c 100644
--- a/src/lib/libcrypto/man/BIO_new_CMS.3
+++ b/src/lib/libcrypto/man/BIO_new_CMS.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: BIO_new_CMS.3,v 1.8 2021/12/12 17:31:18 schwarze Exp $ 1.\" $OpenBSD: BIO_new_CMS.3,v 1.9 2023/05/01 07:28:11 tb Exp $
2.\" full merge up to: OpenSSL df75c2bfc Dec 9 01:02:36 2018 +0100 2.\" full merge up to: OpenSSL df75c2bfc 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>.
@@ -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: December 12 2021 $ 51.Dd $Mdocdate: May 1 2023 $
52.Dt BIO_NEW_CMS 3 52.Dt BIO_NEW_CMS 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
@@ -128,7 +128,6 @@ The error can be obtained from
128.Xr ERR_get_error 3 . 128.Xr ERR_get_error 3 .
129.Sh SEE ALSO 129.Sh SEE ALSO
130.Xr BIO_new 3 , 130.Xr BIO_new 3 ,
131.Xr BIO_new_NDEF 3 ,
132.Xr CMS_ContentInfo_new 3 , 131.Xr CMS_ContentInfo_new 3 ,
133.Xr CMS_encrypt 3 , 132.Xr CMS_encrypt 3 ,
134.Xr CMS_sign 3 133.Xr CMS_sign 3
diff --git a/src/lib/libcrypto/man/BIO_new_NDEF.3 b/src/lib/libcrypto/man/BIO_new_NDEF.3
deleted file mode 100644
index 9a16924773..0000000000
--- a/src/lib/libcrypto/man/BIO_new_NDEF.3
+++ /dev/null
@@ -1,120 +0,0 @@
1.\" $OpenBSD: BIO_new_NDEF.3,v 1.3 2021/12/13 13:46:09 schwarze Exp $
2.\"
3.\" Copyright (c) 2021 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 2021 $
18.Dt BIO_NEW_NDEF 3
19.Os
20.Sh NAME
21.Nm BIO_new_NDEF
22.Nd generic constructor for streaming BIO chains
23.Sh SYNOPSIS
24.In openssl/asn1.h
25.Ft BIO *
26.Fo BIO_new_NDEF
27.Fa "BIO *out_bio"
28.Fa "ASN1_VALUE *val_in"
29.Fa "const ASN1_ITEM *it"
30.Fc
31.Sh DESCRIPTION
32.Fn BIO_new_NDEF
33is a wrapper around
34.Xr BIO_new 3
35with a BIO
36.Fa type
37of
38.Xr BIO_f_asn1 3
39that supports streaming by providing the following additional functionality.
40.Pp
41The data type
42.Fa it
43needs to support streaming.
44Of the data types built into the library, currently only
45.Vt CMS_ContentInfo
46and
47.Vt PKCS7
48support that.
49The argument
50.Fa val_in
51needs to be of that type.
52.Pp
53A structure containing the following data is saved using
54.Xr BIO_ctrl 3
55with an argument of
56.Dv BIO_C_SET_EX_ARG
57as described in
58.Xr BIO_f_asn1 3 :
59.Pp
60.Bl -bullet -compact -offset indent
61.It
62the data type
63.Fa it
64.It
65the input value
66.Fa val_in
67.It
68a pointer to the
69.Vt unsigned char *
70content buffer of
71.Fa val_in ,
72extracted using a type-specific callback function
73.It
74a pointer to the new asn1 BIO
75.It
76a pointer to the beginning of the BIO chain;
77this may be the asn1 BIO itself, or one or more filter BIOs
78may be prepended to it in a type-specific manner,
79for example digest or encoding BIOs
80.El
81.Pp
82In order to handle the output from the new asn1 BIO, the
83.Fa out_bio
84is appended to it using
85.Xr BIO_push 3 .
86The
87.Fa out_bio
88can be a single sink BIO or a BIO chain ending in a sink BIO.
89.Pp
90A built-in
91.Fa prefix
92function is installed with
93.Xr BIO_asn1_set_prefix 3
94that encodes
95.Fa val_in
96using
97.Xr ASN1_item_ndef_i2d 3 ,
98and a built-in
99.Fa suffix
100function is installed that finalizes the written structures
101in a type-specific way.
102.Sh RETURN VALUES
103.Fn BIO_new_NDEF
104returns a pointer to the beginning of the constructed BIO chain or
105.Dv NULL
106if
107.Fa it
108does not support streaming or if memory allocation fails.
109.Sh SEE ALSO
110.Xr ASN1_item_ndef_i2d 3 ,
111.Xr BIO_ctrl 3 ,
112.Xr BIO_f_asn1 3 ,
113.Xr BIO_new 3 ,
114.Xr BIO_new_CMS 3 ,
115.Xr BIO_push 3 ,
116.Xr i2d_ASN1_bio_stream 3
117.Sh HISTORY
118.Fn BIO_new_NDEF
119first appeared in OpenSSL 1.0.0 and has been available since
120.Ox 4.9 .
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile
index 42b4c2fbe1..abefb79c1f 100644
--- a/src/lib/libcrypto/man/Makefile
+++ b/src/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.250 2023/04/30 19:40:23 tb Exp $ 1# $OpenBSD: Makefile,v 1.251 2023/05/01 07:28:11 tb Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
@@ -51,7 +51,6 @@ MAN= \
51 BIO_meth_new.3 \ 51 BIO_meth_new.3 \
52 BIO_new.3 \ 52 BIO_new.3 \
53 BIO_new_CMS.3 \ 53 BIO_new_CMS.3 \
54 BIO_new_NDEF.3 \
55 BIO_printf.3 \ 54 BIO_printf.3 \
56 BIO_push.3 \ 55 BIO_push.3 \
57 BIO_read.3 \ 56 BIO_read.3 \
@@ -239,7 +238,6 @@ MAN= \
239 PEM_bytes_read_bio.3 \ 238 PEM_bytes_read_bio.3 \
240 PEM_read.3 \ 239 PEM_read.3 \
241 PEM_read_bio_PrivateKey.3 \ 240 PEM_read_bio_PrivateKey.3 \
242 PEM_write_bio_ASN1_stream.3 \
243 PEM_write_bio_CMS_stream.3 \ 241 PEM_write_bio_CMS_stream.3 \
244 PEM_write_bio_PKCS7_stream.3 \ 242 PEM_write_bio_PKCS7_stream.3 \
245 PKCS12_SAFEBAG_new.3 \ 243 PKCS12_SAFEBAG_new.3 \
@@ -421,7 +419,6 @@ MAN= \
421 evp.3 \ 419 evp.3 \
422 get_rfc3526_prime_8192.3 \ 420 get_rfc3526_prime_8192.3 \
423 i2a_ASN1_STRING.3 \ 421 i2a_ASN1_STRING.3 \
424 i2d_ASN1_bio_stream.3 \
425 i2d_CMS_bio_stream.3 \ 422 i2d_CMS_bio_stream.3 \
426 i2d_PKCS7_bio_stream.3 \ 423 i2d_PKCS7_bio_stream.3 \
427 lh_new.3 \ 424 lh_new.3 \
diff --git a/src/lib/libcrypto/man/PEM_write_bio_ASN1_stream.3 b/src/lib/libcrypto/man/PEM_write_bio_ASN1_stream.3
deleted file mode 100644
index 7b965e7b76..0000000000
--- a/src/lib/libcrypto/man/PEM_write_bio_ASN1_stream.3
+++ /dev/null
@@ -1,90 +0,0 @@
1.\" $OpenBSD: PEM_write_bio_ASN1_stream.3,v 1.1 2021/12/13 18:55:22 schwarze Exp $
2.\"
3.\" Copyright (c) 2021 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 2021 $
18.Dt PEM_WRITE_BIO_ASN1_STREAM 3
19.Os
20.Sh NAME
21.Nm PEM_write_bio_ASN1_stream
22.Nd generic PEM encoder
23.Sh SYNOPSIS
24.In openssl/asn1.h
25.Ft int
26.Fo PEM_write_bio_ASN1_stream
27.Fa "BIO *out_bio"
28.Fa "ASN1_VALUE *val_in"
29.Fa "BIO *in_bio"
30.Fa "int flags"
31.Fa "const char *hdr"
32.Fa "const ASN1_ITEM *it"
33.Fc
34.Sh DESCRIPTION
35.Fn PEM_write_bio_ASN1_stream
36writes the
37.Fa val_in
38argument of type
39.Fa it
40to
41.Fa out_bio
42in PEM format, that is, BER- and base64-encoded and surrounded by
43.Qq -----BEGIN ...-----
44and
45.Qq -----END ...-----
46lines with the
47.Fa hdr
48argument in place of the ellipses.
49.Pp
50The
51.Fa flags
52are passed through to
53.Xr i2d_ASN1_bio_stream 3 .
54In particular, if the bit
55.Dv SMIME_STREAM
56is set, streaming is performed, reading the content from
57.Fa in_bio .
58Streaming is only supported if
59.Fa val_in
60is of the type
61.Vt CMS_ContentInfo
62or
63.Vt PKCS7 .
64.Pp
65If the bit
66.Dv SMIME_STREAM
67is not set, the arguments
68.Fa in_bio
69and
70.Fa flags
71are ignored and distinguished encoding rules (DER) are used.
72.Sh RETURN VALUES
73.Fn PEM_write_bio_ASN1_stream
74is intended to return 1 on success or 0 on failure.
75.Sh SEE ALSO
76.Xr ASN1_item_i2d_bio 3 ,
77.Xr BIO_f_base64 3 ,
78.Xr BIO_new 3 ,
79.Xr i2d_ASN1_bio_stream 3 ,
80.Xr PEM_write_bio 3 ,
81.Xr PEM_write_bio_CMS_stream 3 ,
82.Xr PEM_write_bio_PKCS7_stream 3
83.Sh HISTORY
84.Fn PEM_write_bio_ASN1_stream
85first appeared in OpenSSL 1.0.0 and has been available since
86.Ox 4.9 .
87.Sh BUGS
88Many kinds of errors are silently ignored.
89This function may return 1 even if it only produced partial output
90or no output at all.
diff --git a/src/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 b/src/lib/libcrypto/man/PEM_write_bio_CMS_stream.3
index bd17e410bb..88adbba74f 100644
--- a/src/lib/libcrypto/man/PEM_write_bio_CMS_stream.3
+++ b/src/lib/libcrypto/man/PEM_write_bio_CMS_stream.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: PEM_write_bio_CMS_stream.3,v 1.5 2021/12/13 18:55:22 schwarze Exp $ 1.\" $OpenBSD: PEM_write_bio_CMS_stream.3,v 1.6 2023/05/01 07:28:11 tb Exp $
2.\" full merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 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>.
@@ -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: December 13 2021 $ 51.Dd $Mdocdate: May 1 2023 $
52.Dt PEM_WRITE_BIO_CMS_STREAM 3 52.Dt PEM_WRITE_BIO_CMS_STREAM 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
@@ -87,7 +87,6 @@ returns 1 for success or 0 for failure.
87.Xr ERR_get_error 3 , 87.Xr ERR_get_error 3 ,
88.Xr i2d_CMS_bio_stream 3 , 88.Xr i2d_CMS_bio_stream 3 ,
89.Xr PEM_write 3 , 89.Xr PEM_write 3 ,
90.Xr PEM_write_bio_ASN1_stream 3 ,
91.Xr SMIME_write_CMS 3 90.Xr SMIME_write_CMS 3
92.Sh HISTORY 91.Sh HISTORY
93.Fn PEM_write_bio_CMS_stream 92.Fn PEM_write_bio_CMS_stream
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 5b4175e4f3..9050b8562f 100644
--- a/src/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3
+++ b/src/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: PEM_write_bio_PKCS7_stream.3,v 1.11 2021/12/13 18:55:22 schwarze Exp $ 1.\" $OpenBSD: PEM_write_bio_PKCS7_stream.3,v 1.12 2023/05/01 07:28:11 tb Exp $
2.\" full merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 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>.
@@ -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: December 13 2021 $ 51.Dd $Mdocdate: May 1 2023 $
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
@@ -80,7 +80,6 @@ otherwise 0 is returned and an error code can be retrieved with
80.Sh SEE ALSO 80.Sh SEE ALSO
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_bio_ASN1_stream 3 ,
84.Xr PEM_write_PKCS7 3 , 83.Xr PEM_write_PKCS7 3 ,
85.Xr PKCS7_final 3 , 84.Xr PKCS7_final 3 ,
86.Xr PKCS7_new 3 , 85.Xr PKCS7_new 3 ,
diff --git a/src/lib/libcrypto/man/RSA_check_key.3 b/src/lib/libcrypto/man/RSA_check_key.3
index 96b1468433..c1e6379ac5 100644
--- a/src/lib/libcrypto/man/RSA_check_key.3
+++ b/src/lib/libcrypto/man/RSA_check_key.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: RSA_check_key.3,v 1.8 2021/03/12 05:18:00 jsg Exp $ 1.\" $OpenBSD: RSA_check_key.3,v 1.9 2023/05/01 07:28:11 tb Exp $
2.\" OpenSSL 6859cf74 Sep 25 13:33:28 2002 +0000 2.\" OpenSSL 6859cf74 Sep 25 13:33:28 2002 +0000
3.\" 3.\"
4.\" This file was written by Ulf Moeller <ulf@openssl.org> and 4.\" This file was written by Ulf Moeller <ulf@openssl.org> and
@@ -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 12 2021 $ 52.Dd $Mdocdate: May 1 2023 $
53.Dt RSA_CHECK_KEY 3 53.Dt RSA_CHECK_KEY 3
54.Os 54.Os
55.Sh NAME 55.Sh NAME
@@ -142,7 +142,9 @@ structure elements directly, bypassing the
142.Vt RSA_METHOD 142.Vt RSA_METHOD
143table altogether (and completely violating encapsulation and 143table altogether (and completely violating encapsulation and
144object-orientation in the process). 144object-orientation in the process).
145The best fix will probably be to introduce a check_key() handler 145The best fix will probably be to introduce a
146.Fn check_key
147handler
146to the 148to the
147.Vt RSA_METHOD 149.Vt RSA_METHOD
148function table so that alternative implementations can also provide 150function table so that alternative implementations can also provide
diff --git a/src/lib/libcrypto/man/SMIME_crlf_copy.3 b/src/lib/libcrypto/man/SMIME_crlf_copy.3
index 3062634f38..3b46138473 100644
--- a/src/lib/libcrypto/man/SMIME_crlf_copy.3
+++ b/src/lib/libcrypto/man/SMIME_crlf_copy.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: SMIME_crlf_copy.3,v 1.2 2021/12/14 15:22:49 schwarze Exp $ 1.\" $OpenBSD: SMIME_crlf_copy.3,v 1.3 2023/05/01 07:28:11 tb Exp $
2.\" 2.\"
3.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> 3.\" Copyright (c) 2021 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: December 14 2021 $ 17.Dd $Mdocdate: May 1 2023 $
18.Dt SMIME_CRLF_COPY 3 18.Dt SMIME_CRLF_COPY 3
19.Os 19.Os
20.Sh NAME 20.Sh NAME
@@ -78,7 +78,6 @@ is intended to return 1 on success or 0 on failure.
78.Xr BIO_new 3 , 78.Xr BIO_new 3 ,
79.Xr BIO_push 3 , 79.Xr BIO_push 3 ,
80.Xr BIO_read 3 , 80.Xr BIO_read 3 ,
81.Xr i2d_ASN1_bio_stream 3 ,
82.Xr SMIME_text 3 , 81.Xr SMIME_text 3 ,
83.Xr SMIME_write_ASN1 3 82.Xr SMIME_write_ASN1 3
84.Sh HISTORY 83.Sh HISTORY
diff --git a/src/lib/libcrypto/man/SMIME_write_ASN1.3 b/src/lib/libcrypto/man/SMIME_write_ASN1.3
index 971cd226dd..a02fa58570 100644
--- a/src/lib/libcrypto/man/SMIME_write_ASN1.3
+++ b/src/lib/libcrypto/man/SMIME_write_ASN1.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: SMIME_write_ASN1.3,v 1.1 2021/12/13 17:24:39 schwarze Exp $ 1.\" $OpenBSD: SMIME_write_ASN1.3,v 1.2 2023/05/01 07:28:11 tb Exp $
2.\" 2.\"
3.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> 3.\" Copyright (c) 2021 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: December 13 2021 $ 17.Dd $Mdocdate: May 1 2023 $
18.Dt SMIME_WRITE_ASN1 3 18.Dt SMIME_WRITE_ASN1 3
19.Os 19.Os
20.Sh NAME 20.Sh NAME
@@ -126,9 +126,7 @@ or
126.Qq application/pkcs7-signature 126.Qq application/pkcs7-signature
127are used instead. 127are used instead.
128.It Dv SMIME_STREAM 128.It Dv SMIME_STREAM
129Perform streaming by passing this flag through to 129Perform streaming by reading the content from
130.Xr i2d_ASN1_bio_stream 3
131and reading the content from
132.Fa in_bio . 130.Fa in_bio .
133This only works if 131This only works if
134.Dv SMIME_DETACHED 132.Dv SMIME_DETACHED
@@ -151,7 +149,6 @@ is intended to return 1 on success or 0 on failure.
151.Xr ASN1_item_i2d_bio 3 , 149.Xr ASN1_item_i2d_bio 3 ,
152.Xr BIO_f_base64 3 , 150.Xr BIO_f_base64 3 ,
153.Xr BIO_new 3 , 151.Xr BIO_new 3 ,
154.Xr i2d_ASN1_bio_stream 3 ,
155.Xr SMIME_crlf_copy 3 , 152.Xr SMIME_crlf_copy 3 ,
156.Xr SMIME_write_CMS 3 , 153.Xr SMIME_write_CMS 3 ,
157.Xr SMIME_write_PKCS7 3 , 154.Xr SMIME_write_PKCS7 3 ,
diff --git a/src/lib/libcrypto/man/i2d_ASN1_bio_stream.3 b/src/lib/libcrypto/man/i2d_ASN1_bio_stream.3
deleted file mode 100644
index 17ac95778c..0000000000
--- a/src/lib/libcrypto/man/i2d_ASN1_bio_stream.3
+++ /dev/null
@@ -1,96 +0,0 @@
1.\" $OpenBSD: i2d_ASN1_bio_stream.3,v 1.3 2021/12/13 18:55:22 schwarze Exp $
2.\"
3.\" Copyright (c) 2021 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 2021 $
18.Dt I2D_ASN1_BIO_STREAM 3
19.Os
20.Sh NAME
21.Nm i2d_ASN1_bio_stream
22.Nd generic BER streamer
23.Sh SYNOPSIS
24.In openssl/asn1.h
25.Ft int
26.Fo i2d_ASN1_bio_stream
27.Fa "BIO *out_bio"
28.Fa "ASN1_VALUE *val_in"
29.Fa "BIO *in_bio"
30.Fa "int flags"
31.Fa "const ASN1_ITEM *it"
32.Fc
33.Sh DESCRIPTION
34If the bit
35.Dv SMIME_STREAM
36is not set in the
37.Fa flags
38argument,
39.Fn i2d_ASN1_bio_stream
40does the same as
41.Xr ASN1_item_i2d_bio 3 ,
42ignoring the
43.Fa in_bio
44and
45.Fa flags
46arguments.
47.Pp
48If the bit
49.Dv SMIME_STREAM
50is set, it creates a streaming BIO with
51.Xr BIO_new_NDEF 3 ,
52copies the data from
53.Fa in_bio
54to it using
55.Xr SMIME_crlf_copy 3 ,
56finalizes the output with
57.Xr BIO_flush 3 ,
58and frees the newly created BIOs up to but not including
59.Fa out_bio .
60.Pp
61If
62.Fa it
63is
64.Va PKCS7_it ,
65this function behaves exactly as
66.Xr i2d_PKCS7_bio_stream 3 ;
67for
68.Va CMS_ContentInfo_it ,
69it behaves exactly as
70.Xr i2d_CMS_bio_stream 3 .
71For other values of
72.Fa it ,
73the function fails.
74.Sh RETURN VALUES
75.Fn i2d_ASN1_bio_stream
76is intended to return 1 on success or 0 on failure.
77.Sh SEE ALSO
78.Xr ASN1_item_i2d_bio 3 ,
79.Xr ASN1_item_ndef_i2d 3 ,
80.Xr BIO_flush 3 ,
81.Xr BIO_new 3 ,
82.Xr BIO_new_NDEF 3 ,
83.Xr BIO_push 3 ,
84.Xr i2d_CMS_bio_stream 3 ,
85.Xr i2d_PKCS7_bio_stream 3 ,
86.Xr PEM_write_bio_ASN1_stream 3 ,
87.Xr SMIME_crlf_copy 3 ,
88.Xr SMIME_write_ASN1 3
89.Sh HISTORY
90.Fn i2d_ASN1_bio_stream
91first appeared in OpenSSL 1.0.0 and has been available since
92.Ox 4.9 .
93.Sh BUGS
94Many kinds of errors are silently ignored.
95This function may return 1 even if it only produced partial output
96or no output at all.
diff --git a/src/lib/libcrypto/man/i2d_CMS_bio_stream.3 b/src/lib/libcrypto/man/i2d_CMS_bio_stream.3
index b3c29af3a2..b60468464c 100644
--- a/src/lib/libcrypto/man/i2d_CMS_bio_stream.3
+++ b/src/lib/libcrypto/man/i2d_CMS_bio_stream.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: i2d_CMS_bio_stream.3,v 1.5 2021/12/13 13:46:09 schwarze Exp $ 1.\" $OpenBSD: i2d_CMS_bio_stream.3,v 1.6 2023/05/01 07:28:11 tb Exp $
2.\" full merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 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>.
@@ -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: December 13 2021 $ 51.Dd $Mdocdate: May 1 2023 $
52.Dt I2D_CMS_BIO_STREAM 3 52.Dt I2D_CMS_BIO_STREAM 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
@@ -83,7 +83,6 @@ returns 1 for success or 0 for failure.
83.Xr CMS_encrypt 3 , 83.Xr CMS_encrypt 3 ,
84.Xr CMS_sign 3 , 84.Xr CMS_sign 3 ,
85.Xr ERR_get_error 3 , 85.Xr ERR_get_error 3 ,
86.Xr i2d_ASN1_bio_stream 3 ,
87.Xr PEM_write_bio_CMS_stream 3 , 86.Xr PEM_write_bio_CMS_stream 3 ,
88.Xr SMIME_write_CMS 3 87.Xr SMIME_write_CMS 3
89.Sh HISTORY 88.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 b3416f5d48..7a47ba3026 100644
--- a/src/lib/libcrypto/man/i2d_PKCS7_bio_stream.3
+++ b/src/lib/libcrypto/man/i2d_PKCS7_bio_stream.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: i2d_PKCS7_bio_stream.3,v 1.10 2021/12/13 13:46:09 schwarze Exp $ 1.\" $OpenBSD: i2d_PKCS7_bio_stream.3,v 1.11 2023/05/01 07:28:11 tb Exp $
2.\" OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 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>.
@@ -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: December 13 2021 $ 52.Dd $Mdocdate: May 1 2023 $
53.Dt I2D_PKCS7_BIO_STREAM 3 53.Dt I2D_PKCS7_BIO_STREAM 3
54.Os 54.Os
55.Sh NAME 55.Sh NAME
@@ -80,7 +80,6 @@ returns 1 for success or 0 for failure.
80.Sh SEE ALSO 80.Sh SEE ALSO
81.Xr BIO_new 3 , 81.Xr BIO_new 3 ,
82.Xr ERR_get_error 3 , 82.Xr ERR_get_error 3 ,
83.Xr i2d_ASN1_bio_stream 3 ,
84.Xr PEM_write_bio_PKCS7_stream 3 , 83.Xr PEM_write_bio_PKCS7_stream 3 ,
85.Xr PEM_write_PKCS7 3 , 84.Xr PEM_write_PKCS7 3 ,
86.Xr PKCS7_final 3 , 85.Xr PKCS7_final 3 ,