[#ASN1_TYPE_get_octetstring]
= ASN1&lowbar;TYPE&lowbar;get&lowbar;octetstring
:mrdocs:

Copy the OCTET STRING contents of an ASN1&lowbar;TYPE into `data&period;`

== Synopsis

Declared in `&lt;openssl&sol;asn1&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
ASN1&lowbar;TYPE&lowbar;get&lowbar;octetstring(
    xref:ASN1_TYPE.adoc[ASN1&lowbar;TYPE] const* a,
    unsigned char* data,
    int max&lowbar;len);
----

== Return Value

Full OCTET STRING length on success, or &hyphen;1 on type&sol;content error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *a*
| ASN1&lowbar;TYPE that must hold V&lowbar;ASN1&lowbar;OCTET&lowbar;STRING&period;
| *data*
| Buffer that receives up to `max&lowbar;len` content octets&period;
| *max&lowbar;len*
| Capacity of `data` in bytes&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
