github.com/letsencrypt/boulder@v0.20251208.0/core/challenges.go (about) 1 package core 2 3 func newChallenge(challengeType AcmeChallenge, token string) Challenge { 4 return Challenge{ 5 Type: challengeType, 6 Status: StatusPending, 7 Token: token, 8 } 9 } 10 11 // HTTPChallenge01 constructs a http-01 challenge. 12 func HTTPChallenge01(token string) Challenge { 13 return newChallenge(ChallengeTypeHTTP01, token) 14 } 15 16 // DNSChallenge01 constructs a dns-01 challenge. 17 func DNSChallenge01(token string) Challenge { 18 return newChallenge(ChallengeTypeDNS01, token) 19 } 20 21 // TLSALPNChallenge01 constructs a tls-alpn-01 challenge. 22 func TLSALPNChallenge01(token string) Challenge { 23 return newChallenge(ChallengeTypeTLSALPN01, token) 24 } 25 26 // DNSAccountChallenge01 constructs a dns-account-01 challenge. 27 func DNSAccountChallenge01(token string) Challenge { 28 return newChallenge(ChallengeTypeDNSAccount01, token) 29 }