From 25c082470e15d684987e9b1e9c855381fbc91e43 Mon Sep 17 00:00:00 2001 From: Shiloh Heurich <1778483+sheurich@users.noreply.github.com> Date: Wed, 13 Mar 2024 15:19:18 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Aaron Gable --- va/va.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/va/va.go b/va/va.go index 748e8f84..f4cffaa3 100644 --- a/va/va.go +++ b/va/va.go @@ -356,8 +356,7 @@ func (va VAImpl) validateDNSAccount01(task *vaTask) *core.ValidationRecord { if task.Wildcard { scope = "wildcard" } - challengeSubdomain := "_" + acctLabel + - "._acme-" + scope + "-challenge." + task.Identifier.Value + challengeSubdomain := fmt.Sprintf("_%s._acme-%s-challenge.%s", acctLabel, scope, task.Identifier.Value) result := &core.ValidationRecord{ URL: challengeSubdomain, @@ -366,12 +365,12 @@ func (va VAImpl) validateDNSAccount01(task *vaTask) *core.ValidationRecord { txts, err := va.getTXTEntry(challengeSubdomain) if err != nil { - result.Error = acme.UnauthorizedProblem(fmt.Sprintf("Error retrieving TXT records for DNS challenge (%q)", err)) + result.Error = acme.UnauthorizedProblem(fmt.Sprintf("Error retrieving TXT records for DNS-ACCOUNT-01 challenge (%q)", err)) return result } if len(txts) == 0 { - msg := "No TXT records found for DNS challenge" + msg := "No TXT records found for DNS-ACCOUNT-01 challenge" result.Error = acme.UnauthorizedProblem(msg) return result } @@ -388,7 +387,7 @@ func (va VAImpl) validateDNSAccount01(task *vaTask) *core.ValidationRecord { } } - msg := "Correct value not found for DNS challenge" + msg := "Correct value not found for DNS-ACCOUNT-01 challenge" result.Error = acme.UnauthorizedProblem(msg) return result }