use cname instead of resove it for wkd

This commit is contained in:
Jon Lundy 2020-12-03 13:40:39 -07:00
parent b8be51799c
commit 9db6377526
Signed by untrusted user who does not match committer: xuu
GPG Key ID: C63E6D61F3035024

View File

@ -254,9 +254,10 @@ func (app *wkdApp) replaceLink(src, link string) error {
} }
func getWKDDomain(ctx context.Context, domain string) (string, bool) { 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 { if err == nil {
return strings.Trim(cname, "."), true return adv, true
} }
return domain, false return domain, false
} }