From: Dr. Stephen Henson Date: Fri, 23 Oct 2009 12:06:35 +0000 (+0000) Subject: If not checking all certificates don't attempt to find a CRL X-Git-Tag: OpenSSL-fips-2_0-rc1~1475 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=45cd59ac71d244ff562741fbaffb34dc18872f5e If not checking all certificates don't attempt to find a CRL for the leaf certificate of a CRL path. --- diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index d1a15502a2..f5f632a45d 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -679,7 +679,12 @@ static int check_revocation(X509_STORE_CTX *ctx) if (ctx->param->flags & X509_V_FLAG_CRL_CHECK_ALL) last = sk_X509_num(ctx->chain) - 1; else + { + /* If checking CRL paths this isn't the EE certificate */ + if (ctx->parent) + return 1; last = 0; + } for(i = 0; i <= last; i++) { ctx->error_depth = i;