diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-09-23 09:38:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-23 09:38:25 -0400 |
commit | b08acdbc6bfc599c8d9db7f7c8fe24b5d11b64b3 (patch) | |
tree | 493283039d06b0518153ca5e618060dd99cfe063 /pkg | |
parent | 3d34d3a186a782e48bdbd1245a7e067db850d9b0 (diff) | |
parent | 01bf8a66872df7dc6f93b7156371fa8fce3d84df (diff) | |
download | podman-b08acdbc6bfc599c8d9db7f7c8fe24b5d11b64b3.tar.gz podman-b08acdbc6bfc599c8d9db7f7c8fe24b5d11b64b3.tar.bz2 podman-b08acdbc6bfc599c8d9db7f7c8fe24b5d11b64b3.zip |
Merge pull request #11714 from vrothberg/save-remove-signatures
podman save: enforce signature removal
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/api/handlers/libpod/images.go | 1 | ||||
-rw-r--r-- | pkg/domain/entities/images.go | 2 | ||||
-rw-r--r-- | pkg/domain/infra/abi/images.go | 5 |
3 files changed, 4 insertions, 4 deletions
diff --git a/pkg/api/handlers/libpod/images.go b/pkg/api/handlers/libpod/images.go index 51157d204..0023479ea 100644 --- a/pkg/api/handlers/libpod/images.go +++ b/pkg/api/handlers/libpod/images.go @@ -359,7 +359,6 @@ func ExportImages(w http.ResponseWriter, r *http.Request) { MultiImageArchive: len(query.References) > 1, OciAcceptUncompressedLayers: query.OciAcceptUncompressedLayers, Output: output, - RemoveSignatures: true, } imageEngine := abi.ImageEngine{Libpod: runtime} diff --git a/pkg/domain/entities/images.go b/pkg/domain/entities/images.go index edd23e662..80d570764 100644 --- a/pkg/domain/entities/images.go +++ b/pkg/domain/entities/images.go @@ -305,8 +305,6 @@ type ImageSaveOptions struct { OciAcceptUncompressedLayers bool // Output - write image to the specified path. Output string - // Do not save the signature from the source image - RemoveSignatures bool // Quiet - suppress output when copying images Quiet bool } diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go index 705ad7768..98d668434 100644 --- a/pkg/domain/infra/abi/images.go +++ b/pkg/domain/infra/abi/images.go @@ -368,7 +368,10 @@ func (ir *ImageEngine) Save(ctx context.Context, nameOrID string, tags []string, saveOptions := &libimage.SaveOptions{} saveOptions.DirForceCompress = options.Compress saveOptions.OciAcceptUncompressedLayers = options.OciAcceptUncompressedLayers - saveOptions.RemoveSignatures = options.RemoveSignatures + + // Force signature removal to preserve backwards compat. + // See https://github.com/containers/podman/pull/11669#issuecomment-925250264 + saveOptions.RemoveSignatures = true if !options.Quiet { saveOptions.Writer = os.Stderr |