From fbe5a9ecb41341b32352e28935dca9faeecb0689 Mon Sep 17 00:00:00 2001 From: Daniel Huigens Date: Fri, 22 Nov 2024 17:22:24 +0100 Subject: [PATCH] Fix armoring private keys --- cmd/armor.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/armor.go b/cmd/armor.go index 6836861..6af249d 100644 --- a/cmd/armor.go +++ b/cmd/armor.go @@ -89,7 +89,11 @@ func armorKeys(input []byte, armorType string) (armored string, err error) { } for _, entity := range entities { - err = entity.Serialize(w) + if entity.PrivateKey != nil { + err = entity.SerializePrivateWithoutSigning(w, &packet.Config{}) + } else { + err = entity.Serialize(w) + } if err != nil { return armored, err }