ASN1_TYPE_get_octetstring

Copy the OCTET STRING contents of an ASN1_TYPE into data.

Synopsis

Declared in <openssl/asn1.h>

int
ASN1_TYPE_get_octetstring(
    ASN1_TYPE const* a,
    unsigned char* data,
    int max_len);

Return Value

Full OCTET STRING length on success, or -1 on type/content error.

Parameters

NameDescription
aASN1_TYPE that must hold V_ASN1_OCTET_STRING.
dataBuffer that receives up to max_len content octets.
max_lenCapacity of data in bytes.