Skip to content

verify -crl_check_all requires separate CRL for self-signed certificate #8439

Description

@mpeylo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    branch: 3.0Applies to openssl-3.0 branchbranch: 3.1Applies to openssl-3.1 (EOL)branch: 3.2Applies to openssl-3.2 (EOL)branch: masterApplies to master branchtriaged: bugThe issue/pr is/fixes a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions