func (s *storageImageSource) GetSignatures(ctx context.Context, instanceDigest *digest.Digest) (signatures [][]byte, err error) {
	if instanceDigest != nil {
		return nil, ErrNoManifestLists
	}
	var offset int
	sigslice := [][]byte{}
	signature := []byte{}
	if len(s.SignatureSizes) > 0 {
		signatureBlob, err := s.imageRef.transport.store.ImageBigData(s.image.ID, "signatures")
		if err != nil {
			return nil, errors.Wrapf(err, "error looking up signatures data for image %q", s.image.ID)
		}
		signature = signatureBlob
	}
	for _, length := range s.SignatureSizes {
		sigslice = append(sigslice, signature[offset:offset+length])
		offset += length
	}
	if offset != len(signature) {
		return nil, errors.Errorf("signatures data contained %d extra bytes", len(signatures)-offset)
	}
	return sigslice, nil
}
func (s *storageImageSource) GetSignatures(ctx context.Context, instanceDigest *digest.Digest) (signatures [][]byte, err error) {
	if instanceDigest != nil {
		return nil, ErrNoManifestLists
	}
	var offset int
	sigslice := [][]byte{}
	signature := []byte{}
	if len(s.SignatureSizes) > 0 {
		signatureBlob, err := s.imageRef.transport.store.ImageBigData(s.image.ID, "signatures")
		if err != nil {
			return nil, errors.Wrapf(err, "error looking up signatures data for image %q", s.image.ID)
		}
		signature = signatureBlob
	}
	for _, length := range s.SignatureSizes {
		sigslice = append(sigslice, signature[offset:offset+length])
		offset += length
	}
	if offset != len(signature) {
		return nil, errors.Errorf("signatures data contained %d extra bytes", len(signatures)-offset)
	}
	return sigslice, nil
}
func ( s * storageImageSource ) GetSignatures ( ctx context . Context , instanceDigest * digest . Digest ) ( signatures [ ] [ ] byte , err error ) { if instanceDigest != nil { return nil , ErrNoManifestLists } var offset int sigslice := [ ] [ ] byte { } signature := [ ] byte { } if len ( s . SignatureSizes ) > 0 { signatureBlob , err := s . imageRef . transport . store . ImageBigData ( s . image . ID , " " ) if err != nil { return nil , errors . Wrapf ( err , " " , s . image . ID ) } signature = signatureBlob } for _ , length := range s . SignatureSizes { sigslice = append ( sigslice , signature [ offset : offset + length ] ) offset += length } if offset != len ( signature ) { return nil , errors . Errorf ( " " , len ( signatures ) - offset ) } return sigslice , nil }
// GetSignatures() parses the image's signatures blob into a slice of byte slices.
GetSignatures () parses the image s signatures blob into a slice of byte slices .