Skip to content

Commit

Permalink
fix: validation label as leaf of _acme-challenge
Browse files Browse the repository at this point in the history
  • Loading branch information
sheurich committed Feb 5, 2024
1 parent 177614f commit 2afa9f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions va/va.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,11 @@ func (va VAImpl) validateDNS01(task *vaTask) *core.ValidationRecord {
}

func (va VAImpl) validateDNSACCOUNT01(task *vaTask) *core.ValidationRecord {
const dnsacc01Prefix = "_acme-challenge_"
const dnsacct01Prefix = "_acme-challenge"
hash := sha256.Sum256([]byte(task.AcctURL))
urlhash := strings.ToLower(base32.StdEncoding.EncodeToString(hash[0:10]))
//its 0 to 9th byte include both 0th and 9th so we end 10 here
challengeSubdomain := fmt.Sprintf("%s%s.%s", dnsacc01Prefix, urlhash, task.Identifier.Value)
challengeSubdomain := fmt.Sprintf("_%s.%s.%s", urlhash, dnsacct01Prefix, task.Identifier.Value)

result := &core.ValidationRecord{
URL: challengeSubdomain,
Expand Down

0 comments on commit 2afa9f4

Please sign in to comment.