[#OCSP_resp_find_status]
= OCSP&lowbar;resp&lowbar;find&lowbar;status
:mrdocs:

Find a SingleResponse for `id` and return its certificate status fields&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
OCSP&lowbar;resp&lowbar;find&lowbar;status(
    xref:OCSP_BASICRESP.adoc[OCSP&lowbar;BASICRESP]* bs,
    xref:OCSP_CERTID.adoc[OCSP&lowbar;CERTID]* id,
    int* status,
    int* reason,
    xref:ASN1_GENERALIZEDTIME.adoc[ASN1&lowbar;GENERALIZEDTIME]** revtime,
    xref:ASN1_GENERALIZEDTIME.adoc[ASN1&lowbar;GENERALIZEDTIME]** thisupd,
    xref:ASN1_GENERALIZEDTIME.adoc[ASN1&lowbar;GENERALIZEDTIME]** nextupd);
----

== Return Value

Index of the matching SingleResponse, or &hyphen;1 if not found&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *bs*
| Basic OCSP response to search&period;
| *id*
| CertID identifying the certificate of interest&period;
| *status*
| Receives OCSP&lowbar;CERTIFICATESTATUS&lowbar;&ast; (for example GOOD, REVOKED, UNKNOWN)&period;
| *reason*
| Optional revocation reason code when status is revoked&semi; may be NULL&period;
| *revtime*
| Optional revocation time when status is revoked&semi; may be NULL&period;
| *thisupd*
| Optional thisUpdate time from the SingleResponse&semi; may be NULL&period;
| *nextupd*
| Optional nextUpdate time from the SingleResponse&semi; may be NULL&period;
|===


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