"Fossies" - the Fresh Open Source Software Archive

Member "libressl-2.9.2/man/ASN1_OBJECT_new.3" (4 Dec 2018, 5140 Bytes) of package /linux/misc/libressl-2.9.2.tar.gz:

Caution: As a special service "Fossies" has tried to format the requested manual source page into HTML format but links to other man pages may be missing or even errorneous. Alternatively you can here view or download the uninterpreted manual source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

ASN1_OBJECT_NEW(3) BSD Library Functions Manual ASN1_OBJECT_NEW(3)


ASN1_OBJECT_new, ASN1_OBJECT_free — ASN.1 object identifiers


#include <openssl/asn1.h>






ASN1_OBJECT_new() 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.

Application programs normally use utility functions like OBJ_nid2obj(3) rather than using ASN1_OBJECT_new() directly.

ASN1_OBJECT_free() 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 NULL pointer or if neither the object itself nor any of its content is marked as dynamically allocated, no action occurs.


If the allocation fails, ASN1_OBJECT_new() returns NULL and sets an error code that can be obtained by ERR_get_error(3). Otherwise it returns a pointer to the new object.


d2i_ASN1_OBJECT(3), OBJ_nid2obj(3)


ASN1_OBJECT_new() and ASN1_OBJECT_free() first appeared in SSLeay 0.5.1 and have been available since OpenBSD 2.4.

BSD March 27, 2018 BSD