Documentation ¶
Index ¶
- type ChallSrv
- func (s *ChallSrv) AddDNSOneChallenge(host, content string)
- func (s *ChallSrv) AddHTTPOneChallenge(token, content string)
- func (s *ChallSrv) AddTLSALPNChallenge(host, content string)
- func (s *ChallSrv) DeleteDNSOneChallenge(host string)
- func (s *ChallSrv) DeleteHTTPOneChallenge(token string)
- func (s *ChallSrv) DeleteTLSALPNChallenge(host string)
- func (s *ChallSrv) GetDNSOneChallenge(host string) []string
- func (s *ChallSrv) GetHTTPOneChallenge(token string) (string, bool)
- func (s *ChallSrv) GetTLSALPNChallenge(host string) (string, bool)
- func (s *ChallSrv) Run()
- func (s *ChallSrv) ServeChallengeCertFunc(k *ecdsa.PrivateKey) func(*tls.ClientHelloInfo) (*tls.Certificate, error)
- func (s *ChallSrv) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *ChallSrv) Shutdown()
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChallSrv ¶
type ChallSrv struct {
// contains filtered or unexported fields
}
ChallSrv is a multi-purpose challenge server. Each ChallSrv may have one or more ACME challenges it provides servers for.
func (*ChallSrv) AddDNSOneChallenge ¶
AddDNSOneChallenge adds a TXT record for the given host with the given content.
func (*ChallSrv) AddHTTPOneChallenge ¶
AddHTTPOneChallenge adds a new HTTP-01 challenge for the given token and content.
func (*ChallSrv) AddTLSALPNChallenge ¶
AddTLSALPNChallenge adds a new TLS-ALPN-01 key authorization for the given host
func (*ChallSrv) DeleteDNSOneChallenge ¶
DeleteDNSOneChallenge deletes a TXT record for the given host.
func (*ChallSrv) DeleteHTTPOneChallenge ¶
DeleteHTTPOneChallenge deletes a given HTTP-01 challenge token.
func (*ChallSrv) DeleteTLSALPNChallenge ¶
DeleteTLSALPNChallenge deletes the key authorization for a given host
func (*ChallSrv) GetDNSOneChallenge ¶
GetDNSOneChallenge returns a slice of TXT record values for the given host. If the host does not exist in the challenge response data then nil is returned.
func (*ChallSrv) GetHTTPOneChallenge ¶
GetHTTPOneChallenge returns the HTTP-01 challenge content for the given token (if it exists) and a true bool. If the token does not exist then an empty string and a false bool are returned.
func (*ChallSrv) GetTLSALPNChallenge ¶
GetTLSALPNChallenge checks the s.tlsALPNOne map for the given host. If it is present it returns the key authorization and true, if not it returns an empty string and false.
func (*ChallSrv) ServeChallengeCertFunc ¶
func (s *ChallSrv) ServeChallengeCertFunc(k *ecdsa.PrivateKey) func(*tls.ClientHelloInfo) (*tls.Certificate, error)
type Config ¶
type Config struct { Log *log.Logger // HTTPOneAddrs are the HTTP-01 challenge server bind addresses/ports HTTPOneAddrs []string // DNSOneAddrs are the DNS-01 challenge server bind addresses/ports DNSOneAddrs []string // TLSALPNOneAddrs are the TLS-ALPN-01 challenge server bind addresses/ports TLSALPNOneAddrs []string }
Config holds challenge server configuration