Skip to content

Commit 7c50784

Browse files
committed
Remove empty default tls configuration in ctr
Signed-off-by: Derek McGowan <[email protected]>
1 parent a68f9b7 commit 7c50784

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/ctr/commands/resolver.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ func resolverDefaultTLS(clicontext *cli.Context) (*tls.Config, error) {
149149
config.Certificates = []tls.Certificate{keyPair}
150150
}
151151

152+
// If nothing was set, return nil rather than empty config
153+
if !config.InsecureSkipVerify && config.RootCAs == nil && config.Certificates == nil {
154+
return nil, nil
155+
}
156+
152157
return config, nil
153158
}
154159

0 commit comments

Comments
 (0)