Documentation ¶
Overview ¶
Package acme provides automatic access to certificates from ACME-based certificate authorities(like Let's Encrypt).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCertificate ¶
func GetCertificate(tlsHosts []string, email, acmeDirectoryUrl string, l *slog.Logger) (_ func(hello *tls.ClientHelloInfo) (*tls.Certificate, error), _ error)
GetCertificate returns a function that implements tls.Config.GetCertificate. It provides a TLS certificate for hello.ServerName host. It should be called once and then the returned function can be called per request.
GetCertificate panics on error, however the returned function handles errors normally.
func Handler ¶
func Handler(wrappedHandler http.Handler) http.HandlerFunc
Handler returns a http.Handler that can be used to respond to ACME "http-01" challenge responses. Ong configures this for you automatically, so users of Ong do not have to worry about this handler.
Handler panics on error, however the returned http.Handler handles errors normally.
Types ¶
This section is empty.