diff options
author | schwarze <> | 2021-12-13 13:46:09 +0000 |
---|---|---|
committer | schwarze <> | 2021-12-13 13:46:09 +0000 |
commit | eb7e84848bf9f5bb74cf5aaf96d14db842116c2d (patch) | |
tree | 2340714ec65abd5a48465059fe1b76115dae97c9 /src | |
parent | 2079bd78020b8fe474a6b532e0144a4a39456ffb (diff) | |
download | openbsd-eb7e84848bf9f5bb74cf5aaf96d14db842116c2d.tar.gz openbsd-eb7e84848bf9f5bb74cf5aaf96d14db842116c2d.tar.bz2 openbsd-eb7e84848bf9f5bb74cf5aaf96d14db842116c2d.zip |
new manual pages i2d_ASN1_bio_stream(3) and SMIME_crlf_copy(3)
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/man/BIO_new_NDEF.3 | 7 | ||||
-rw-r--r-- | src/lib/libcrypto/man/Makefile | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/man/SMIME_crlf_copy.3 | 96 | ||||
-rw-r--r-- | src/lib/libcrypto/man/i2d_ASN1_bio_stream.3 | 94 | ||||
-rw-r--r-- | src/lib/libcrypto/man/i2d_CMS_bio_stream.3 | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 | 5 |
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 |
118 | first appeared in OpenSSL 1.0.0 and has been available since | 119 | first 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 | ||
32 | copies data from | ||
33 | .Fa in_bio | ||
34 | to | ||
35 | .Fa out_bio . | ||
36 | To avoid many small write operations on | ||
37 | .Fa out_bio , | ||
38 | a buffering BIO created with | ||
39 | .Xr BIO_f_buffer 3 | ||
40 | is temporarily prepended to it. | ||
41 | .Pp | ||
42 | If the bit | ||
43 | .Dv SMIME_BINARY | ||
44 | is set in the | ||
45 | .Fa flags | ||
46 | argument, all the data is copied verbatim using | ||
47 | .Xr BIO_read 3 | ||
48 | and | ||
49 | .Xr BIO_write 3 . | ||
50 | .Pp | ||
51 | Otherwise, the data is read as text. | ||
52 | All trailing carriage return and newline characters are discarded | ||
53 | from every input line and a single pair of carriage return and | ||
54 | newline characters is appended to mark the end of every output line, | ||
55 | except that the last output line will end without such a pair if | ||
56 | the last input line does not have a newline character at the end. | ||
57 | .Pp | ||
58 | If the bit | ||
59 | .Dv SMIME_TEXT | ||
60 | is set in the | ||
61 | .Fa flags | ||
62 | argument and the bit | ||
63 | .Dv SMIME_BINARY | ||
64 | is not set, the line | ||
65 | .Qq Content-Type: text/plain | ||
66 | is prepended to the output | ||
67 | with two pairs of carriage return and newline characters after it. | ||
68 | .Pp | ||
69 | In any case, | ||
70 | .Xr BIO_flush 3 | ||
71 | is called on the output at the end of the function. | ||
72 | .Sh RETURN VALUES | ||
73 | .Fn SMIME_crlf_copy | ||
74 | is 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 | ||
85 | first appeared in OpenSSL 1.0.0 and has been available since | ||
86 | .Ox 4.9 . | ||
87 | .Sh BUGS | ||
88 | .Fn SMIME_crlf_copy | ||
89 | silently ignores most errors and may return 1 | ||
90 | even if it lost part or all of the data in transit. | ||
91 | .Pp | ||
92 | Only blocking BIOs are supported. | ||
93 | If any of the | ||
94 | .Vt BIO | ||
95 | arguments is non-blocking, part or all of the data is likely | ||
96 | to 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 | ||
34 | If the bit | ||
35 | .Dv SMIME_STREAM | ||
36 | is not set in the | ||
37 | .Fa flags | ||
38 | argument, | ||
39 | .Fn i2d_ASN1_bio_stream | ||
40 | does the same as | ||
41 | .Xr ASN1_item_i2d_bio 3 , | ||
42 | ignoring the | ||
43 | .Fa in_bio | ||
44 | and | ||
45 | .Fa flags | ||
46 | arguments. | ||
47 | .Pp | ||
48 | If the bit | ||
49 | .Dv SMIME_STREAM | ||
50 | is set, it creates a streaming BIO with | ||
51 | .Xr BIO_new_NDEF 3 , | ||
52 | copies the data from | ||
53 | .Fa in_bio | ||
54 | to it using | ||
55 | .Xr SMIME_crlf_copy 3 , | ||
56 | finalizes the output with | ||
57 | .Xr BIO_flush 3 , | ||
58 | and frees the newly created BIOs up to but not including | ||
59 | .Fa out_bio . | ||
60 | .Pp | ||
61 | If | ||
62 | .Fa it | ||
63 | is | ||
64 | .Va PKCS7_it , | ||
65 | this function behaves exactly as | ||
66 | .Xr i2d_PKCS7_bio_stream 3 ; | ||
67 | for | ||
68 | .Va CMS_ContentInfo_it , | ||
69 | it behaves exactly as | ||
70 | .Xr i2d_CMS_bio_stream 3 . | ||
71 | For other values of | ||
72 | .Fa it , | ||
73 | the function fails. | ||
74 | .Sh RETURN VALUES | ||
75 | .Fn i2d_ASN1_bio_stream | ||
76 | is 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 | ||
89 | first appeared in OpenSSL 1.0.0 and has been available since | ||
90 | .Ox 4.9 . | ||
91 | .Sh BUGS | ||
92 | Many kinds of errors are silently ignored. | ||
93 | This function may return 1 even if it only produced partial output | ||
94 | or 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 , |