[#OBJ_obj2txt]
= OBJ&lowbar;obj2txt
:mrdocs:

Format an ASN1&lowbar;OBJECT as text (dotted OID and&sol;or registered name)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
OBJ&lowbar;obj2txt(
    char* buf,
    int buf&lowbar;len,
    xref:ASN1_OBJECT.adoc[ASN1&lowbar;OBJECT] const* a,
    int no&lowbar;name);
----

== Return Value

Length of the text (excluding NUL) that was or would be written, or &hyphen;1 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *buf*
| Destination buffer for the NUL&hyphen;terminated text, or NULL to measure length only&period;
| *buf&lowbar;len*
| Capacity of `buf` in bytes when non&hyphen;NULL&period;
| *a*
| Object identifier to render&period;
| *no&lowbar;name*
| When non&hyphen;zero, always emit numeric OID form&semi; when zero, prefer a known name&period;
|===


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