Skip to content

Commit 0a32657

Browse files
committed
Make --tls-ca optional
The CA can be empty and we should not block if it's not set. Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
1 parent 98761db commit 0a32657

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/crictl/exec.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,9 @@ func tlsConfigFromFlags(ctx *cli.Context) (*rest.TLSClientConfig, error) {
281281
if cfg.CAFile == "" && cfg.CertFile == "" && cfg.KeyFile == "" {
282282
return &rest.TLSClientConfig{Insecure: true}, nil
283283
}
284-
if cfg.CAFile == "" || cfg.CertFile == "" || cfg.KeyFile == "" {
284+
if cfg.CertFile == "" || cfg.KeyFile == "" {
285285
return nil, fmt.Errorf(
286-
"all three flags --%s, --%s and --%s are required for TLS streaming",
286+
"all two flags --%s and --%s are required for TLS streaming, only --%s is optional",
287287
flagTLSCA, flagTLSCert, flagTLSKey,
288288
)
289289
}

0 commit comments

Comments
 (0)