func NewTLSConfig(certPool *x509.CertPool) *tls.Config {
	tlsConfig := jujuhttp.SecureTLSConfig()
	if certPool != nil {
		// We want to be specific here (rather than just using "anything").
		// See commit 7fc118f015d8480dfad7831788e4b8c0432205e8 (PR 899).
		tlsConfig.RootCAs = certPool
		tlsConfig.ServerName = "juju-apiserver"
	}
	return tlsConfig
}
// NewTLSConfig returns a new *tls.Config suitable for connecting to a Juju
// API server. If certPool is non-nil, we use it as the config's RootCAs,
// and the server name is set to "juju-apiserver".
NewTLSConfig returns a new *tls.Config suitable for connecting to a Juju
API server. If certPool is non-nil, we use it as the config's RootCAs,
and the server name is set to "juju-apiserver".
// NewTLSConfig returns a new * tls . Config suitable for connecting to a Juju // API server . If certPool is non - nil we use it as the config ' s RootCAs // and the server name is set to " juju - apiserver " .
func NewTLSConfig(certPool *x509.CertPool) *tls.Config {
	tlsConfig := jujuhttp.SecureTLSConfig()
	if certPool != nil {
		tlsConfig.RootCAs = certPool
		tlsConfig.ServerName = "juju-apiserver"
	}
	return tlsConfig
}
func NewTLSConfig ( certPool * x509 . CertPool ) * tls . Config { tlsConfig := jujuhttp . SecureTLSConfig ( ) if certPool != nil { tlsConfig . RootCAs = certPool tlsConfig . ServerName = " " } return tlsConfig }
NewTLSConfig returns a new *tls.Config suitable for connecting to a Juju
API server.
NewTLSConfig returns a new * tls . Config suitable for connecting to a Juju API server .
// We want to be specific here (rather than just using "anything"). // See commit 7fc118f015d8480dfad7831788e4b8c0432205e8 (PR 899).