summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2021-12-13 13:46:09 +0000
committerschwarze <>2021-12-13 13:46:09 +0000
commiteb7e84848bf9f5bb74cf5aaf96d14db842116c2d (patch)
tree2340714ec65abd5a48465059fe1b76115dae97c9
parent2079bd78020b8fe474a6b532e0144a4a39456ffb (diff)
downloadopenbsd-eb7e84848bf9f5bb74cf5aaf96d14db842116c2d.tar.gz
openbsd-eb7e84848bf9f5bb74cf5aaf96d14db842116c2d.tar.bz2
openbsd-eb7e84848bf9f5bb74cf5aaf96d14db842116c2d.zip
new manual pages i2d_ASN1_bio_stream(3) and SMIME_crlf_copy(3)
-rw-r--r--src/lib/libcrypto/man/BIO_new_NDEF.37
-rw-r--r--src/lib/libcrypto/man/Makefile4
-rw-r--r--src/lib/libcrypto/man/SMIME_crlf_copy.396
-rw-r--r--src/lib/libcrypto/man/i2d_ASN1_bio_stream.394
-rw-r--r--src/lib/libcrypto/man/i2d_CMS_bio_stream.35
-rw-r--r--src/lib/libcrypto/man/i2d_PKCS7_bio_stream.35
6 files changed, 203 insertions, 8 deletions
diff --git a/src/lib/libcrypto/man/BIO_new_NDEF.3 b/src/lib/libcrypto/man/BIO_new_NDEF.3
index e6af75f0af..9a16924773 100644
--- a/src/lib/libcrypto/man/BIO_new_NDEF.3
+++ b/src/lib/libcrypto/man/BIO_new_NDEF.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: BIO_new_NDEF.3,v 1.2 2021/12/12 18:15:43 schwarze Exp $ 1.\" $OpenBSD: BIO_new_NDEF.3,v 1.3 2021/12/13 13:46:09 schwarze 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: December 13 2021 $
18.Dt BIO_NEW_NDEF 3 18.Dt BIO_NEW_NDEF 3
19.Os 19.Os
20.Sh NAME 20.Sh NAME
@@ -112,7 +112,8 @@ does not support streaming or if memory allocation fails.
112.Xr BIO_f_asn1 3 , 112.Xr BIO_f_asn1 3 ,
113.Xr BIO_new 3 , 113.Xr BIO_new 3 ,
114.Xr BIO_new_CMS 3 , 114.Xr BIO_new_CMS 3 ,
115.Xr BIO_push 3 115.Xr BIO_push 3 ,
116.Xr i2d_ASN1_bio_stream 3
116.Sh HISTORY 117.Sh HISTORY
117.Fn BIO_new_NDEF 118.Fn BIO_new_NDEF
118first appeared in OpenSSL 1.0.0 and has been available since 119first appeared in OpenSSL 1.0.0 and has been available since
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile
index aab725a0e9..2e608bffbb 100644
--- a/src/lib/libcrypto/man/Makefile
+++ b/src/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.223 2021/12/12 17:31:18 schwarze Exp $ 1# $OpenBSD: Makefile,v 1.224 2021/12/13 13:46:09 schwarze Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
@@ -278,6 +278,7 @@ MAN= \
278 RSA_sign_ASN1_OCTET_STRING.3 \ 278 RSA_sign_ASN1_OCTET_STRING.3 \
279 RSA_size.3 \ 279 RSA_size.3 \
280 SHA1.3 \ 280 SHA1.3 \
281 SMIME_crlf_copy.3 \
281 SMIME_read_CMS.3 \ 282 SMIME_read_CMS.3 \
282 SMIME_read_PKCS7.3 \ 283 SMIME_read_PKCS7.3 \
283 SMIME_write_CMS.3 \ 284 SMIME_write_CMS.3 \
@@ -411,6 +412,7 @@ MAN= \
411 evp.3 \ 412 evp.3 \
412 get_rfc3526_prime_8192.3 \ 413 get_rfc3526_prime_8192.3 \
413 i2a_ASN1_STRING.3 \ 414 i2a_ASN1_STRING.3 \
415 i2d_ASN1_bio_stream.3 \
414 i2d_CMS_bio_stream.3 \ 416 i2d_CMS_bio_stream.3 \
415 i2d_PKCS7_bio_stream.3 \ 417 i2d_PKCS7_bio_stream.3 \
416 lh_new.3 \ 418 lh_new.3 \
diff --git a/src/lib/libcrypto/man/SMIME_crlf_copy.3 b/src/lib/libcrypto/man/SMIME_crlf_copy.3
new file mode 100644
index 0000000000..defee581fd
--- /dev/null
+++ b/src/lib/libcrypto/man/SMIME_crlf_copy.3
@@ -0,0 +1,96 @@
1.\" $OpenBSD: SMIME_crlf_copy.3,v 1.1 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 SMIME_CRLF_COPY 3
19.Os
20.Sh NAME
21.Nm SMIME_crlf_copy
22.Nd buffered copy between BIOs
23.Sh SYNOPSIS
24.Ft int
25.Fo SMIME_crlf_copy
26.Fa "BIO *in_bio"
27.Fa "BIO *out_bio"
28.Fa "int flags"
29.Fc
30.Sh DESCRIPTION
31.Fn SMIME_crlf_copy
32copies data from
33.Fa in_bio
34to
35.Fa out_bio .
36To avoid many small write operations on
37.Fa out_bio ,
38a buffering BIO created with
39.Xr BIO_f_buffer 3
40is temporarily prepended to it.
41.Pp
42If the bit
43.Dv SMIME_BINARY
44is set in the
45.Fa flags
46argument, all the data is copied verbatim using
47.Xr BIO_read 3
48and
49.Xr BIO_write 3 .
50.Pp
51Otherwise, the data is read as text.
52All trailing carriage return and newline characters are discarded
53from every input line and a single pair of carriage return and
54newline characters is appended to mark the end of every output line,
55except that the last output line will end without such a pair if
56the last input line does not have a newline character at the end.
57.Pp
58If the bit
59.Dv SMIME_TEXT
60is set in the
61.Fa flags
62argument and the bit
63.Dv SMIME_BINARY
64is not set, the line
65.Qq Content-Type: text/plain
66is prepended to the output
67with two pairs of carriage return and newline characters after it.
68.Pp
69In any case,
70.Xr BIO_flush 3
71is called on the output at the end of the function.
72.Sh RETURN VALUES
73.Fn SMIME_crlf_copy
74is intended to return 1 on success or 0 on failure.
75.Sh SEE ALSO
76.Xr BIO_f_buffer 3 ,
77.Xr BIO_flush 3 ,
78.Xr BIO_new 3 ,
79.Xr BIO_push 3 ,
80.Xr BIO_read 3 ,
81.Xr i2d_ASN1_bio_stream 3 ,
82.Xr SMIME_write_ASN1 3
83.Sh HISTORY
84.Fn SMIME_crlf_copy
85first appeared in OpenSSL 1.0.0 and has been available since
86.Ox 4.9 .
87.Sh BUGS
88.Fn SMIME_crlf_copy
89silently ignores most errors and may return 1
90even if it lost part or all of the data in transit.
91.Pp
92Only blocking BIOs are supported.
93If any of the
94.Vt BIO
95arguments is non-blocking, part or all of the data is likely
96to be silently lost in transit.
diff --git a/src/lib/libcrypto/man/i2d_ASN1_bio_stream.3 b/src/lib/libcrypto/man/i2d_ASN1_bio_stream.3
new file mode 100644
index 0000000000..007d8eefd4
--- /dev/null
+++ b/src/lib/libcrypto/man/i2d_ASN1_bio_stream.3
@@ -0,0 +1,94 @@
1.\" $OpenBSD: i2d_ASN1_bio_stream.3,v 1.1 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 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 SMIME_crlf_copy 3
87.Sh HISTORY
88.Fn i2d_ASN1_bio_stream
89first appeared in OpenSSL 1.0.0 and has been available since
90.Ox 4.9 .
91.Sh BUGS
92Many kinds of errors are silently ignored.
93This function may return 1 even if it only produced partial output
94or 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 efb8902faf..b3c29af3a2 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.4 2019/11/02 15:39:46 schwarze Exp $ 1.\" $OpenBSD: i2d_CMS_bio_stream.3,v 1.5 2021/12/13 13:46:09 schwarze 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: November 2 2019 $ 51.Dd $Mdocdate: December 13 2021 $
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,6 +83,7 @@ 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 ,
86.Xr PEM_write_bio_CMS_stream 3 , 87.Xr PEM_write_bio_CMS_stream 3 ,
87.Xr SMIME_write_CMS 3 88.Xr SMIME_write_CMS 3
88.Sh HISTORY 89.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 a76ee27161..b3416f5d48 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.9 2021/12/09 18:33:34 schwarze Exp $ 1.\" $OpenBSD: i2d_PKCS7_bio_stream.3,v 1.10 2021/12/13 13:46:09 schwarze 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 9 2021 $ 52.Dd $Mdocdate: December 13 2021 $
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,6 +80,7 @@ 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 ,
83.Xr PEM_write_bio_PKCS7_stream 3 , 84.Xr PEM_write_bio_PKCS7_stream 3 ,
84.Xr PEM_write_PKCS7 3 , 85.Xr PEM_write_PKCS7 3 ,
85.Xr PKCS7_final 3 , 86.Xr PKCS7_final 3 ,