{"record":{"id":"c7fccfd152233b09","repo":"oven-sh/bun","slug":"error-in-crl-last-update-field","errorCode":"ERROR_IN_CRL_LAST_UPDATE_FIELD","errorMessage":"ERROR_IN_CRL_LAST_UPDATE_FIELD","messagePattern":"ERROR_IN_CRL_LAST_UPDATE_FIELD","errorType":"error_code","errorClass":"CertError","httpStatus":null,"severity":"error","filePath":"src/http/error.rs","lineNumber":151,"sourceCode":"    #[error(\"UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY\")]\n    UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY,\n    #[error(\"CERT_SIGNATURE_FAILURE\")]\n    CERT_SIGNATURE_FAILURE,\n    #[error(\"CRL_SIGNATURE_FAILURE\")]\n    CRL_SIGNATURE_FAILURE,\n    #[error(\"CERT_NOT_YET_VALID\")]\n    CERT_NOT_YET_VALID,\n    #[error(\"CERT_HAS_EXPIRED\")]\n    CERT_HAS_EXPIRED,\n    #[error(\"CRL_NOT_YET_VALID\")]\n    CRL_NOT_YET_VALID,\n    #[error(\"CRL_HAS_EXPIRED\")]\n    CRL_HAS_EXPIRED,\n    #[error(\"ERROR_IN_CERT_NOT_BEFORE_FIELD\")]\n    ERROR_IN_CERT_NOT_BEFORE_FIELD,\n    #[error(\"ERROR_IN_CERT_NOT_AFTER_FIELD\")]\n    ERROR_IN_CERT_NOT_AFTER_FIELD,\n    #[error(\"ERROR_IN_CRL_LAST_UPDATE_FIELD\")]\n    ERROR_IN_CRL_LAST_UPDATE_FIELD,\n    #[error(\"ERROR_IN_CRL_NEXT_UPDATE_FIELD\")]\n    ERROR_IN_CRL_NEXT_UPDATE_FIELD,\n    #[error(\"OUT_OF_MEM\")]\n    OUT_OF_MEM,\n    #[error(\"DEPTH_ZERO_SELF_SIGNED_CERT\")]\n    DEPTH_ZERO_SELF_SIGNED_CERT,\n    #[error(\"SELF_SIGNED_CERT_IN_CHAIN\")]\n    SELF_SIGNED_CERT_IN_CHAIN,\n    #[error(\"UNABLE_TO_GET_ISSUER_CERT_LOCALLY\")]\n    UNABLE_TO_GET_ISSUER_CERT_LOCALLY,\n    #[error(\"UNABLE_TO_VERIFY_LEAF_SIGNATURE\")]\n    UNABLE_TO_VERIFY_LEAF_SIGNATURE,\n    #[error(\"CERT_CHAIN_TOO_LONG\")]\n    CERT_CHAIN_TOO_LONG,\n    #[error(\"CERT_REVOKED\")]\n    CERT_REVOKED,\n    #[error(\"INVALID_CA\")]","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/http/error.rs#L133-L169","documentation":"X509 verify result 15 (X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD): the CRL's lastUpdate (thisUpdate) field is malformed and cannot be parsed. Mapped via get_cert_error_from_no (src/http/lib.rs:1534) to CertError::ERROR_IN_CRL_LAST_UPDATE_FIELD (FetchTasklet.rs message table).","triggerScenarios":"TLS handshake with CRL checking where the CRL fetched for a chain cert has an unparseable thisUpdate field.","commonSituations":"Hand-rolled or ancient CA software emitting non-conformant CRL timestamps; corrupted CRL downloads.","solutions":["Reissue the CRL from maintained CA software with standard date encodings","Inspect: openssl crl -in crl.pem -noout -lastupdate — a parse error confirms corruption","Disable CRL checking for this host until the CA output is fixed","Move the PKI to OCSP so CRL parsing is not on the request path"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"function isCertErrorCode(e: unknown, code = \"ERROR_IN_CRL_LAST_UPDATE_FIELD\"): e is Error & { code: string } {\n  return e instanceof Error && (e as any).code === code;\n}","tryCatchPattern":"try {\n  await fetch(url);\n} catch (e) {\n  if (isCertErrorCode(e, \"ERROR_IN_CRL_LAST_UPDATE_FIELD\")) {\n    throw new Error(\"CRL has a malformed lastUpdate field — PKI must reissue the CRL\");\n  }\n  throw e;\n}","preventionTips":["Use maintained CA software to sign CRLs","Parse-check CRLs (openssl crl -noout -lastupdate) in PKI CI","Move to OCSP where CRL quality can't be guaranteed"],"tags":["tls","certificates","crl","fetch"],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}