diff --git a/pkg/etcd/s3.go b/pkg/etcd/s3.go index 7662e1766a..ff89d32464 100644 --- a/pkg/etcd/s3.go +++ b/pkg/etcd/s3.go @@ -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