diff options
author | Miloslav Trmač <mitr@redhat.com> | 2018-12-03 22:15:06 +0100 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2018-12-06 23:34:59 +0100 |
commit | b134951d14512506500a1446c3e5600aa858ea61 (patch) | |
tree | 88be257477d68ff1f9c2f49c4b5f52a250077483 /cmd/podman/push.go | |
parent | b70f8b3884e42b17748f8d503c84b855aa1eda8d (diff) | |
download | podman-b134951d14512506500a1446c3e5600aa858ea61.tar.gz podman-b134951d14512506500a1446c3e5600aa858ea61.tar.bz2 podman-b134951d14512506500a1446c3e5600aa858ea61.zip |
Minimally update for the DockerInsecureSkipTLSVerify type change
Following SystemContext.DockerInsecureSkipTLSVerify, make the
DockerRegistryOne also an OptionalBool, and update callers.
Explicitly document that --tls-verify=true and --tls-verify unset
have different behavior in those commands where the behavior changed
(or where it hasn't changed but the documentation needed updating).
Also make the --tls-verify man page sections a tiny bit more consistent
throughout.
This is a minimal fix, without changing the existing "--tls-verify=true"
paths nor existing manual insecure registry lookups.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'cmd/podman/push.go')
-rw-r--r-- | cmd/podman/push.go | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/cmd/podman/push.go b/cmd/podman/push.go index 331f92cd2..0015373ed 100644 --- a/cmd/podman/push.go +++ b/cmd/podman/push.go @@ -108,7 +108,6 @@ func pushCmd(c *cli.Context) error { } certPath := c.String("cert-dir") - skipVerify := !c.BoolT("tls-verify") removeSignatures := c.Bool("remove-signatures") signBy := c.String("sign-by") @@ -145,16 +144,15 @@ func pushCmd(c *cli.Context) error { } } + dockerRegistryOptions := image.DockerRegistryOptions{ + DockerRegistryCreds: registryCreds, + DockerCertPath: certPath, + } if c.IsSet("tls-verify") { + dockerRegistryOptions.DockerInsecureSkipTLSVerify = types.NewOptionalBool(!c.BoolT("tls-verify")) forceSecure = c.Bool("tls-verify") } - dockerRegistryOptions := image.DockerRegistryOptions{ - DockerRegistryCreds: registryCreds, - DockerCertPath: certPath, - DockerInsecureSkipTLSVerify: skipVerify, - } - so := image.SigningOptions{ RemoveSignatures: removeSignatures, SignBy: signBy, |