Skip to content

CRL Scope Mismatch with OpenSSL Due to onlyContainsUserCerts in IDP Extension #2250

@miso-simo

Description

@miso-simo

Steps to Reproduce

  1. Start a step-ca instance (tested with v0.28.1) with CRL enabled in ca.json:

"crl": {
"enabled": true,
"cacheDuration": "1h0m0s",
"refresh": "10m",
"idpURL": "https://ca.example.local:8443/1.0/crl",
"includeSubtree": true
}

  1. Issue a leaf certificate with CA:FALSE (e.g., a web server cert).

  2. Revoke the certificate using:

step ca revoke --reason superseded

  1. Download the CRL (current.crl) and verify the certificate with OpenSSL:

openssl verify -crl_check -no_check_time
-CAfile intermediate-ca.pem
-CRLfile current.crl
cert.pem

Your Environment

  • OS - Debian Linux v. 12
  • step-ca Version - v0.28.1

Expected Behavior

OpenSSL should validate the certificate as revoked, provided:

The CRL includes the revoked cert serial number.

The issuer of the CRL matches the issuer of the cert.

The cert has CA:FALSE (user cert).

The CRL's IDP does not impose conflicting constraints.

Actual Behavior

OpenSSL fails with:

error 44 at 0 depth lookup: different CRL scope
error cert.pem: verification failed

The CRL contains the following extension:

X509v3 Issuing Distribution Point: critical
Full Name:
URI:https://ca.example.local:8443/1.0/crl
Only User Certificates

Even though the revoked cert is a user cert (CA:FALSE), and the issuers match.

Additional Context

This issue appears to stem from OpenSSL's strict interpretation of the onlyContainsUserCerts flag. Despite the cert being a user cert, OpenSSL deems the CRL scope mismatched, likely due to the presence of the IDP extension.


Suggested Fix or Feature Request

Provide an option in step-ca to disable or customize the Issuing Distribution Point extension in CRLs (e.g., via ca.json).

Or remove the onlyContainsUserCerts flag unless explicitly required by a policy.

As OCSP is not available in the open-source edition, CRL behavior should be as broadly compatible as possible

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Metadata

Metadata

Assignees

Labels

bugneeds triageWaiting for discussion / prioritization by team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions