| 1 | import { Directories } from "@distilled.cloud/acme"; |
| 2 | |
| 3 | /** |
| 4 | * An ACME certificate authority: its directory URL plus, for private CAs |
| 5 | * (Pebble, step-ca), the PEM root that signs the CA's own HTTPS endpoint. |
| 6 | */ |
| 7 | export interface CertificateAuthority { |
| 8 | /** The CA's ACME directory URL. */ |
| 9 | readonly directoryUrl: string; |
| 10 | /** |
| 11 | * PEM root certificate to trust for the CA's HTTPS endpoint. Only for |
| 12 | * private CAs whose API certificate is not publicly trusted; public CAs |
| 13 | * leave it unset. |
| 14 | */ |
| 15 | readonly trustedRoot?: string | undefined; |
| 16 | } |
| 17 | |
| 18 | /** Let's Encrypt production. No External Account Binding. */ |
| 19 | export const LetsEncrypt: CertificateAuthority = { |
| 20 | directoryUrl: Directories.LetsEncrypt, |
| 21 | }; |
| 22 | |
| 23 | /** Let's Encrypt staging: generous limits, untrusted chain. */ |
| 24 | export const LetsEncryptStaging: CertificateAuthority = { |
| 25 | directoryUrl: Directories.LetsEncryptStaging, |
| 26 | }; |
| 27 | |
| 28 | /** ZeroSSL. Requires an External Account Binding (`eab`). */ |
| 29 | export const ZeroSSL: CertificateAuthority = { |
| 30 | directoryUrl: Directories.ZeroSSL, |
| 31 | }; |
| 32 | |
| 33 | /** Google Trust Services. Requires an External Account Binding (`eab`). */ |
| 34 | export const GoogleTrustServices: CertificateAuthority = { |
| 35 | directoryUrl: Directories.GoogleTrustServices, |
| 36 | }; |
| 37 | |
| 38 | /** Google Trust Services staging. */ |
| 39 | export const GoogleTrustServicesStaging: CertificateAuthority = { |
| 40 | directoryUrl: Directories.GoogleTrustServicesStaging, |
| 41 | }; |