diff options
| author | schwarze <> | 2021-12-13 18:55:22 +0000 |
|---|---|---|
| committer | schwarze <> | 2021-12-13 18:55:22 +0000 |
| commit | 955d19a4816fb3b32a101d4d83d85a802005bede (patch) | |
| tree | 9527dbe32b07b25b277bbe90b36c17c0573b5b0d /src | |
| parent | 0743c8765d7d888788f5102487bbff54a6174fdb (diff) | |
| download | openbsd-955d19a4816fb3b32a101d4d83d85a802005bede.tar.gz openbsd-955d19a4816fb3b32a101d4d83d85a802005bede.tar.bz2 openbsd-955d19a4816fb3b32a101d4d83d85a802005bede.zip | |
new manual page PEM_write_bio_ASN1_stream(3);
certainly not perfect, but arguably better than the even terser
PEM_write_bio_CMS_stream(3) and PEM_write_bio_PKCS7_stream(3)
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/PEM_write_bio_ASN1_stream.3 | 90 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/i2d_ASN1_bio_stream.3 | 3 |
5 files changed, 100 insertions, 6 deletions
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 88610412cc..131b8eea1d 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.225 2021/12/13 17:24:39 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.226 2021/12/13 18:55:22 schwarze Exp $ |
| 2 | 2 | ||
| 3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
| 4 | 4 | ||
| @@ -228,6 +228,7 @@ MAN= \ | |||
| 228 | PEM_bytes_read_bio.3 \ | 228 | PEM_bytes_read_bio.3 \ |
| 229 | PEM_read.3 \ | 229 | PEM_read.3 \ |
| 230 | PEM_read_bio_PrivateKey.3 \ | 230 | PEM_read_bio_PrivateKey.3 \ |
| 231 | PEM_write_bio_ASN1_stream.3 \ | ||
| 231 | PEM_write_bio_CMS_stream.3 \ | 232 | PEM_write_bio_CMS_stream.3 \ |
| 232 | PEM_write_bio_PKCS7_stream.3 \ | 233 | PEM_write_bio_PKCS7_stream.3 \ |
| 233 | PKCS12_SAFEBAG_new.3 \ | 234 | PKCS12_SAFEBAG_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 new file mode 100644 index 0000000000..7b965e7b76 --- /dev/null +++ b/src/lib/libcrypto/man/PEM_write_bio_ASN1_stream.3 | |||
| @@ -0,0 +1,90 @@ | |||
| 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 | ||
| 36 | writes the | ||
| 37 | .Fa val_in | ||
| 38 | argument of type | ||
| 39 | .Fa it | ||
| 40 | to | ||
| 41 | .Fa out_bio | ||
| 42 | in PEM format, that is, BER- and base64-encoded and surrounded by | ||
| 43 | .Qq -----BEGIN ...----- | ||
| 44 | and | ||
| 45 | .Qq -----END ...----- | ||
| 46 | lines with the | ||
| 47 | .Fa hdr | ||
| 48 | argument in place of the ellipses. | ||
| 49 | .Pp | ||
| 50 | The | ||
| 51 | .Fa flags | ||
| 52 | are passed through to | ||
| 53 | .Xr i2d_ASN1_bio_stream 3 . | ||
| 54 | In particular, if the bit | ||
| 55 | .Dv SMIME_STREAM | ||
| 56 | is set, streaming is performed, reading the content from | ||
| 57 | .Fa in_bio . | ||
| 58 | Streaming is only supported if | ||
| 59 | .Fa val_in | ||
| 60 | is of the type | ||
| 61 | .Vt CMS_ContentInfo | ||
| 62 | or | ||
| 63 | .Vt PKCS7 . | ||
| 64 | .Pp | ||
| 65 | If the bit | ||
| 66 | .Dv SMIME_STREAM | ||
| 67 | is not set, the arguments | ||
| 68 | .Fa in_bio | ||
| 69 | and | ||
| 70 | .Fa flags | ||
| 71 | are ignored and distinguished encoding rules (DER) are used. | ||
| 72 | .Sh RETURN VALUES | ||
| 73 | .Fn PEM_write_bio_ASN1_stream | ||
| 74 | is 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 | ||
| 85 | first appeared in OpenSSL 1.0.0 and has been available since | ||
| 86 | .Ox 4.9 . | ||
| 87 | .Sh BUGS | ||
| 88 | Many kinds of errors are silently ignored. | ||
| 89 | This function may return 1 even if it only produced partial output | ||
| 90 | or 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 0a6b4d31d8..bd17e410bb 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.4 2019/11/02 15:39:46 schwarze Exp $ | 1 | .\" $OpenBSD: PEM_write_bio_CMS_stream.3,v 1.5 2021/12/13 18:55:22 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 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,6 +87,7 @@ 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 , | ||
| 90 | .Xr SMIME_write_CMS 3 | 91 | .Xr SMIME_write_CMS 3 |
| 91 | .Sh HISTORY | 92 | .Sh HISTORY |
| 92 | .Fn PEM_write_bio_CMS_stream | 93 | .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 dba2a42a70..5b4175e4f3 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.10 2020/06/03 13:41:27 schwarze Exp $ | 1 | .\" $OpenBSD: PEM_write_bio_PKCS7_stream.3,v 1.11 2021/12/13 18:55:22 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: June 3 2020 $ | 51 | .Dd $Mdocdate: December 13 2021 $ |
| 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,6 +80,7 @@ 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 , | ||
| 83 | .Xr PEM_write_PKCS7 3 , | 84 | .Xr PEM_write_PKCS7 3 , |
| 84 | .Xr PKCS7_final 3 , | 85 | .Xr PKCS7_final 3 , |
| 85 | .Xr PKCS7_new 3 , | 86 | .Xr PKCS7_new 3 , |
diff --git a/src/lib/libcrypto/man/i2d_ASN1_bio_stream.3 b/src/lib/libcrypto/man/i2d_ASN1_bio_stream.3 index 82908bb10f..17ac95778c 100644 --- a/src/lib/libcrypto/man/i2d_ASN1_bio_stream.3 +++ b/src/lib/libcrypto/man/i2d_ASN1_bio_stream.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: i2d_ASN1_bio_stream.3,v 1.2 2021/12/13 17:24:39 schwarze Exp $ | 1 | .\" $OpenBSD: i2d_ASN1_bio_stream.3,v 1.3 2021/12/13 18:55:22 schwarze Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> |
| 4 | .\" | 4 | .\" |
| @@ -83,6 +83,7 @@ is intended to return 1 on success or 0 on failure. | |||
| 83 | .Xr BIO_push 3 , | 83 | .Xr BIO_push 3 , |
| 84 | .Xr i2d_CMS_bio_stream 3 , | 84 | .Xr i2d_CMS_bio_stream 3 , |
| 85 | .Xr i2d_PKCS7_bio_stream 3 , | 85 | .Xr i2d_PKCS7_bio_stream 3 , |
| 86 | .Xr PEM_write_bio_ASN1_stream 3 , | ||
| 86 | .Xr SMIME_crlf_copy 3 , | 87 | .Xr SMIME_crlf_copy 3 , |
| 87 | .Xr SMIME_write_ASN1 3 | 88 | .Xr SMIME_write_ASN1 3 |
| 88 | .Sh HISTORY | 89 | .Sh HISTORY |
