forked from TrueCloudLab/certificates
Add CNAME chasing for TXT records
This commit is contained in:
parent
7b45968198
commit
d25b8afe68
1 changed files with 6 additions and 1 deletions
|
@ -72,7 +72,12 @@ func (c *client) Get(url string) (*http.Response, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *client) LookupTxt(name string) ([]string, error) {
|
func (c *client) LookupTxt(name string) ([]string, error) {
|
||||||
return net.LookupTXT(name)
|
// chase CNAME records, if any
|
||||||
|
cname, err := net.LookupCNAME(name)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return net.LookupTXT(cname)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *client) TLSDial(network, addr string, config *tls.Config) (*tls.Conn, error) {
|
func (c *client) TLSDial(network, addr string, config *tls.Config) (*tls.Conn, error) {
|
||||||
|
|
Loading…
Reference in a new issue