diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-01-04 21:14:27 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-01-04 21:14:27 +0000 |
commit | 4e937b95e8ab35801e098c17f33eb78a643a4ffd (patch) | |
tree | d8c32feb9e8eecd3542edf1475de2318ec4915b7 /lib | |
parent | a6eea7d42273a14de37aa002229509b4ce2d86a8 (diff) |
Write new d2i_ASN1_SEQUENCE_ANY(3) manual page from scratch.
All four functions are listed in <openssl/asn1.h>
and in OpenSSL doc/man3/d2i_X509.pod.
Note that in the OpenSSL documentation,
three of the four prototypes are incorrect.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/man/Makefile | 3 | ||||
-rw-r--r-- | lib/libcrypto/man/d2i_ASN1_SEQUENCE_ANY.3 | 85 |
2 files changed, 87 insertions, 1 deletions
diff --git a/lib/libcrypto/man/Makefile b/lib/libcrypto/man/Makefile index c6443f3e3f4..0654dde9c06 100644 --- a/lib/libcrypto/man/Makefile +++ b/lib/libcrypto/man/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.109 2016/12/29 17:42:54 schwarze Exp $ +# $OpenBSD: Makefile,v 1.110 2017/01/04 21:14:26 schwarze Exp $ .include <bsd.own.mk> @@ -229,6 +229,7 @@ MAN= \ crypto.3 \ d2i_ASN1_NULL.3 \ d2i_ASN1_OBJECT.3 \ + d2i_ASN1_SEQUENCE_ANY.3 \ d2i_AUTHORITY_KEYID.3 \ d2i_BASIC_CONSTRAINTS.3 \ d2i_DHparams.3 \ diff --git a/lib/libcrypto/man/d2i_ASN1_SEQUENCE_ANY.3 b/lib/libcrypto/man/d2i_ASN1_SEQUENCE_ANY.3 new file mode 100644 index 00000000000..f3ab6d98b5a --- /dev/null +++ b/lib/libcrypto/man/d2i_ASN1_SEQUENCE_ANY.3 @@ -0,0 +1,85 @@ +.\" $OpenBSD: d2i_ASN1_SEQUENCE_ANY.3,v 1.1 2017/01/04 21:14:26 schwarze Exp $ +.\" +.\" Copyright (c) 2017 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: January 4 2017 $ +.Dt D2I_ASN1_SEQUENCE_ANY 3 +.Os +.Sh NAME +.Nm d2i_ASN1_SEQUENCE_ANY , +.Nm i2d_ASN1_SEQUENCE_ANY , +.Nm d2i_ASN1_SET_ANY , +.Nm i2d_ASN1_SET_ANY +.Nd decode and encode ASN.1 sequences and sets +.Sh SYNOPSIS +.In openssl/asn1.h +.Ft ASN1_SEQUENCE_ANY * +.Fo d2i_ASN1_SEQUENCE_ANY +.Fa "ASN1_SEQUENCE_ANY **val_out" +.Fa "const unsigned char **der_in" +.Fa "long length" +.Fc +.Ft int +.Fo i2d_ASN1_SEQUENCE_ANY +.Fa "const ASN1_SEQUENCE_ANY *val_in" +.Fa "unsigned char **der_out" +.Fc +.Ft ASN1_SEQUENCE_ANY * +.Fo d2i_ASN1_SET_ANY +.Fa "ASN1_SEQUENCE_ANY **val_out" +.Fa "const unsigned char **der_in" +.Fa "long length" +.Fc +.Ft int +.Fo i2d_ASN1_SET_ANY +.Fa "const ASN1_SEQUENCE_ANY *val_in" +.Fa "unsigned char **der_out" +.Fc +.Sh DESCRIPTION +These functions decode and encode ASN.1 sequences and sets. +For details about the semantics, examples, caveats, and bugs, see +.Xr ASN1_item_d2i 3 . +.Pp +The type +.Vt ASN1_SEQUENCE_ANY +is defined as +.Vt STACK_OF(ASN1_TYPE) . +Whether such an object represents a sequence or a set is not stored +in the object itself but needs to be remembered separately. +.Pp +Like for +.Xr d2i_ASN1_TYPE 3 +and +.Xr i2d_ASN1_TYPE 3 , +the type of the individual values contained in the sequence or set +is not specified when calling the functions. +It might vary among the members, and it is stored together with +each value in each +.Vt ASN1_TYPE +object contained in the sequence or set. +.Sh RETURN VALUES +.Fn d2i_ASN1_SEQUENCE_ANY +returns an +.Vt ASN1_SEQUENCE_ANY +object or +.Dv NULL +if an error occurs. +.Pp +.Fn i2d_ASN1_SEQUENCE_ANY +returns the number of bytes written or a negative value if an error +occurs. +.Sh SEE ALSO +.Xr ASN1_item_d2i 3 , +.Xr ASN1_TYPE_new 3 |