Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make certPool public field of TransportConfig #195

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

Expand Down Expand Up @@ -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,
Expand Down