Skip to content

Commit

Permalink
Merge pull request #11714 from vrothberg/save-remove-signatures
Browse files Browse the repository at this point in the history
podman save: enforce signature removal
  • Loading branch information
openshift-merge-robot authored Sep 23, 2021
2 parents 3d34d3a + 01bf8a6 commit b08acdb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion pkg/api/handlers/libpod/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 0 additions & 2 deletions pkg/domain/entities/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
5 changes: 4 additions & 1 deletion pkg/domain/infra/abi/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b08acdb

Please sign in to comment.