RevocationPolicy
RevocationPolicy
Revocation checking policy for checkChainRevocation.
Controls how indeterminate results (missing evidence, expired CRLs) affect the final decision.
interface RevocationPolicy {
readonly mode?: "soft-fail" | "hard-fail";
readonly prefer?: "ocsp" | "crl" | "best-available";
readonly ocspResponderRevocation?: OcspResponderRevocationPolicy;
readonly crlMaxAgeMs?: number;
readonly clockSkewMs?: number;
readonly ocspProfile?: ValidateOcspResponseInput["profile"];
readonly unrecognizedReasonCode?: UnrecognizedReasonCodePolicy;
}Properties
readonlymode?:"soft-fail"|"hard-fail"— How to handle indeterminate status.'hard-fail': indeterminate certificates cause denial (default)'soft-fail': indeterminate certificates are allowed — an explicit availability/compatibility choice
Revocation checking itself is opt-in: no check runs unless evidence is supplied. Once it is, indeterminate status denies by default.
readonlyprefer?:"ocsp"|"crl"|"best-available"— Evidence preference when multiple sources are available.Both evidence kinds are always evaluated, and a validated
revokedverdict from either source wins regardless of preference (fail-closed). Preference only decides which source'sgoodverdict is reported when both yield one.'best-available': the source with the fresher evidence — the laterthisUpdateon the validated OCSP entry or CRL — is reported; ties favor OCSP (default)'ocsp': prefer OCSP over CRL'crl': prefer CRL over OCSP
readonlyocspResponderRevocation?:OcspResponderRevocationPolicy— Revocation policy for delegated OCSP responder certificates (RFC 6960 §4.2.2.2.1). Supplied CRLs double as responder revocation evidence. Defaults to'honor-nocheck'.readonlycrlMaxAgeMs?:number— Maximum age of a CRL'sthisUpdateat the evaluation time, in milliseconds. An older CRL yields no evidence even when it carries nonextUpdate. Applies to CRLs for chain certificates, CRL signers and delegated OCSP responders. Unbounded by default, in which case a CRL withoutnextUpdateyields no evidence. RFC 5280 §3.3 leaves the required recency of revocation data to local policy.readonlyclockSkewMs?:number— Clock-skew tolerance in milliseconds for CRL and OCSPthisUpdate/nextUpdatechecks. It also widenscrlMaxAgeMsby the same amount. Defaults to0.readonlyocspProfile?:ValidateOcspResponseInput["profile"] — OCSP client profile for every OCSP response. SeeValidateOcspResponseInput.profile.'rfc9919'turns a response withoutnextUpdateintoocsp_next_update_missing. Defaults to'rfc6960'.readonlyunrecognizedReasonCode?:UnrecognizedReasonCodePolicy— Treatment of CRL entries and OCSP responses whose CRLReason is unrecognized, including the CRLs for CRL signers and delegated OCSP responders. SeeUnrecognizedReasonCodePolicy.'reject'makes that evidence yieldcrl_reason_code_unrecognizedorocsp_reason_code_unrecognized, which outranks agoodverdict from other evidence. Defaults to'revoked'.