@@ -39,7 +39,6 @@ func (e ImageNotFoundError) Error() string {
3939type ociImageSource struct {
4040 impl.Compat
4141 impl.PropertyMethodsInitialize
42- impl.NoSignatures
4342 impl.DoesNotAffectLayerInfosForCopy
4443 stubs.NoGetBlobAtInitialize
4544
@@ -238,9 +237,6 @@ func GetLocalBlobPath(ctx context.Context, src types.ImageSource, digest digest.
238237
239238func (s * ociImageSource ) GetSignaturesWithFormat (ctx context.Context , instanceDigest * digest.Digest ) ([]signature.Signature , error ) {
240239 if instanceDigest == nil {
241- if s .descriptor .Digest == "" {
242- return nil , errors .New ("unknown manifest digest, can't get signatures" )
243- }
244240 instanceDigest = & s .descriptor .Digest
245241 }
246242
@@ -255,6 +251,8 @@ func (s *ociImageSource) GetSignaturesWithFormat(ctx context.Context, instanceDi
255251
256252 signatures := make ([]signature.Signature , 0 , len (ociManifest .Layers ))
257253 for _ , layer := range ociManifest .Layers {
254+ // Note that this copies all kinds of attachments: attestations, and whatever else is there,
255+ // not just signatures. We leave the signature consumers to decide based on the MIME type.
258256 payload , err := s .ref .getOCIDescriptorContents (layer .Digest , iolimits .MaxSignatureBodySize , s .sharedBlobDir )
259257 if err != nil {
260258 return nil , err
0 commit comments