Documentation ¶
Overview ¶
Package acmetest provides types for testing acme and autocert packages.
TODO: Consider moving this to x/crypto/acme/internal/acmetest for acme tests as well.
Index ¶
- type CAServer
- func (ca *CAServer) ChallengeTypes(types ...string) *CAServer
- func (ca *CAServer) ExternalAccountRequired() *CAServer
- func (ca *CAServer) IssuerName(name pkix.Name) *CAServer
- func (ca *CAServer) LeafCert(name, keyType string, notBefore, notAfter time.Time) *tls.Certificate
- func (ca *CAServer) Resolve(domain, addr string)
- func (ca *CAServer) ResolveGetCertificate(domain string, f getCertificateFunc)
- func (ca *CAServer) ResolveHandler(domain string, h http.Handler)
- func (ca *CAServer) Roots() *x509.CertPool
- func (ca *CAServer) Start() *CAServer
- func (ca *CAServer) URL() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CAServer ¶
type CAServer struct {
// contains filtered or unexported fields
}
CAServer is a simple test server which implements ACME spec bits needed for testing.
func NewCAServer ¶
NewCAServer creates a new ACME test server. The returned CAServer issues certs signed with the CA roots available in the Roots field.
func (*CAServer) ChallengeTypes ¶
ChallengeTypes sets the supported challenge types.
func (*CAServer) ExternalAccountRequired ¶
ExternalAccountRequired makes an EAB JWS required for account registration.
func (*CAServer) IssuerName ¶
IssuerName sets the name of the issuing CA.
func (*CAServer) Resolve ¶
Resolve adds a domain to address resolution for the ca to dial to when validating challenges for the domain authorization.
func (*CAServer) ResolveGetCertificate ¶
ResolveGetCertificate redirects TLS connections for domain to f when validating challenges for the domain authorization.
func (*CAServer) ResolveHandler ¶
ResolveHandler redirects HTTP requests for domain to f when validating challenges for the domain authorization.