libressl-a2d_ASN1_OBJECT3
Der content octets of an asn.1 object identifier
Usage
Crypto Library (libcrypto, -lcrypto)
#include <openssl/asn1.h>
int
a2d_ASN1_OBJECT(unsigned char *der_out, int olen, const char *val_in, int ilen);
Overview
a2d_ASN1_OBJECT() accepts an ASCII string val_in of ilen bytes and interprets it as the numerical form of an ASN.1 object identifier. It writes the content octets of the DER encoding of the object identifier to the buffer der_out which is olen bytes long. The identifier and length octets of the DER encoding are not written.
If ilen is -1, the strlen(3) of val_in is used instead.
If der_out is a NULL pointer, writing the content octets is skipped and only the return value is calculated.
Return values
a2d_ASN1_OBJECT() returns the number of content octets that were or would be written or 0 if ilen is 0, if val_in is not a valid representation of an object identifier, if memory allocation fails, or if the number of content octets would be larger than olen.