OCSP_resp_find_status

Find a SingleResponse for id and return its certificate status fields.

Synopsis

Declared in <openssl/ocsp.h>

int
OCSP_resp_find_status(
    OCSP_BASICRESP* bs,
    OCSP_CERTID* id,
    int* status,
    int* reason,
    ASN1_GENERALIZEDTIME** revtime,
    ASN1_GENERALIZEDTIME** thisupd,
    ASN1_GENERALIZEDTIME** nextupd);

Return Value

Index of the matching SingleResponse, or -1 if not found.

Parameters

NameDescription
bsBasic OCSP response to search.
idCertID identifying the certificate of interest.
statusReceives OCSP_CERTIFICATESTATUS_* (for example GOOD, REVOKED, UNKNOWN).
reasonOptional revocation reason code when status is revoked; may be NULL.
revtimeOptional revocation time when status is revoked; may be NULL.
thisupdOptional thisUpdate time from the SingleResponse; may be NULL.
nextupdOptional nextUpdate time from the SingleResponse; may be NULL.