Fix various keys issues (#117)
* Fix armouring headers for public keys * Fix error for session key decryption failure
This commit is contained in:
parent
27efcb4627
commit
ff54225384
7 changed files with 75 additions and 6 deletions
|
|
@ -55,15 +55,15 @@ Loop:
|
|||
}
|
||||
|
||||
if !hasPacket {
|
||||
return nil, errors.Wrap(err, "gopenpgp: couldn't find a session key packet that could be decrypted")
|
||||
return nil, errors.Wrap(err, "gopenpgp: couldn't find a session key packet")
|
||||
}
|
||||
|
||||
if decryptErr != nil {
|
||||
return nil, errors.Wrap(decryptErr, "gopenpgp: error in decrypting")
|
||||
}
|
||||
|
||||
if ek == nil {
|
||||
return nil, errors.New("gopenpgp: unable to decrypt session key")
|
||||
if ek == nil || ek.Key == nil {
|
||||
return nil, errors.New("gopenpgp: unable to decrypt session key: no valid decryption key")
|
||||
}
|
||||
|
||||
return newSessionKeyFromEncrypted(ek)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue