diff --git a/crypto/keyring_session.go b/crypto/keyring_session.go index ca2a94f9..638c1f78 100644 --- a/crypto/keyring_session.go +++ b/crypto/keyring_session.go @@ -55,7 +55,11 @@ Loop: } if !hasPacket { - return nil, errors.Wrap(err, "gopenpgp: couldn't find a session key packet") + if err != nil { + return nil, errors.Wrap(err, "gopenpgp: couldn't find a session key packet") + } else { + return nil, errors.New("gopenpgp: couldn't find a session key packet") + } } if decryptErr != nil {