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

Name

Description

a

ASN1_TYPE that must hold V_ASN1_OCTET_STRING.

data

Buffer that receives up to max_len content octets.

max_len

Capacity of data in bytes.

Created with MrDocs