Skip to content
Snippets Groups Projects
Commit 521aa080 authored by m.nabokikh's avatar m.nabokikh
Browse files

Fix OpenShift connector rootCA option

parent d87cf1c9
Branches
No related tags found
No related merge requests found
...@@ -227,7 +227,7 @@ func newHTTPClient(insecureCA bool, rootCA string) (*http.Client, error) { ...@@ -227,7 +227,7 @@ func newHTTPClient(insecureCA bool, rootCA string) (*http.Client, error) {
if insecureCA { if insecureCA {
tlsConfig = tls.Config{InsecureSkipVerify: true} tlsConfig = tls.Config{InsecureSkipVerify: true}
} else if rootCA != "" { } else if rootCA != "" {
tlsConfig := tls.Config{RootCAs: x509.NewCertPool()} tlsConfig = tls.Config{RootCAs: x509.NewCertPool()}
rootCABytes, err := ioutil.ReadFile(rootCA) rootCABytes, err := ioutil.ReadFile(rootCA)
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to read root-ca: %v", err) return nil, fmt.Errorf("failed to read root-ca: %v", err)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment