module

Beryl::Certificates::PublicSuffixList

The Public Suffix List (https://publicsuffix.org), used to refuse a wildcard that covers a whole public suffix such as *.co.uk or *.s3.amazonaws.com (CA/Browser Forum baseline requirements ยง3.2.2.6).

The list is data/public_suffix_list.dat, pinned by sha256 (see SHA256) and updated with scripts/update_certificate_data.rb. It is published under the Mozilla Public License 2.0, whose notice heads the file. Only ASCII rules (A-labels) are used; the list's rules in Unicode form are converted by IDNA in browsers and never match the ASCII names a certificate holds, except through their xn-- form, which the list does not carry, so those rules are left out.

Constants

COMMIT = "87a2c1b8de5886a133ff4da21b2aa6fec88d8739"

The upstream commit the file was taken at.

SHA256 = "00a0af2ed2379634523b9ca80de3469d1466893915c252a91264e248c92d69d8"

The sha256 of data/public_suffix_list.dat, checked by a spec.

TEXT = {{ read_file("/tmp/tmp.JBPNOM/src/src/beryl/certificates/data/public_suffix_list.dat") }}

Class methods

public_suffix?(name : String) : Bool

Returns whether name (lowercase, without a final dot) is a public suffix: a name listed, a name under a listed wildcard and not listed as an exception, or a single label (the list's implicit * rule).

Source
rules
Source

Nested types