1
0
Fork 0
mirror of https://github.com/SamTherapy/dnscrypt.git synced 2024-07-02 21:56:06 +00:00

Merge branch 'ameshkov:master' into master

This commit is contained in:
Sam Therapy 2023-05-02 17:59:55 +00:00 committed by GitHub
commit 347916f388
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,7 +79,9 @@ func (c *Client) DialStamp(stamp dnsstamps.ServerStamp) (*ResolverInfo, error) {
if err != nil {
return nil, err
}
resolverInfo.SharedKey = sharedKey
return resolverInfo, nil
}
@ -251,7 +253,10 @@ func (c *Client) fetchCert(stamp dnsstamps.ServerStamp) (cert *Cert, err error)
cert, err = parseCert(stamp, currentCert, providerName, strings.Join(txt.Txt, ""))
if err != nil {
log.Debug("[%s] bad cert: %s", providerName, err)
continue
} else if cert == nil {
// The certificate has been skipped due to Serial or EsVersion.
continue
}
@ -262,7 +267,7 @@ func (c *Client) fetchCert(stamp dnsstamps.ServerStamp) (cert *Cert, err error)
if foundValid {
return currentCert, nil
} else if err == nil {
err = errors.Error("no valid txt records")
err = fmt.Errorf("no valid txt records for provider %q", providerName)
}
return nil, err