logical.CertFactstypeno test imports ittype CertFacts = { readonly subject: string; readonly names: readonly string[]; readonly issuer: string; readonly notAfter: string; readonly key: string };What is read of a certificate.
Certificates, from the facts of one (read by the physical layer): an asset of the kind certificate, and the endpoints it secures: an endpoint that speaks over TLS whose host is one of the certificate's names (a wildcard name covers one label) is secured by it (secured-by).
import { names } from "./certificates.ts";
names({ subject: "a.example.test", names: ["*.example.test"], issuer: "ca", notAfter: "2027-01-01", key: "rsa-2048" }); // ["a.example.test", "*.example.test"]logical.CertFactstypeno test imports ittype CertFacts = { readonly subject: string; readonly names: readonly string[]; readonly issuer: string; readonly notAfter: string; readonly key: string };What is read of a certificate.
logical.namesfunctionno test imports itfunction names(c: CertFacts): readonly string[]The names a certificate is valid for: its subject and its alternative names, without repeats.
logical.coversfunctionno test imports itfunction covers(certName: string, host: string): booleanWhether a name is covered by a certificate name (a wildcard covers exactly one label).
logical.importCertificatesfunctionno test imports itfunction importCertificates(source: string, certs: readonly CertFacts[]): FoundThe assets of the certificates, as read.
logical.securefunctionno test imports itfunction secure(assets: readonly Imported[]): readonly ImportedLink[]The links of the endpoints a certificate secures, among the assets given: a certificate is matched to the endpoints that speak over TLS to one of its names.
CertFactstypeno test imports ittype CertFacts = { readonly subject: string; readonly names: readonly string[]; readonly issuer: string; readonly notAfter: string; readonly key: string };What is read of a certificate.
namesfunctionno test imports itfunction names(c: CertFacts): readonly string[]The names a certificate is valid for: its subject and its alternative names, without repeats.
coversfunctionfunction covers(certName: string, host: string): booleanWhether a name is covered by a certificate name (a wildcard covers exactly one label).
importCertificatesfunctionfunction importCertificates(source: string, certs: readonly CertFacts[]): FoundThe assets of the certificates, as read.
securefunctionfunction secure(assets: readonly Imported[]): readonly ImportedLink[]The links of the endpoints a certificate secures, among the assets given: a certificate is matched to the endpoints that speak over TLS to one of its names.