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/lib/libcrypto/man/PEM_write_bio_ASN1_stream.3 | |
| 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/lib/libcrypto/man/PEM_write_bio_ASN1_stream.3')
| -rw-r--r-- | src/lib/libcrypto/man/PEM_write_bio_ASN1_stream.3 | 90 |
1 files changed, 90 insertions, 0 deletions
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. | ||
