Skip to content

Commit

Permalink
easier way to skip this
Browse files Browse the repository at this point in the history
Signed-off-by: Min Min <[email protected]>
  • Loading branch information
jamsman94 committed Apr 19, 2022
1 parent 09aca71 commit 8b87e26
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package registry
import (
"context"
"crypto/tls"
"crypto/x509"
"encoding/json"
"fmt"
"net"
Expand Down Expand Up @@ -125,11 +124,7 @@ func (s *v2RegistryService) createClient(ep Endpoint, logger *zap.SugaredLogger)

tlsConfig := &tls.Config{}

if s.EnableHTTPS && s.CustomCert != "" {
caCertPool := x509.NewCertPool()
caCertPool.AppendCertsFromPEM([]byte(s.CustomCert))
tlsConfig.RootCAs = caCertPool
} else if !s.EnableHTTPS {
if (s.EnableHTTPS && s.CustomCert != "") || !s.EnableHTTPS {
tlsConfig.InsecureSkipVerify = true
}

Expand Down

0 comments on commit 8b87e26

Please sign in to comment.