diff --git a/vendor/github.com/containers/image/signature/mechanism.go b/vendor/github.com/containers/image/signature/mechanism.go index 196ad927..9b1b47ff 100644 --- a/vendor/github.com/containers/image/signature/mechanism.go +++ b/vendor/github.com/containers/image/signature/mechanism.go @@ -76,6 +76,9 @@ func (m gpgSigningMechanism) ImportKeysFromBytes(blob []byte) ([]string, error) func (m gpgSigningMechanism) Sign(input []byte, keyIdentity string) ([]byte, error) { key, err := m.ctx.GetKey(keyIdentity, true) if err != nil { + if e, ok := err.(gpgme.Error); ok && e.Code() == gpgme.ErrorEOF { + return nil, fmt.Errorf("key %q not found", keyIdentity) + } return nil, err } inputData, err := gpgme.NewDataBytes(input)