mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
refactor: move /pkg/meta/signatures under /pkg/extensions/imagetrust (#1712)
- the size of the binary-minimal becomes 32MB - "signatures" package is renamed into "imagetrust" and moved under extensions - if the binary is not built using "imagetrust" tag then the signatures verification will not be performed Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com>
This commit is contained in:
+3
-4
@@ -11,7 +11,6 @@ import (
|
||||
zerr "zotregistry.io/zot/errors"
|
||||
zcommon "zotregistry.io/zot/pkg/common"
|
||||
"zotregistry.io/zot/pkg/log"
|
||||
"zotregistry.io/zot/pkg/meta/signatures"
|
||||
mTypes "zotregistry.io/zot/pkg/meta/types"
|
||||
"zotregistry.io/zot/pkg/storage"
|
||||
storageTypes "zotregistry.io/zot/pkg/storage/types"
|
||||
@@ -225,9 +224,9 @@ func GetSignatureLayersInfo(repo, tag, manifestDigest, signatureType string, man
|
||||
imageStore storageTypes.ImageStore, log log.Logger,
|
||||
) ([]mTypes.LayerInfo, error) {
|
||||
switch signatureType {
|
||||
case signatures.CosignSignature:
|
||||
case zcommon.CosignSignature:
|
||||
return getCosignSignatureLayersInfo(repo, tag, manifestDigest, manifestBlob, imageStore, log)
|
||||
case signatures.NotationSignature:
|
||||
case zcommon.NotationSignature:
|
||||
return getNotationSignatureLayersInfo(repo, manifestDigest, manifestBlob, imageStore, log)
|
||||
default:
|
||||
return []mTypes.LayerInfo{}, nil
|
||||
@@ -256,7 +255,7 @@ func getCosignSignatureLayersInfo(
|
||||
return layers, err
|
||||
}
|
||||
|
||||
layerSigKey, ok := layer.Annotations[signatures.CosignSigKey]
|
||||
layerSigKey, ok := layer.Annotations[zcommon.CosignSigKey]
|
||||
if !ok {
|
||||
log.Error().Err(err).Str("repository", repo).Str("reference", tag).Str("layerDigest", layer.Digest.String()).Msg(
|
||||
"load-repo: unable to get specific annotation of cosign signature")
|
||||
|
||||
Reference in New Issue
Block a user