From b7d80ebb106b8ddd6f68d27ccde8c11068050936 Mon Sep 17 00:00:00 2001 From: Martin Weindel Date: Tue, 22 Nov 2022 09:59:54 +0100 Subject: [PATCH] make certPool public field of TransportConfig --- connector.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/connector.go b/connector.go index 3a411651..8ed0862c 100644 --- a/connector.go +++ b/connector.go @@ -35,7 +35,7 @@ type HostConfig struct { type TransportConfig struct { SslVerify bool - certPool *x509.CertPool + CertPool *x509.CertPool HttpRequestTimeout time.Duration // in seconds HttpPoolConnections int ProxyUrl *url.URL @@ -58,7 +58,7 @@ func NewTransportConfig(sslVerify string, httpRequestTimeout int, httpPoolConnec err = fmt.Errorf("cannot append certificate from file '%s'", sslVerify) return } - cfg.certPool = caPool + cfg.CertPool = caPool cfg.SslVerify = true } @@ -155,7 +155,7 @@ func (whr *WapiHttpRequestor) Init(authCfg AuthConfig, trCfg TransportConfig) { tr := &http.Transport{ TLSClientConfig: &tls.Config{ - RootCAs: trCfg.certPool, + RootCAs: trCfg.CertPool, ClientAuth: clientAuthType, Certificates: certList, InsecureSkipVerify: !trCfg.SslVerify,