GetACMEChallenge returns an active ACME challenge for the given identifier, or false if no active challenge for that identifier is known.
(identifier string)
| 814 | // GetACMEChallenge returns an active ACME challenge for the given identifier, |
| 815 | // or false if no active challenge for that identifier is known. |
| 816 | func 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 |
searching dependent graphs…