|ASN1_OBJECT_NEW(3)||Library Functions Manual||ASN1_OBJECT_NEW(3)|
ASN1_OBJECT_free — ASN.1
unsigned char *content, int len,
const char *short_name, const char
allocates and initializes an empty ASN1_OBJECT object,
representing an ASN.1 OBJECT IDENTIFIER. It can hold a short name, a long
name, a numeric identifier (NID), and a sequence of integers identifying a
node in the International Object Identifier tree as specified in ITU-T
recommendation X.660. The new object is marked as dynamically allocated.
The ASN.1 object identifier type is also represented by the
V_ASN1_OBJECT type identifier constant.
allocates a new ASN1_OBJECT with the given
nid, copies the len DER
content octets, the short_name,
and the long_name into it, and marks the new object
and all data contained in it as dynamically allocated.
has the following effects:
All data contained in a that is marked as dynamically allocated is freed, and the respective fields of a become empty. Contained data not marked as dynamically allocated remains intact.
If the object a itself is marked as dynamically allocated, it is freed. Otherwise, the pointer a remains valid.
If a is a
pointer or if neither the object itself nor any of its content is marked as
dynamically allocated, no action occurs.
ASN1_OBJECT_create() return a pointer to the new
NULL if memory allocation fails,
After some cases of failure of
ASN1_OBJECT_create(), the following diagnostic can
be retrieved in addition to the above:
ITU-T Recommendation X.208, also known as ISO/IEC 8824-1: Specification of Abstract Syntax Notation One (ASN.1), section 28: Notation for the object identifier type
ITU-T Recommendation X.690, also known as ISO/IEC 8825-1: Information technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER), section 8.19: Encoding of an object identifier value
ASN1_OBJECT_free() first appeared in SSLeay 0.5.1
ASN1_OBJECT_create() in SSLeay 0.8.0. These
functions have been available since OpenBSD 2.4.
|December 15, 2021||OpenBSD-current|