Ensure DecryptSessionKey returns an error for a missing key packet (#245)
This commit is contained in:
parent
cf8b8d4a80
commit
ca02a218b8
1 changed files with 5 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue