Skip to content

Support revocation checking for entire certificate chain #13

@loicsikidi

Description

@loicsikidi

Description

Currently, tpm-trust only checks for revocation of the leaf certificate (EK certificate) but does not verify revocation status for intermediate certificates in the chain. This creates a potential security gap where a compromised or revoked intermediate CA certificate could still be trusted.

Current Behavior

In internal/validate/certificate.go, the revocation check is performed as follows:

if !cfg.SkipRevocationCheck {
    crlUrls, err := c.prepareUrls(cfg.EK.Certificate.CRLDistributionPoints)
    // ... downloads and verifies CRL only for cfg.EK.Certificate
    if crl.IsRevoked(cfg.EK.Certificate) {
        return ErrCertificateRevoked
    }
}

This only checks the leaf certificate's revocation status.

Expected Behavior

The revocation check should be performed for:

  1. ✅ The leaf certificate (EK) - already implemented
  2. ❌ All intermediate CA certificates in the chain - missing

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions