MCPcopy
hub / github.com/caddyserver/caddy / validate

Method validate

modules/caddypki/acmeserver/challenges.go:21–28  ·  view source on GitHub ↗

validate checks if the given challenge is supported.

()

Source from the content-addressed store, hash-verified

19
20// validate checks if the given challenge is supported.
21func (c ACMEChallenge) validate() error {
22 switch c {
23 case HTTP_01, DNS_01, TLS_ALPN_01:
24 return nil
25 default:
26 return fmt.Errorf("acme challenge %q is not supported", c)
27 }
28}
29
30// The unmarshaller first marshals the value into a string. Then it
31// trims any space around it and lowercase it for normaliztion. The

Callers 2

ProvisionMethod · 0.45
validateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected