Copy TLSConfig verification flags in server create

This commit is contained in:
Pete Wildsmith 2017-04-25 23:33:12 +01:00 committed by GitHub
parent 56b122c501
commit 3070d5ab9d

View file

@ -65,8 +65,8 @@ func NewHTTPServer(agent *Agent, config *Config) (*HTTPServer, error) {
// If TLS is enabled, wrap the listener with a TLS listener
if config.TLSConfig.EnableHTTP {
tlsConf := &tlsutil.Config{
VerifyIncoming: false,
VerifyOutgoing: true,
VerifyIncoming: config.TLSConfig.VerifyIncoming,
VerifyOutgoing: config.TLSConfig.VerifyOutgoing,
VerifyServerHostname: config.TLSConfig.VerifyServerHostname,
CAFile: config.TLSConfig.CAFile,
CertFile: config.TLSConfig.CertFile,