|
|
|
|
720
|
/* Check OCSP response is valid at the specified time
|
720
|
/* Check OCSP response is valid at the specified time
|
721
|
* (allowing for some margin of error).
|
721
|
* (allowing for some margin of error).
|
722
|
*/
|
722
|
*/
|
723
|
- if ( response->this_update > ( time - OCSP_ERROR_MARGIN_TIME ) ) {
|
|
|
|
|
723
|
+ if ( response->this_update > ( time + OCSP_ERROR_MARGIN_TIME ) ) {
|
724
|
DBGC ( ocsp, "OCSP %p \"%s\" response is not yet valid (at "
|
724
|
DBGC ( ocsp, "OCSP %p \"%s\" response is not yet valid (at "
|
725
|
"time %lld)\n", ocsp, ocsp->cert->subject.name, time );
|
725
|
"time %lld)\n", ocsp, ocsp->cert->subject.name, time );
|
726
|
return -EACCES_STALE;
|
726
|
return -EACCES_STALE;
|
727
|
}
|
727
|
}
|
728
|
- if ( response->next_update < ( time + OCSP_ERROR_MARGIN_TIME ) ) {
|
|
|
|
|
728
|
+ if ( response->next_update < ( time - OCSP_ERROR_MARGIN_TIME ) ) {
|
729
|
DBGC ( ocsp, "OCSP %p \"%s\" response is stale (at time "
|
729
|
DBGC ( ocsp, "OCSP %p \"%s\" response is stale (at time "
|
730
|
"%lld)\n", ocsp, ocsp->cert->subject.name, time );
|
730
|
"%lld)\n", ocsp, ocsp->cert->subject.name, time );
|
731
|
return -EACCES_STALE;
|
731
|
return -EACCES_STALE;
|