MCPcopy
hub / github.com/caddyserver/certmagic / GetACMEChallenge

Function GetACMEChallenge

solvers.go:816–823  ·  view source on GitHub ↗

GetACMEChallenge returns an active ACME challenge for the given identifier, or false if no active challenge for that identifier is known.

(identifier string)

Source from the content-addressed store, hash-verified

814// GetACMEChallenge returns an active ACME challenge for the given identifier,
815// or false if no active challenge for that identifier is known.
816func GetACMEChallenge(identifier string) (Challenge, bool) {
817 // Strip brackets from IPv6 addresses (e.g. "[::1]" from HTTP Host headers).
818 identifier = hostOnly(identifier)
819 activeChallengesMu.Lock()
820 chalData, ok := activeChallenges[identifier]
821 activeChallengesMu.Unlock()
822 return chalData, ok
823}
824
825// The active challenge solvers, keyed by listener address,
826// and protected by a mutex. Note that the creation of

Callers 2

getACMEChallengeInfoMethod · 0.85

Calls 3

hostOnlyFunction · 0.85
LockMethod · 0.65
UnlockMethod · 0.65

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…