Remove unused code + handle errors
This commit is contained in:
parent
e797299d64
commit
b820c14c1a
7 changed files with 26 additions and 12 deletions
|
|
@ -527,6 +527,9 @@ func (pm *PmCrypto) BuildKeyRingNoError(binKeys []byte) (kr *KeyRing) {
|
|||
// BuildKeyRingArmored reads armored string and returns keyring
|
||||
func (pm *PmCrypto) BuildKeyRingArmored(key string) (kr *KeyRing, err error) {
|
||||
keyRaw, err := armorUtils.Unarmor(key)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
keyReader := bytes.NewReader(keyRaw)
|
||||
keyEntries, err := openpgp.ReadKeyRing(keyReader)
|
||||
return &KeyRing{entities: keyEntries}, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue