[#OCSP_ONEREQ_get1_ext_d2i]
= OCSP&lowbar;ONEREQ&lowbar;get1&lowbar;ext&lowbar;d2i
:mrdocs:

Decode the first single&hyphen;request extension of type `nid` into its native structure&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void*
OCSP&lowbar;ONEREQ&lowbar;get1&lowbar;ext&lowbar;d2i(
    xref:OCSP_ONEREQ.adoc[OCSP&lowbar;ONEREQ]* x,
    int nid,
    int* crit,
    int* idx);
----

== Return Value

Newly allocated decoded extension value, or NULL if absent or on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *x*
| Single OCSP request entry to query&period;
| *nid*
| NID of the extension type to extract&period;
| *crit*
| Optional output set to 1 if critical, 0 if not, or &hyphen;1 on error&semi; may be NULL&period;
| *idx*
| Optional in&sol;out extension index for X509V3&lowbar;get&lowbar;d2i&hyphen;style iteration&semi; may be NULL&period;
|===


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