Skip to content

Commit 48afd14

Browse files
author
Malte Münch
committed
Removes image checksum annotation in manifest element
Signed-off-by: Malte Münch <muench@b1-systems.de>
1 parent 62c6570 commit 48afd14

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/python_gardenlinux_lib/oras/registry.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,9 +497,7 @@ def verify_manifest_signature(self, manifest: dict):
497497
if annotation_signed_string_key not in layer["annotations"]:
498498
raise ValueError(f"layer is not signed. layer: {layer}")
499499
media_type = layer["mediaType"]
500-
checksum_sha256 = layer["annotations"][
501-
"application/vnd.gardenlinux.image.checksum.sha256"
502-
]
500+
checksum_sha256 = layer["digest"].removeprefix("sha256:")
503501
signature = layer["annotations"][annotation_signature_key]
504502
signed_data = layer["annotations"][annotation_signed_string_key]
505503
signed_data_expected = construct_layer_signed_data_string(
@@ -695,7 +693,6 @@ def create_layer(
695693
layer = oras.oci.NewLayer(file_path, media_type, is_dir=False)
696694
layer["annotations"] = {
697695
oras.defaults.annotation_title: os.path.basename(file_path),
698-
"application/vnd.gardenlinux.image.checksum.sha256": checksum_sha256,
699696
}
700697
self.sign_layer(
701698
layer, cname, version, architecture, checksum_sha256, media_type

0 commit comments

Comments
 (0)