This has been reproduced with OpenSSL 1.1.1a and a development build based on commit 13d928d.
The same issue has been rejected in #2873, while the correct argumentation might have been overlooked as it was submitted after the issue was already closed.
Consider a 3-layer hierarchy where the EE and subCA both have CRL Distribution Points set, but the self-signed does not.
depth=0: CN = EE (untrusted)
depth=1: CN = subCA (untrusted)
depth=2: CN = self-signed
The following verification attempt including -crl_check_all will fail, although it downloads both the two meaningful CRLs from the applicable distribution points.
$ openssl verify -CAfile self-signed.pem -untrusted subCA.pem -crl_check_all -crl_download EE.pem
CN = self-signed
error 3 at 2 depth lookup: unable to get certificate CRL
error EE.pem: verification failed
Note: there is no difference visible when replacing -CAfile with -trusted
If the same CLR which is also downloaded for validating the subCA certificate is given by means of -CRLfile, then the verification succeeds.
openssl verify -CAfile self-signed.pem -untrusted subCA.pem -crl_check_all -crl_download -CRLfile self-signedCRL.pem newcert.pem
EE.pem: OK
The verify documentation states
-crl_check_all
Checks the validity of all certificates in the chain by attempting to look up valid CRLs.
A valid CRL for the self-signed was downloaded when the the subCA certificate was validated; this CRL's Issuer matches the issuer of the self-signed certificate. It could be considered as a bug (or at least as missing feature) that this successfully looked up valid CRL was not considered as applicable for checking revocation status of the self-signed certificate.
This has been reproduced with OpenSSL 1.1.1a and a development build based on commit 13d928d.
The same issue has been rejected in #2873, while the correct argumentation might have been overlooked as it was submitted after the issue was already closed.
Consider a 3-layer hierarchy where the EE and subCA both have CRL Distribution Points set, but the self-signed does not.
The following verification attempt including -crl_check_all will fail, although it downloads both the two meaningful CRLs from the applicable distribution points.
Note: there is no difference visible when replacing -CAfile with -trusted
If the same CLR which is also downloaded for validating the subCA certificate is given by means of -CRLfile, then the verification succeeds.
The verify documentation states
A valid CRL for the self-signed was downloaded when the the subCA certificate was validated; this CRL's Issuer matches the issuer of the self-signed certificate. It could be considered as a bug (or at least as missing feature) that this successfully looked up valid CRL was not considered as applicable for checking revocation status of the self-signed certificate.