Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACME ¶
type ACME struct { Domain *types.Domain Logger logger.Interface // HostPolicy controls which domains the Manager will attempt // to retrieve new certificates for. It does not affect cached certs. // // If non-nil, HostPolicy is called before requesting a new cert. // If nil, all hosts are currently allowed. This is not recommended, // as it opens a potential attack where clients connect to a server // by IP address and pretend to be asking for an incorrect host name. // Manager will attempt to obtain a certificate for that host, incorrectly, // eventually reaching the CA's rate limit for certificate requests // and making it impossible to obtain actual certificates. // // See GetCertificate for more details. HostPolicy HostPolicy BackendName string CAServer string DNSProvider string Email string KeyType string KeyPath string CertPath string SelfSigned bool // contains filtered or unexported fields }
ACME allows to connect to lets encrypt and retrieve certs.
type HostPolicy ¶
HostPolicy borrowed from golang.org/x/crypto/acme/autocert HostPolicy specifies which host names the Manager is allowed to respond to. It returns a non-nil error if the host should be rejected. The returned error is accessible via tls.Conn.Handshake and its callers. See Manager's HostPolicy field and GetCertificate method docs for more details.
func HostWhitelist ¶
func HostWhitelist(hosts ...string) HostPolicy
HostWhitelist returns a policy where only the specified host names are allowed. Only exact matches are currently supported. Subdomains, regexp or wildcard will not match. waring: in here, we do not convert hosts to Punycode via idna.Lookup.ToASCII like golang.org/x/crypto/acme/autocert but only convert to lower case, since idna.Lookup.ToASCII("TEST-UPPER-CASE.com") will result in "test-upper-case.com" Invalid hosts will be silently ignored.
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
examples
|
|
grpc/helloworld
Package helloworld is a generated protocol buffer package.
|
Package helloworld is a generated protocol buffer package. |