From 9bf9242291af9aa325af2bbbfd12419bd168ed51 Mon Sep 17 00:00:00 2001 From: Daniel Huigens Date: Mon, 8 Jul 2024 14:57:05 +0200 Subject: [PATCH] Allow empty key flags subpackets --- openpgp/packet/signature.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openpgp/packet/signature.go b/openpgp/packet/signature.go index 5a71c79e..7fa7ba61 100644 --- a/openpgp/packet/signature.go +++ b/openpgp/packet/signature.go @@ -518,11 +518,10 @@ func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (r } case keyFlagsSubpacket: // Key flags, section 5.2.3.21 + sig.FlagsValid = true if len(subpacket) == 0 { - err = errors.StructuralError("empty key flags subpacket") return } - sig.FlagsValid = true if subpacket[0]&KeyFlagCertify != 0 { sig.FlagCertify = true }