acme

package
v0.0.93 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 31 Imported by: 0

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)

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.

func Validate

func Validate(domain string) error

Validate checks domain for validity. domain is the domain name of your website. It can be an exact domain, subdomain or wildcard.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL