Merge pull request #1694 from flant/fix-openshift-root-ca
Fix OpenShift connector rootCA option
This commit is contained in:
commit
709d4169d6
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Reference in a new issue