[#ASN1_STRING_to_UTF8]
= ASN1&lowbar;STRING&lowbar;to&lowbar;UTF8
:mrdocs:

Convert an ASN&period;1 string to a newly allocated UTF&hyphen;8 byte sequence&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
ASN1&lowbar;STRING&lowbar;to&lowbar;UTF8(
    unsigned char** out,
    xref:ASN1_STRING.adoc[ASN1&lowbar;STRING] const* in);
----

== Return Value

Number of UTF&hyphen;8 bytes written to &ast;`out` on success, or a negative value on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *out*
| On success, set to a buffer allocated with OPENSSL&lowbar;malloc() holding UTF&hyphen;8 octets (caller frees)&period;
| *in*
| Source ASN&period;1 string of any supported string type&period;
|===


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