-.\" $OpenBSD: ASN1_item_d2i.3,v 1.12 2021/11/15 11:51:09 schwarze Exp $
+.\" $OpenBSD: ASN1_item_d2i.3,v 1.13 2021/11/24 13:18:08 schwarze Exp $
.\" OpenSSL doc/man3/d2i_X509.pod b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.\"
-.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
+.\" Copyright (c) 2016, 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
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: November 15 2021 $
+.Dd $Mdocdate: November 24 2021 $
.Dt ASN1_ITEM_D2I 3
.Os
.Sh NAME
.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
.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"
.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
.Dv NULL
is returned.
.Pp
-.Fn ASN1_item_i2d
+.Fn ASN1_item_i2d ,
+.Fn ASN1_item_ndef_i2d ,
and
.Fn i2d_ASN1_TYPE
return the number of bytes written
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 .