mirror of
https://github.com/openssl/openssl.git
synced 2025-02-17 14:32:04 +08:00
Fix CRL time comparison.
Thanks to David Benjamin <davidben@google.com> for reporting this bug. Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
e040a42e44
commit
e032117db2
@ -979,7 +979,11 @@ static int get_crl_sk(X509_STORE_CTX *ctx, X509_CRL **pcrl, X509_CRL **pdcrl,
|
||||
if (ASN1_TIME_diff(&day, &sec, X509_CRL_get_lastUpdate(best_crl),
|
||||
X509_CRL_get_lastUpdate(crl)) == 0)
|
||||
continue;
|
||||
if (day < 0 || sec <= 0)
|
||||
/*
|
||||
* ASN1_TIME_diff never returns inconsistent signs for |day|
|
||||
* and |sec|.
|
||||
*/
|
||||
if (day <= 0 && sec <= 0)
|
||||
continue;
|
||||
}
|
||||
best_crl = crl;
|
||||
|
Loading…
Reference in New Issue
Block a user