ASN1_item_pack

Encode obj with it and store the DER result in an OCTET STRING.

Synopsis

Declared in <openssl/asn1.h>

ASN1_STRING*
ASN1_item_pack(
    void* obj,
    ASN1_ITEM const* it,
    ASN1_OCTET_STRING** oct);

Return Value

The OCTET STRING holding the encoded bytes, or NULL on error.

Parameters

NameDescription
objTyped ASN.1 value to encode.
itASN.1 item descriptor for obj.
octOptional destination OCTET STRING pointer; if NULL or *oct is NULL a new string is allocated.