GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
D2I_ASN1_SEQUENCE_ANY(3) FreeBSD Library Functions Manual D2I_ASN1_SEQUENCE_ANY(3)

d2i_ASN1_SEQUENCE_ANY, i2d_ASN1_SEQUENCE_ANY, d2i_ASN1_SET_ANY, i2d_ASN1_SET_ANYdecode and encode ASN.1 sequences and sets

#include <openssl/asn1.h>

ASN1_SEQUENCE_ANY *
d2i_ASN1_SEQUENCE_ANY(ASN1_SEQUENCE_ANY **val_out, const unsigned char **der_in, long length);

int
i2d_ASN1_SEQUENCE_ANY(const ASN1_SEQUENCE_ANY *val_in, unsigned char **der_out);

ASN1_SEQUENCE_ANY *
d2i_ASN1_SET_ANY(ASN1_SEQUENCE_ANY **val_out, const unsigned char **der_in, long length);

int
i2d_ASN1_SET_ANY(const ASN1_SEQUENCE_ANY *val_in, unsigned char **der_out);

These functions decode and encode ASN.1 sequences and sets, which are also represented by the V_ASN1_SEQUENCE and V_ASN1_SET type identifier constants, respectively. For details about the semantics, examples, caveats, and bugs, see ASN1_item_d2i(3).

The type ASN1_SEQUENCE_ANY is defined as 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.

Like for d2i_ASN1_TYPE(3) and 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 ASN1_TYPE object contained in the sequence or set.

d2i_ASN1_SEQUENCE_ANY() returns an ASN1_SEQUENCE_ANY object or NULL if an error occurs.

i2d_ASN1_SEQUENCE_ANY() returns the number of bytes written or a negative value if an error occurs.

ASN1_item_d2i(3), ASN1_TYPE_new(3)

d2i_ASN1_SEQUENCE_ANY(), i2d_ASN1_SEQUENCE_ANY(), d2i_ASN1_SET_ANY(), and i2d_ASN1_SET_ANY() first appeared in OpenSSL 1.0.0 and have been available since OpenBSD 4.9.

December 9, 2021 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.