sync and add missing code for ToolChains

This commit is contained in:
purplerain 2023-05-01 20:06:12 +00:00
parent f5f0d5c82b
commit 01bad5edf2
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
44 changed files with 3514 additions and 2673 deletions

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: ASN1_item_d2i.3,v 1.17 2023/04/28 15:51:18 job Exp $
.\" $OpenBSD: ASN1_item_d2i.3,v 1.18 2023/05/01 07:37:45 tb Exp $
.\" selective merge up to:
.\" OpenSSL doc/man3/d2i_X509.pod 256989ce Jun 19 15:00:32 2020 +0200
.\"
@ -66,7 +66,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 28 2023 $
.Dd $Mdocdate: May 1 2023 $
.Dt ASN1_ITEM_D2I 3
.Os
.Sh NAME
@ -77,7 +77,6 @@
.Nm ASN1_item_i2d ,
.Nm ASN1_item_i2d_bio ,
.Nm ASN1_item_i2d_fp ,
.Nm ASN1_item_ndef_i2d ,
.Nm i2d_ASN1_TYPE ,
.Nm ASN1_item_dup ,
.Nm ASN1_item_print
@ -128,12 +127,6 @@
.Fa "void *val_in"
.Fc
.Ft int
.Fo ASN1_item_ndef_i2d
.Fa "ASN1_VALUE *val_in"
.Fa "unsigned char **der_out"
.Fa "const ASN1_ITEM *it"
.Fc
.Ft int
.Fo i2d_ASN1_TYPE
.Fa "ASN1_TYPE *val_in"
.Fa "unsigned char **der_out"
@ -270,12 +263,6 @@ or
.Vt FILE ,
respectively.
.Pp
.Fn ASN1_item_ndef_i2d
is similar to
.Fn ASN1_item_i2d
except that it encodes using BER rather than DER,
using the indefinite length form where appropriate.
.Pp
.Fn i2d_ASN1_TYPE
is similar to
.Fn ASN1_item_i2d
@ -309,8 +296,7 @@ If an error occurs,
.Dv NULL
is returned.
.Pp
.Fn ASN1_item_i2d ,
.Fn ASN1_item_ndef_i2d ,
.Fn ASN1_item_i2d
and
.Fn i2d_ASN1_TYPE
return the number of bytes written
@ -403,10 +389,6 @@ and
first appeared in OpenSSL 0.9.7 and have been available since
.Ox 3.2 .
.Pp
.Fn ASN1_item_ndef_i2d
first appeared in OpenSSL 0.9.8 and has been available since
.Ox 4.5 .
.Pp
.Fn ASN1_item_print
first appeared in OpenSSL 1.0.0 and has been available since
.Ox 4.9 .

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: BIO_ctrl.3,v 1.22 2023/04/28 16:22:45 schwarze Exp $
.\" $OpenBSD: BIO_ctrl.3,v 1.23 2023/05/01 07:28:11 tb Exp $
.\" full merge up to: OpenSSL 24a535eaf Tue Sep 22 13:14:20 2020 +0100
.\" selective merge up to: OpenSSL 0c5bc96f Tue Mar 15 13:57:22 2022 +0000
.\"
@ -66,7 +66,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 28 2023 $
.Dd $Mdocdate: May 1 2023 $
.Dt BIO_CTRL 3
.Os
.Sh NAME
@ -433,7 +433,7 @@ They are documented in the following manual pages:
.It Dv BIO_C_GET_EX_ARG Ta Xr BIO_f_asn1 3
.It Dv BIO_C_GET_PREFIX Ta Xr BIO_asn1_get_prefix 3
.It Dv BIO_C_GET_SUFFIX Ta Xr BIO_asn1_get_suffix 3
.It Dv BIO_C_SET_EX_ARG Ta Xr BIO_f_asn1 3 , Xr BIO_new_NDEF 3
.It Dv BIO_C_SET_EX_ARG Ta Xr BIO_f_asn1 3
.It Dv BIO_C_SET_PREFIX Ta Xr BIO_asn1_set_prefix 3
.It Dv BIO_C_SET_SUFFIX Ta Xr BIO_asn1_set_suffix 3
.It Dv BIO_CTRL_DGRAM_GET_FALLBACK_MTU Ta Xr BIO_dgram_set_peer 3

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: BIO_f_asn1.3,v 1.2 2021/12/12 17:31:18 schwarze Exp $
.\" $OpenBSD: BIO_f_asn1.3,v 1.3 2023/05/01 07:28:11 tb Exp $
.\"
.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
.\"
@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: December 12 2021 $
.Dd $Mdocdate: May 1 2023 $
.Dt BIO_F_ASN1 3
.Os
.Sh NAME
@ -219,7 +219,6 @@ that is not properly initialized.
.Xr ASN1_put_object 3 ,
.Xr BIO_ctrl 3 ,
.Xr BIO_new 3 ,
.Xr BIO_new_NDEF 3 ,
.Xr BIO_next 3 ,
.Xr BIO_write 3 ,
.Xr i2d_ASN1_OCTET_STRING 3

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: BIO_new_CMS.3,v 1.8 2021/12/12 17:31:18 schwarze Exp $
.\" $OpenBSD: BIO_new_CMS.3,v 1.9 2023/05/01 07:28:11 tb Exp $
.\" full merge up to: OpenSSL df75c2bfc Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
@ -48,7 +48,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 12 2021 $
.Dd $Mdocdate: May 1 2023 $
.Dt BIO_NEW_CMS 3
.Os
.Sh NAME
@ -128,7 +128,6 @@ The error can be obtained from
.Xr ERR_get_error 3 .
.Sh SEE ALSO
.Xr BIO_new 3 ,
.Xr BIO_new_NDEF 3 ,
.Xr CMS_ContentInfo_new 3 ,
.Xr CMS_encrypt 3 ,
.Xr CMS_sign 3

View file

@ -1,120 +0,0 @@
.\" $OpenBSD: BIO_new_NDEF.3,v 1.3 2021/12/13 13:46:09 schwarze Exp $
.\"
.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: December 13 2021 $
.Dt BIO_NEW_NDEF 3
.Os
.Sh NAME
.Nm BIO_new_NDEF
.Nd generic constructor for streaming BIO chains
.Sh SYNOPSIS
.In openssl/asn1.h
.Ft BIO *
.Fo BIO_new_NDEF
.Fa "BIO *out_bio"
.Fa "ASN1_VALUE *val_in"
.Fa "const ASN1_ITEM *it"
.Fc
.Sh DESCRIPTION
.Fn BIO_new_NDEF
is a wrapper around
.Xr BIO_new 3
with a BIO
.Fa type
of
.Xr BIO_f_asn1 3
that supports streaming by providing the following additional functionality.
.Pp
The data type
.Fa it
needs to support streaming.
Of the data types built into the library, currently only
.Vt CMS_ContentInfo
and
.Vt PKCS7
support that.
The argument
.Fa val_in
needs to be of that type.
.Pp
A structure containing the following data is saved using
.Xr BIO_ctrl 3
with an argument of
.Dv BIO_C_SET_EX_ARG
as described in
.Xr BIO_f_asn1 3 :
.Pp
.Bl -bullet -compact -offset indent
.It
the data type
.Fa it
.It
the input value
.Fa val_in
.It
a pointer to the
.Vt unsigned char *
content buffer of
.Fa val_in ,
extracted using a type-specific callback function
.It
a pointer to the new asn1 BIO
.It
a pointer to the beginning of the BIO chain;
this may be the asn1 BIO itself, or one or more filter BIOs
may be prepended to it in a type-specific manner,
for example digest or encoding BIOs
.El
.Pp
In order to handle the output from the new asn1 BIO, the
.Fa out_bio
is appended to it using
.Xr BIO_push 3 .
The
.Fa out_bio
can be a single sink BIO or a BIO chain ending in a sink BIO.
.Pp
A built-in
.Fa prefix
function is installed with
.Xr BIO_asn1_set_prefix 3
that encodes
.Fa val_in
using
.Xr ASN1_item_ndef_i2d 3 ,
and a built-in
.Fa suffix
function is installed that finalizes the written structures
in a type-specific way.
.Sh RETURN VALUES
.Fn BIO_new_NDEF
returns a pointer to the beginning of the constructed BIO chain or
.Dv NULL
if
.Fa it
does not support streaming or if memory allocation fails.
.Sh SEE ALSO
.Xr ASN1_item_ndef_i2d 3 ,
.Xr BIO_ctrl 3 ,
.Xr BIO_f_asn1 3 ,
.Xr BIO_new 3 ,
.Xr BIO_new_CMS 3 ,
.Xr BIO_push 3 ,
.Xr i2d_ASN1_bio_stream 3
.Sh HISTORY
.Fn BIO_new_NDEF
first appeared in OpenSSL 1.0.0 and has been available since
.Ox 4.9 .

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: BIO_s_file.3,v 1.15 2023/04/29 13:06:10 schwarze Exp $
.\" $OpenBSD: BIO_s_file.3,v 1.16 2023/05/01 07:04:38 jsg Exp $
.\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
.\" selective merge up to: OpenSSL 1212818e Sep 11 13:22:14 2018 +0100
.\"
@ -66,7 +66,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 29 2023 $
.Dd $Mdocdate: May 1 2023 $
.Dt BIO_S_FILE 3
.Os
.Sh NAME
@ -79,7 +79,7 @@
.Nm BIO_write_filename ,
.Nm BIO_append_filename ,
.Nm BIO_rw_filename
.\" Nm BIO_CTRL_SET_FILENAME is unsused and intentionally undocumented.
.\" Nm BIO_CTRL_SET_FILENAME is unused and intentionally undocumented.
.Nd FILE BIO
.Sh SYNOPSIS
.In openssl/bio.h

View file

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.250 2023/04/30 19:40:23 tb Exp $
# $OpenBSD: Makefile,v 1.251 2023/05/01 07:28:11 tb Exp $
.include <bsd.own.mk>
@ -51,7 +51,6 @@ MAN= \
BIO_meth_new.3 \
BIO_new.3 \
BIO_new_CMS.3 \
BIO_new_NDEF.3 \
BIO_printf.3 \
BIO_push.3 \
BIO_read.3 \
@ -239,7 +238,6 @@ MAN= \
PEM_bytes_read_bio.3 \
PEM_read.3 \
PEM_read_bio_PrivateKey.3 \
PEM_write_bio_ASN1_stream.3 \
PEM_write_bio_CMS_stream.3 \
PEM_write_bio_PKCS7_stream.3 \
PKCS12_SAFEBAG_new.3 \
@ -421,7 +419,6 @@ MAN= \
evp.3 \
get_rfc3526_prime_8192.3 \
i2a_ASN1_STRING.3 \
i2d_ASN1_bio_stream.3 \
i2d_CMS_bio_stream.3 \
i2d_PKCS7_bio_stream.3 \
lh_new.3 \

View file

@ -1,90 +0,0 @@
.\" $OpenBSD: PEM_write_bio_ASN1_stream.3,v 1.1 2021/12/13 18:55:22 schwarze Exp $
.\"
.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: December 13 2021 $
.Dt PEM_WRITE_BIO_ASN1_STREAM 3
.Os
.Sh NAME
.Nm PEM_write_bio_ASN1_stream
.Nd generic PEM encoder
.Sh SYNOPSIS
.In openssl/asn1.h
.Ft int
.Fo PEM_write_bio_ASN1_stream
.Fa "BIO *out_bio"
.Fa "ASN1_VALUE *val_in"
.Fa "BIO *in_bio"
.Fa "int flags"
.Fa "const char *hdr"
.Fa "const ASN1_ITEM *it"
.Fc
.Sh DESCRIPTION
.Fn PEM_write_bio_ASN1_stream
writes the
.Fa val_in
argument of type
.Fa it
to
.Fa out_bio
in PEM format, that is, BER- and base64-encoded and surrounded by
.Qq -----BEGIN ...-----
and
.Qq -----END ...-----
lines with the
.Fa hdr
argument in place of the ellipses.
.Pp
The
.Fa flags
are passed through to
.Xr i2d_ASN1_bio_stream 3 .
In particular, if the bit
.Dv SMIME_STREAM
is set, streaming is performed, reading the content from
.Fa in_bio .
Streaming is only supported if
.Fa val_in
is of the type
.Vt CMS_ContentInfo
or
.Vt PKCS7 .
.Pp
If the bit
.Dv SMIME_STREAM
is not set, the arguments
.Fa in_bio
and
.Fa flags
are ignored and distinguished encoding rules (DER) are used.
.Sh RETURN VALUES
.Fn PEM_write_bio_ASN1_stream
is intended to return 1 on success or 0 on failure.
.Sh SEE ALSO
.Xr ASN1_item_i2d_bio 3 ,
.Xr BIO_f_base64 3 ,
.Xr BIO_new 3 ,
.Xr i2d_ASN1_bio_stream 3 ,
.Xr PEM_write_bio 3 ,
.Xr PEM_write_bio_CMS_stream 3 ,
.Xr PEM_write_bio_PKCS7_stream 3
.Sh HISTORY
.Fn PEM_write_bio_ASN1_stream
first appeared in OpenSSL 1.0.0 and has been available since
.Ox 4.9 .
.Sh BUGS
Many kinds of errors are silently ignored.
This function may return 1 even if it only produced partial output
or no output at all.

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: PEM_write_bio_CMS_stream.3,v 1.5 2021/12/13 18:55:22 schwarze Exp $
.\" $OpenBSD: PEM_write_bio_CMS_stream.3,v 1.6 2023/05/01 07:28:11 tb Exp $
.\" full merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
@ -48,7 +48,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 13 2021 $
.Dd $Mdocdate: May 1 2023 $
.Dt PEM_WRITE_BIO_CMS_STREAM 3
.Os
.Sh NAME
@ -87,7 +87,6 @@ returns 1 for success or 0 for failure.
.Xr ERR_get_error 3 ,
.Xr i2d_CMS_bio_stream 3 ,
.Xr PEM_write 3 ,
.Xr PEM_write_bio_ASN1_stream 3 ,
.Xr SMIME_write_CMS 3
.Sh HISTORY
.Fn PEM_write_bio_CMS_stream

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: PEM_write_bio_PKCS7_stream.3,v 1.11 2021/12/13 18:55:22 schwarze Exp $
.\" $OpenBSD: PEM_write_bio_PKCS7_stream.3,v 1.12 2023/05/01 07:28:11 tb Exp $
.\" full merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
@ -48,7 +48,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 13 2021 $
.Dd $Mdocdate: May 1 2023 $
.Dt PEM_WRITE_BIO_PKCS7_STREAM 3
.Os
.Sh NAME
@ -80,7 +80,6 @@ otherwise 0 is returned and an error code can be retrieved with
.Sh SEE ALSO
.Xr BIO_new 3 ,
.Xr i2d_PKCS7_bio_stream 3 ,
.Xr PEM_write_bio_ASN1_stream 3 ,
.Xr PEM_write_PKCS7 3 ,
.Xr PKCS7_final 3 ,
.Xr PKCS7_new 3 ,

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: RSA_check_key.3,v 1.8 2021/03/12 05:18:00 jsg Exp $
.\" $OpenBSD: RSA_check_key.3,v 1.9 2023/05/01 07:28:11 tb Exp $
.\" OpenSSL 6859cf74 Sep 25 13:33:28 2002 +0000
.\"
.\" This file was written by Ulf Moeller <ulf@openssl.org> and
@ -49,7 +49,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: March 12 2021 $
.Dd $Mdocdate: May 1 2023 $
.Dt RSA_CHECK_KEY 3
.Os
.Sh NAME
@ -142,7 +142,9 @@ structure elements directly, bypassing the
.Vt RSA_METHOD
table altogether (and completely violating encapsulation and
object-orientation in the process).
The best fix will probably be to introduce a check_key() handler
The best fix will probably be to introduce a
.Fn check_key
handler
to the
.Vt RSA_METHOD
function table so that alternative implementations can also provide

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: SMIME_crlf_copy.3,v 1.2 2021/12/14 15:22:49 schwarze Exp $
.\" $OpenBSD: SMIME_crlf_copy.3,v 1.3 2023/05/01 07:28:11 tb Exp $
.\"
.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
.\"
@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: December 14 2021 $
.Dd $Mdocdate: May 1 2023 $
.Dt SMIME_CRLF_COPY 3
.Os
.Sh NAME
@ -78,7 +78,6 @@ is intended to return 1 on success or 0 on failure.
.Xr BIO_new 3 ,
.Xr BIO_push 3 ,
.Xr BIO_read 3 ,
.Xr i2d_ASN1_bio_stream 3 ,
.Xr SMIME_text 3 ,
.Xr SMIME_write_ASN1 3
.Sh HISTORY

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: SMIME_write_ASN1.3,v 1.1 2021/12/13 17:24:39 schwarze Exp $
.\" $OpenBSD: SMIME_write_ASN1.3,v 1.2 2023/05/01 07:28:11 tb Exp $
.\"
.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
.\"
@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: December 13 2021 $
.Dd $Mdocdate: May 1 2023 $
.Dt SMIME_WRITE_ASN1 3
.Os
.Sh NAME
@ -126,9 +126,7 @@ or
.Qq application/pkcs7-signature
are used instead.
.It Dv SMIME_STREAM
Perform streaming by passing this flag through to
.Xr i2d_ASN1_bio_stream 3
and reading the content from
Perform streaming by reading the content from
.Fa in_bio .
This only works if
.Dv SMIME_DETACHED
@ -151,7 +149,6 @@ is intended to return 1 on success or 0 on failure.
.Xr ASN1_item_i2d_bio 3 ,
.Xr BIO_f_base64 3 ,
.Xr BIO_new 3 ,
.Xr i2d_ASN1_bio_stream 3 ,
.Xr SMIME_crlf_copy 3 ,
.Xr SMIME_write_CMS 3 ,
.Xr SMIME_write_PKCS7 3 ,

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: crypto.3,v 1.28 2022/02/04 00:55:52 tb Exp $
.\" $OpenBSD: crypto.3,v 1.29 2023/05/01 07:37:45 tb Exp $
.\" OpenSSL a9c85cea Nov 11 09:33:55 2016 +0100
.\"
.\" This file is a derived work.
@ -66,7 +66,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: February 4 2022 $
.Dd $Mdocdate: May 1 2023 $
.Dt CRYPTO 3
.Os
.Sh NAME
@ -337,18 +337,6 @@ in the same sense.
See also the
.Dq cb
entry in the present list.
.It ndef
indefinite length form:
The function encodes according to ASN.1 basic encoding rules (BER)
using the indefinite length form.
Even if the function name also includes
.Dq i2d ,
the output does not conform to ASN.1 distinguished encoding rules (DER).
See
.Xr ASN1_item_ndef_i2d 3 .
Some function names contain the all caps version
.Dq NDEF
with the same meaning.
.It nid
numerical identifier:
A non-standard, LibreSSL-specific

View file

@ -1,96 +0,0 @@
.\" $OpenBSD: i2d_ASN1_bio_stream.3,v 1.3 2021/12/13 18:55:22 schwarze Exp $
.\"
.\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: December 13 2021 $
.Dt I2D_ASN1_BIO_STREAM 3
.Os
.Sh NAME
.Nm i2d_ASN1_bio_stream
.Nd generic BER streamer
.Sh SYNOPSIS
.In openssl/asn1.h
.Ft int
.Fo i2d_ASN1_bio_stream
.Fa "BIO *out_bio"
.Fa "ASN1_VALUE *val_in"
.Fa "BIO *in_bio"
.Fa "int flags"
.Fa "const ASN1_ITEM *it"
.Fc
.Sh DESCRIPTION
If the bit
.Dv SMIME_STREAM
is not set in the
.Fa flags
argument,
.Fn i2d_ASN1_bio_stream
does the same as
.Xr ASN1_item_i2d_bio 3 ,
ignoring the
.Fa in_bio
and
.Fa flags
arguments.
.Pp
If the bit
.Dv SMIME_STREAM
is set, it creates a streaming BIO with
.Xr BIO_new_NDEF 3 ,
copies the data from
.Fa in_bio
to it using
.Xr SMIME_crlf_copy 3 ,
finalizes the output with
.Xr BIO_flush 3 ,
and frees the newly created BIOs up to but not including
.Fa out_bio .
.Pp
If
.Fa it
is
.Va PKCS7_it ,
this function behaves exactly as
.Xr i2d_PKCS7_bio_stream 3 ;
for
.Va CMS_ContentInfo_it ,
it behaves exactly as
.Xr i2d_CMS_bio_stream 3 .
For other values of
.Fa it ,
the function fails.
.Sh RETURN VALUES
.Fn i2d_ASN1_bio_stream
is intended to return 1 on success or 0 on failure.
.Sh SEE ALSO
.Xr ASN1_item_i2d_bio 3 ,
.Xr ASN1_item_ndef_i2d 3 ,
.Xr BIO_flush 3 ,
.Xr BIO_new 3 ,
.Xr BIO_new_NDEF 3 ,
.Xr BIO_push 3 ,
.Xr i2d_CMS_bio_stream 3 ,
.Xr i2d_PKCS7_bio_stream 3 ,
.Xr PEM_write_bio_ASN1_stream 3 ,
.Xr SMIME_crlf_copy 3 ,
.Xr SMIME_write_ASN1 3
.Sh HISTORY
.Fn i2d_ASN1_bio_stream
first appeared in OpenSSL 1.0.0 and has been available since
.Ox 4.9 .
.Sh BUGS
Many kinds of errors are silently ignored.
This function may return 1 even if it only produced partial output
or no output at all.

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: i2d_CMS_bio_stream.3,v 1.5 2021/12/13 13:46:09 schwarze Exp $
.\" $OpenBSD: i2d_CMS_bio_stream.3,v 1.6 2023/05/01 07:28:11 tb Exp $
.\" full merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
@ -48,7 +48,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 13 2021 $
.Dd $Mdocdate: May 1 2023 $
.Dt I2D_CMS_BIO_STREAM 3
.Os
.Sh NAME
@ -83,7 +83,6 @@ returns 1 for success or 0 for failure.
.Xr CMS_encrypt 3 ,
.Xr CMS_sign 3 ,
.Xr ERR_get_error 3 ,
.Xr i2d_ASN1_bio_stream 3 ,
.Xr PEM_write_bio_CMS_stream 3 ,
.Xr SMIME_write_CMS 3
.Sh HISTORY

View file

@ -1,4 +1,4 @@
.\" $OpenBSD: i2d_PKCS7_bio_stream.3,v 1.10 2021/12/13 13:46:09 schwarze Exp $
.\" $OpenBSD: i2d_PKCS7_bio_stream.3,v 1.11 2023/05/01 07:28:11 tb Exp $
.\" OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
.\"
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
@ -49,7 +49,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: December 13 2021 $
.Dd $Mdocdate: May 1 2023 $
.Dt I2D_PKCS7_BIO_STREAM 3
.Os
.Sh NAME
@ -80,7 +80,6 @@ returns 1 for success or 0 for failure.
.Sh SEE ALSO
.Xr BIO_new 3 ,
.Xr ERR_get_error 3 ,
.Xr i2d_ASN1_bio_stream 3 ,
.Xr PEM_write_bio_PKCS7_stream 3 ,
.Xr PEM_write_PKCS7 3 ,
.Xr PKCS7_final 3 ,