Skip to content

Commit

Permalink
Add hostname to TLS config for SNI support (influxdata#4747)
Browse files Browse the repository at this point in the history
  • Loading branch information
onurguzel authored and otherpirate committed Mar 15, 2019
1 parent be29336 commit d2f9413
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/inputs/x509_cert/x509_cert.go
Original file line number Diff line number Diff line change
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 d2f9413

Please sign in to comment.