oven-sh/bun · error · CertError

CRL_SIGNATURE_FAILURE

Error message

CRL_SIGNATURE_FAILURE

What it means

X509 verify result 8 (X509_V_ERR_CRL_SIGNATURE_FAILURE): the CRL's signature is invalid — the CRL fails integrity verification against its issuing CA. Mapped via get_cert_error_from_no (src/http/lib.rs:1527) to CertError::CRL_SIGNATURE_FAILURE, message "CRL signature failure" (FetchTasklet.rs:1394).

Source

Thrown at src/http/error.rs:137

#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error, strum::IntoStaticStr)]
pub enum CertError {
    #[error("OK")]
    OK,
    #[error("UNABLE_TO_GET_ISSUER_CERT")]
    UNABLE_TO_GET_ISSUER_CERT,
    #[error("UNABLE_TO_GET_CRL")]
    UNABLE_TO_GET_CRL,
    #[error("UNABLE_TO_DECRYPT_CERT_SIGNATURE")]
    UNABLE_TO_DECRYPT_CERT_SIGNATURE,
    #[error("UNABLE_TO_DECRYPT_CRL_SIGNATURE")]
    UNABLE_TO_DECRYPT_CRL_SIGNATURE,
    #[error("UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY")]
    UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY,
    #[error("CERT_SIGNATURE_FAILURE")]
    CERT_SIGNATURE_FAILURE,
    #[error("CRL_SIGNATURE_FAILURE")]
    CRL_SIGNATURE_FAILURE,
    #[error("CERT_NOT_YET_VALID")]
    CERT_NOT_YET_VALID,
    #[error("CERT_HAS_EXPIRED")]
    CERT_HAS_EXPIRED,
    #[error("CRL_NOT_YET_VALID")]
    CRL_NOT_YET_VALID,
    #[error("CRL_HAS_EXPIRED")]
    CRL_HAS_EXPIRED,
    #[error("ERROR_IN_CERT_NOT_BEFORE_FIELD")]
    ERROR_IN_CERT_NOT_BEFORE_FIELD,
    #[error("ERROR_IN_CERT_NOT_AFTER_FIELD")]
    ERROR_IN_CERT_NOT_AFTER_FIELD,
    #[error("ERROR_IN_CRL_LAST_UPDATE_FIELD")]
    ERROR_IN_CRL_LAST_UPDATE_FIELD,
    #[error("ERROR_IN_CRL_NEXT_UPDATE_FIELD")]
    ERROR_IN_CRL_NEXT_UPDATE_FIELD,
    #[error("OUT_OF_MEM")]

View on GitHub (pinned to 8c5296ac45)

Solutions

  1. Re-publish a freshly signed CRL from the active CA key
  2. Validate the CRL out of band: openssl crl -in crl.pem -CAfile ca.pem -noout -verify
  3. Disable CRL checking for the affected host or move to OCSP
  4. If the CRL is only stale, remove the strict-revocation requirement until the CA fixes distribution
Defensive patterns

Strategy: try-catch

Type guard

function isCertErrorCode(e: unknown, code = "CRL_SIGNATURE_FAILURE"): e is Error & { code: string } {
  return e instanceof Error && (e as any).code === code;
}

Try / catch

try {
  await fetch(url);
} catch (e) {
  if (isCertErrorCode(e, "CRL_SIGNATURE_FAILURE")) {
    throw new Error("Revocation data (CRL) failed integrity check — possible PKI compromise or misconfiguration");
  }
  throw e;
}

Prevention

When it happens

Trigger: A TLS handshake with CRL checking enabled where the retrieved CRL fails signature validation (tampered, truncated, or signed by a different CA key after rotation).

Common situations: Post-rotation PKIs still serving old CRLs, misconfigured CRL distribution servers, or firewalls mangling downloads.

Related errors


AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16). Data as JSON: /api/errors/6aa59d54aeb84871. Report an issue: GitHub.