class

Beryl::Certificates::CertificateRevocationList

Inherits Reference < Object

A certificate revocation list (RFC 5280 ยง5), read from DER.

ChainVerification takes CRLs the caller already has (Beryl does not fetch them). A CRL counts for a certificate when its issuer name is the certificate's issuer name; such a CRL must then be usable (signed by the issuer's key, current at the validation time, no unknown critical extension, a non-critical CRL number, no serial listed twice), or the chain is refused, since a CRL that claims to speak for an issuer and cannot be checked must not be ignored.

Constants

DEFAULT_LIMITS = DER::Limits.new(largest_input_bytesize: (16 * 1024) * 1024)

CRLs hold one entry per revoked certificate, so they are allowed to be larger than one certificate: 16 MiB, about 400,000 entries.

LIST_OF_UNDERSTOOD_ENTRY_EXTENSIONS = [ObjectIdentifiers::CRL_REASON, ObjectIdentifiers::INVALIDITY_DATE]

The entry extension identifiers an entry may mark critical.

LIST_OF_UNDERSTOOD_EXTENSIONS = [ObjectIdentifiers::AUTHORITY_KEY_IDENTIFIER, ObjectIdentifiers::CRL_NUMBER]

The extension identifiers a CRL may mark critical and still be used.

Constructors

new(encoded : Bytes, *, limits : DER::Limits = DEFAULT_LIMITS)

Reads the DER CRL in encoded. Raises MalformedCertificate.

Source

Class methods

list_from_pem(text : String) : Array(CertificateRevocationList)

Reads every X509 CRL block of the PEM text.

Source

Instance methods

encoded
Source
issuer
Source
list_of_entries
Source
list_of_extensions
Source
next_update
Source
revokes?(serial_number : Bytes) : Bool

Returns whether the CRL lists serial_number.

Source
signature
Source
signature_algorithm
Source
this_update
Source
to_be_signed
Source
unusable_reason(issuer_certificate : Certificate, time : Time) : String | Nil

Returns why this CRL cannot be used to decide revocation for certificates of issuer_certificate at time, or nil when it can.

Source

Nested types