mirror of
https://github.com/project-zot/zot.git
synced 2026-06-19 22:27:58 +08:00
feat(cosign): add support for cosign bundle (#4023)
Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
This commit is contained in:
committed by
GitHub
parent
993a17f5d0
commit
0b2eaa0f9a
@@ -653,7 +653,7 @@ func IsSignature(descriptor ispec.Descriptor) bool {
|
||||
}
|
||||
|
||||
// is cosign signature (OCI 1.1 support)
|
||||
if descriptor.ArtifactType == zcommon.ArtifactTypeCosign {
|
||||
if zcommon.IsArtifactTypeCosign(descriptor.ArtifactType) {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -321,7 +321,7 @@ func (gc GarbageCollect) removeReferrer(repo string, index *ispec.Index, manifes
|
||||
// check if its notation or cosign signature
|
||||
if artifactType == zcommon.ArtifactTypeNotation {
|
||||
signatureType = storage.NotationType
|
||||
} else if artifactType == zcommon.ArtifactTypeCosign {
|
||||
} else if zcommon.IsArtifactTypeCosign(artifactType) {
|
||||
signatureType = storage.CosignType
|
||||
}
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ func CheckIsImageSignature(repoName string, manifestBlob []byte, reference strin
|
||||
}
|
||||
|
||||
// check cosign signature (OCI 1.1 support)
|
||||
if manifestArtifactType == zcommon.ArtifactTypeCosign && manifestContent.Subject != nil {
|
||||
if zcommon.IsArtifactTypeCosign(manifestArtifactType) && manifestContent.Subject != nil {
|
||||
return true, CosignType, manifestContent.Subject.Digest, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user