Skip to content

Commit

Permalink
set transport to skip verify if se skip flag passed (#4102) (#4105)
Browse files Browse the repository at this point in the history
  • Loading branch information
briandowns authored Oct 7, 2021
1 parent 9cb5fb5 commit 2e9c9e8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/etcd/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,18 @@ type s3 struct {
// a new Minio client.
func newS3(ctx context.Context, config *config.Control) (*s3, error) {
tr := http.DefaultTransport
if config.EtcdS3EndpointCA != "" {

switch {
case config.EtcdS3EndpointCA != "":
trCA, err := setTransportCA(tr, config.EtcdS3EndpointCA, config.EtcdS3SkipSSLVerify)
if err != nil {
return nil, err
}
tr = trCA
case config.EtcdS3 && config.EtcdS3SkipSSLVerify:
tr.(*http.Transport).TLSClientConfig = &tls.Config{
InsecureSkipVerify: config.EtcdS3SkipSSLVerify,
}
}

var creds *credentials.Credentials
Expand Down

0 comments on commit 2e9c9e8

Please sign in to comment.