Remove empty default tls configuration in ctr

Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
Derek McGowan 2024-04-09 15:40:09 -07:00
parent a68f9b7c56
commit 7c50784591
No known key found for this signature in database
GPG Key ID: F58C5D0A4405ACDB

View File

@ -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
}