mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
Add some sanity checks when checking CRL scores
Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
parent
c6231e9c7b
commit
8b7c51a0e4
@ -974,10 +974,10 @@ static int get_crl_sk(X509_STORE_CTX *ctx, X509_CRL **pcrl, X509_CRL **pdcrl,
|
||||
crl = sk_X509_CRL_value(crls, i);
|
||||
reasons = *preasons;
|
||||
crl_score = get_crl_score(ctx, &crl_issuer, &reasons, crl, x);
|
||||
if (crl_score < best_score)
|
||||
if (crl_score < best_score || crl_score == 0)
|
||||
continue;
|
||||
/* If current CRL is equivalent use it if it is newer */
|
||||
if (crl_score == best_score) {
|
||||
if (crl_score == best_score && best_crl != NULL) {
|
||||
int day, sec;
|
||||
if (ASN1_TIME_diff(&day, &sec, X509_CRL_get0_lastUpdate(best_crl),
|
||||
X509_CRL_get0_lastUpdate(crl)) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user