[#OCSP_check_validity]
= OCSP&lowbar;check&lowbar;validity
:mrdocs:

Check that OCSP thisUpdate&sol;nextUpdate times are acceptable relative to now&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
OCSP&lowbar;check&lowbar;validity(
    xref:ASN1_GENERALIZEDTIME.adoc[ASN1&lowbar;GENERALIZEDTIME]* thisupd,
    xref:ASN1_GENERALIZEDTIME.adoc[ASN1&lowbar;GENERALIZEDTIME]* nextupd,
    long sec,
    long maxsec);
----

== Return Value

1 if the times are valid, or 0 otherwise&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *thisupd*
| thisUpdate time from a SingleResponse (required)&period;
| *nextupd*
| Optional nextUpdate time, or NULL if absent&period;
| *sec*
| Allowed skew in seconds comparing thisUpdate to the current time&period;
| *maxsec*
| Maximum age of thisUpdate in seconds, or &hyphen;1 for no maximum&period;
|===


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