Skip to content

Commit

Permalink
Remove empty default tls configuration in ctr
Browse files Browse the repository at this point in the history
Signed-off-by: Derek McGowan <derek@mcg.dev>
(cherry picked from commit 7c50784)
Signed-off-by: Derek McGowan <derek@mcg.dev>
  • Loading branch information
dmcgowan committed Apr 23, 2024
1 parent 6a99fcc commit aa14890
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/ctr/commands/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ func resolverDefaultTLS(clicontext *cli.Context) (*tls.Config, error) {
config.Certificates = []tls.Certificate{keyPair}
}

// If nothing was set, return nil rather than empty config
if !config.InsecureSkipVerify && config.RootCAs == nil && config.Certificates == nil {
return nil, nil
}

return config, nil
}

Expand Down

0 comments on commit aa14890

Please sign in to comment.