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
|
|
@ -200,7 +200,11 @@ func (key *Key) Armor() (string, error) {
|
|||
return "", err
|
||||
}
|
||||
|
||||
return armor.ArmorWithType(serialized, constants.PrivateKeyHeader)
|
||||
if key.IsPrivate() {
|
||||
return armor.ArmorWithType(serialized, constants.PrivateKeyHeader)
|
||||
}
|
||||
|
||||
return armor.ArmorWithType(serialized, constants.PublicKeyHeader)
|
||||
}
|
||||
|
||||
// ArmorWithCustomHeaders returns the armored key as a string, with
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue