MCPcopy Create free account
hub / github.com/containerd/imgcrypt / GetImageDecryptConverter

Function GetImageDecryptConverter

images/encryption/encryption.go:487–495  ·  view source on GitHub ↗

GetImageDecryptConverter returns a converter function for image decryption

(cc *encconfig.CryptoConfig, lf LayerFilter)

Source from the content-addressed store, hash-verified

485
486// GetImageDecryptConverter returns a converter function for image decryption
487func GetImageDecryptConverter(cc *encconfig.CryptoConfig, lf LayerFilter) converter.ConvertFunc {
488 return func(ctx context.Context, cs content.Store, desc ocispec.Descriptor) (*ocispec.Descriptor, error) {
489 newDesc, _, err := DecryptImage(ctx, cs, desc, cc, lf)
490 if err != nil {
491 return nil, err
492 }
493 return &newDesc, nil
494 }
495}
496
497// CheckAuthorization checks whether a user has the right keys to be allowed to access an image (every layer)
498// It takes decrypting of the layers only as far as decrypting the asymmetrically encrypted data

Callers

nothing calls this directly

Calls 1

DecryptImageFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…