diff options
Diffstat (limited to 'src/lib/libcrypto/man/BIO_new_NDEF.3')
| -rw-r--r-- | src/lib/libcrypto/man/BIO_new_NDEF.3 | 120 |
1 files changed, 0 insertions, 120 deletions
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 | ||
| 33 | is a wrapper around | ||
| 34 | .Xr BIO_new 3 | ||
| 35 | with a BIO | ||
| 36 | .Fa type | ||
| 37 | of | ||
| 38 | .Xr BIO_f_asn1 3 | ||
| 39 | that supports streaming by providing the following additional functionality. | ||
| 40 | .Pp | ||
| 41 | The data type | ||
| 42 | .Fa it | ||
| 43 | needs to support streaming. | ||
| 44 | Of the data types built into the library, currently only | ||
| 45 | .Vt CMS_ContentInfo | ||
| 46 | and | ||
| 47 | .Vt PKCS7 | ||
| 48 | support that. | ||
| 49 | The argument | ||
| 50 | .Fa val_in | ||
| 51 | needs to be of that type. | ||
| 52 | .Pp | ||
| 53 | A structure containing the following data is saved using | ||
| 54 | .Xr BIO_ctrl 3 | ||
| 55 | with an argument of | ||
| 56 | .Dv BIO_C_SET_EX_ARG | ||
| 57 | as described in | ||
| 58 | .Xr BIO_f_asn1 3 : | ||
| 59 | .Pp | ||
| 60 | .Bl -bullet -compact -offset indent | ||
| 61 | .It | ||
| 62 | the data type | ||
| 63 | .Fa it | ||
| 64 | .It | ||
| 65 | the input value | ||
| 66 | .Fa val_in | ||
| 67 | .It | ||
| 68 | a pointer to the | ||
| 69 | .Vt unsigned char * | ||
| 70 | content buffer of | ||
| 71 | .Fa val_in , | ||
| 72 | extracted using a type-specific callback function | ||
| 73 | .It | ||
| 74 | a pointer to the new asn1 BIO | ||
| 75 | .It | ||
| 76 | a pointer to the beginning of the BIO chain; | ||
| 77 | this may be the asn1 BIO itself, or one or more filter BIOs | ||
| 78 | may be prepended to it in a type-specific manner, | ||
| 79 | for example digest or encoding BIOs | ||
| 80 | .El | ||
| 81 | .Pp | ||
| 82 | In order to handle the output from the new asn1 BIO, the | ||
| 83 | .Fa out_bio | ||
| 84 | is appended to it using | ||
| 85 | .Xr BIO_push 3 . | ||
| 86 | The | ||
| 87 | .Fa out_bio | ||
| 88 | can be a single sink BIO or a BIO chain ending in a sink BIO. | ||
| 89 | .Pp | ||
| 90 | A built-in | ||
| 91 | .Fa prefix | ||
| 92 | function is installed with | ||
| 93 | .Xr BIO_asn1_set_prefix 3 | ||
| 94 | that encodes | ||
| 95 | .Fa val_in | ||
| 96 | using | ||
| 97 | .Xr ASN1_item_ndef_i2d 3 , | ||
| 98 | and a built-in | ||
| 99 | .Fa suffix | ||
| 100 | function is installed that finalizes the written structures | ||
| 101 | in a type-specific way. | ||
| 102 | .Sh RETURN VALUES | ||
| 103 | .Fn BIO_new_NDEF | ||
| 104 | returns a pointer to the beginning of the constructed BIO chain or | ||
| 105 | .Dv NULL | ||
| 106 | if | ||
| 107 | .Fa it | ||
| 108 | does 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 | ||
| 119 | first appeared in OpenSSL 1.0.0 and has been available since | ||
| 120 | .Ox 4.9 . | ||
