challengeKey returns the map key for a given challenge; it is the identifier unless it is an IP address using the TLS-ALPN challenge.
(chal acme.Challenge)
| 854 | // challengeKey returns the map key for a given challenge; it is the identifier |
| 855 | // unless it is an IP address using the TLS-ALPN challenge. |
| 856 | func challengeKey(chal acme.Challenge) string { |
| 857 | if chal.Type == acme.ChallengeTypeTLSALPN01 && chal.Identifier.Type == "ip" { |
| 858 | reversed, err := dns.ReverseAddr(chal.Identifier.Value) |
| 859 | if err == nil { |
| 860 | return reversed[:len(reversed)-1] // strip off '.' |
| 861 | } |
| 862 | } |
| 863 | return chal.Identifier.Value |
| 864 | } |
| 865 | |
| 866 | // solverWrapper should be used to wrap all challenge solvers so that |
| 867 | // we can add the challenge info to memory; this makes challenges globally |
no outgoing calls
searching dependent graphs…