Skip to content

Commit 514da4b

Browse files
authored
Merge pull request #194 from mtrmac/gpg-key-not-found-cleanup
Revert "provide better error when key not found"
2 parents 4c9e93e + 3d6e3e9 commit 514da4b

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

signature/mechanism.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"fmt"
88

99
"github.com/mtrmac/gpgme"
10-
"github.com/pkg/errors"
1110
)
1211

1312
// SigningMechanism abstracts a way to sign binary blobs and verify their signatures.
@@ -77,9 +76,6 @@ func (m gpgSigningMechanism) ImportKeysFromBytes(blob []byte) ([]string, error)
7776
func (m gpgSigningMechanism) Sign(input []byte, keyIdentity string) ([]byte, error) {
7877
key, err := m.ctx.GetKey(keyIdentity, true)
7978
if err != nil {
80-
if e, ok := err.(gpgme.Error); ok && e.Code() == gpgme.ErrorEOF {
81-
return nil, errors.Errorf("key %q not found", keyIdentity)
82-
}
8379
return nil, err
8480
}
8581
inputData, err := gpgme.NewDataBytes(input)

0 commit comments

Comments
 (0)