From 9db637752607bcd199a0caa46d53e45f1f016329 Mon Sep 17 00:00:00 2001 From: Jon Lundy Date: Thu, 3 Dec 2020 13:40:39 -0700 Subject: [PATCH] use cname instead of resove it for wkd --- pkg/keyproofs/routes-wkd.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/keyproofs/routes-wkd.go b/pkg/keyproofs/routes-wkd.go index f05d086..e06ba67 100644 --- a/pkg/keyproofs/routes-wkd.go +++ b/pkg/keyproofs/routes-wkd.go @@ -254,9 +254,10 @@ func (app *wkdApp) replaceLink(src, link string) error { } func getWKDDomain(ctx context.Context, domain string) (string, bool) { - cname, err := net.DefaultResolver.LookupCNAME(ctx, "openpgpkey."+domain) + adv := "openpgpkey." + domain + _, err := net.DefaultResolver.LookupCNAME(ctx, adv) if err == nil { - return strings.Trim(cname, "."), true + return adv, true } return domain, false }