Skip to content

Commit

Permalink
default tls is off
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic committed May 26, 2023
1 parent d64b3a4 commit b9fb4c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ocis-pkg/service/grpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ func Configure(opts ...ClientOption) error {
tlsConfig.RootCAs = certs
}
cOpts = append(cOpts, mgrpcc.AuthTLS(tlsConfig))
//case "off":
//default:
}

defaultClient = mgrpcc.NewClient(cOpts...)
Expand Down Expand Up @@ -133,7 +135,7 @@ func NewClient(opts ...ClientOption) (client.Client, error) {
InsecureSkipVerify: true,
}
cOpts = append(cOpts, mgrpcc.AuthTLS(tlsConfig))
default:
case "on":
tlsConfig = &tls.Config{}
// Note: If caCert is empty we use the system's default set of trusted CAs
if options.caCert != "" {
Expand All @@ -148,6 +150,8 @@ func NewClient(opts ...ClientOption) (client.Client, error) {
tlsConfig.RootCAs = certs
}
cOpts = append(cOpts, mgrpcc.AuthTLS(tlsConfig))
//case "off":
//default:
}

return mgrpcc.NewClient(cOpts...), nil
Expand Down

0 comments on commit b9fb4c3

Please sign in to comment.