Skip to content

Commit

Permalink
Add hostname to TLS config for SNI support (#4747)
Browse files Browse the repository at this point in the history
  • Loading branch information
onurguzel authored and danielnelson committed Sep 27, 2018
1 parent a086ea6 commit a21524c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/inputs/x509_cert/x509_cert.go
Expand Up @@ -80,6 +80,7 @@ func (c *X509Cert) getCert(location string, timeout time.Duration) ([]*x509.Cert
}
defer ipConn.Close()

tlsCfg.ServerName = u.Host
conn := tls.Client(ipConn, tlsCfg)
defer conn.Close()

Expand Down

0 comments on commit a21524c

Please sign in to comment.