MCPcopy
hub / github.com/caddyserver/caddy / ZeroSSLIssuer

Struct ZeroSSLIssuer

modules/caddytls/zerosslissuer.go:40–66  ·  view source on GitHub ↗

ZeroSSLIssuer uses the ZeroSSL API to get certificates. Note that this is distinct from ZeroSSL's ACME endpoint. To use ZeroSSL's ACME endpoint, use the ACMEIssuer configured with ZeroSSL's ACME directory endpoint.

Source from the content-addressed store, hash-verified

38// To use ZeroSSL's ACME endpoint, use the ACMEIssuer
39// configured with ZeroSSL's ACME directory endpoint.
40type ZeroSSLIssuer struct {
41 // The API key (or "access key") for using the ZeroSSL API.
42 // REQUIRED.
43 APIKey string `json:"api_key,omitempty"` //nolint:gosec // false positive... yes this is exported, for JSON interop
44
45 // How many days the certificate should be valid for.
46 // Only certain values are accepted; see ZeroSSL docs.
47 ValidityDays int `json:"validity_days,omitempty"`
48
49 // The host to bind to when opening a listener for
50 // verifying domain names (or IPs).
51 ListenHost string `json:"listen_host,omitempty"`
52
53 // If HTTP is forwarded from port 80, specify the
54 // forwarded port here.
55 AlternateHTTPPort int `json:"alternate_http_port,omitempty"`
56
57 // Use CNAME validation instead of HTTP. ZeroSSL's
58 // API uses CNAME records for DNS validation, similar
59 // to how Let's Encrypt uses TXT records for the
60 // DNS challenge.
61 CNAMEValidation *DNSChallengeConfig `json:"cname_validation,omitempty"`
62
63 logger *zap.Logger
64 storage certmagic.Storage
65 issuer *certmagic.ZeroSSLIssuer
66}
67
68// CaddyModule returns the Caddy module information.
69func (*ZeroSSLIssuer) CaddyModule() caddy.ModuleInfo {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected