Beryl::Certificates::TrustStore
The certificates a verifier trusts as the ends of paths (trust anchors).
Beryl::Certificates::TrustStore.mozilla # the pinned Mozilla root set
Beryl::Certificates::TrustStore.system # the operating system's bundle
Beryl::Certificates::TrustStore.from_pem(File.read("ca.pem")) # an application's own CA
mozilla is the Mozilla root set with the Websites trust bit, from the
CCADB report IncludedRootsPEMTxt?TrustBitsInclude=Websites, compiled
into Beryl and pinned by sha256 (MOZILLA_ROOTS_SHA256), so verdicts are
the same on every machine and change only with a Beryl release. Mozilla's
per-root "distrust for TLS after" dates are not applied.
Constants
The bundles system reads, first one found wins: Debian and Ubuntu,
Fedora and RHEL, openSUSE, then Alpine and macOS (where the file
trails the keychain; see system).
When the root set was taken from the CCADB.
The sha256 of data/mozilla_root_certificates.pem, checked by a spec.
The environment variable that names a PEM bundle to use in place of the operating system's, as OpenSSL and Go read it.
Constructors
The certificates in the PEM text. A block that is not a certificate Beryl can read is skipped (system bundles hold a few with old encodings), and logged at debug level.
The trust anchors in the operating system's bundle (see
LIST_OF_SYSTEM_BUNDLE_PATHS), or in the file SSL_CERT_FILE names
when it is set, as OpenSSL's default paths and Go's crypto/x509
honor it. Raises Error when no bundle is found.
On macOS the keychain, not /etc/ssl/cert.pem, holds the roots the
system trusts, and the file falls behind it: on macOS 27.2.1 it lacks
SSL.com TLS ECC Root CA 2022 and AAA Certificate Services, so a
server whose chain ends there (www.example.com in November 2026) would
be refused. So on macOS, unless SSL_CERT_FILE is set, system is
that file joined with the pinned Mozilla set (mozilla).
Class methods
Whether system adds the pinned Mozilla set to the bundle it reads:
on macOS when SSL_CERT_FILE is not set.
The bundle system reads: the file SSL_CERT_FILE names when it is
set and not empty, else the first of LIST_OF_SYSTEM_BUNDLE_PATHS
that exists.
Instance methods
The anchors whose subject is name.