diff options
author | Paul Holzinger <pholzing@redhat.com> | 2022-04-27 12:41:15 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2022-04-27 14:32:36 +0200 |
commit | e9599fb1ae49551c51cd1c8f4cb98ef93231d842 (patch) | |
tree | 85b2880c7e151e9523f2b74ec44b63600753f9db /pkg/api/handlers/libpod/manifests.go | |
parent | 609b52f7266dc057ec356348e54e501225715c4d (diff) | |
download | podman-e9599fb1ae49551c51cd1c8f4cb98ef93231d842.tar.gz podman-e9599fb1ae49551c51cd1c8f4cb98ef93231d842.tar.bz2 podman-e9599fb1ae49551c51cd1c8f4cb98ef93231d842.zip |
fix manifest modify endpoint to respect tlsverify param
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'pkg/api/handlers/libpod/manifests.go')
-rw-r--r-- | pkg/api/handlers/libpod/manifests.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/api/handlers/libpod/manifests.go b/pkg/api/handlers/libpod/manifests.go index 15d4b9f89..8dc7c57d5 100644 --- a/pkg/api/handlers/libpod/manifests.go +++ b/pkg/api/handlers/libpod/manifests.go @@ -7,6 +7,7 @@ import ( "io/ioutil" "net/http" "net/url" + "strconv" "strings" "github.com/containers/image/v5/docker/reference" @@ -372,6 +373,15 @@ func ManifestModify(w http.ResponseWriter, r *http.Request) { return } + if tlsVerify, ok := r.URL.Query()["tlsVerify"]; ok { + tls, err := strconv.ParseBool(tlsVerify[len(tlsVerify)-1]) + if err != nil { + utils.Error(w, http.StatusBadRequest, fmt.Errorf("tlsVerify param is not a bool: %w", err)) + return + } + body.SkipTLSVerify = types.NewOptionalBool(!tls) + } + authconf, authfile, err := auth.GetCredentials(r) if err != nil { utils.Error(w, http.StatusBadRequest, err) |