From 889aadea2d5cf18cd96ef07e6f76fd0a54fc1e67 Mon Sep 17 00:00:00 2001 From: joe Date: Fri, 29 Apr 2016 04:41:47 -0400 Subject: fixed redundant bitflags packets. --- lib/KeyRing.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/KeyRing.hs b/lib/KeyRing.hs index fc21122..9c734fc 100644 --- a/lib/KeyRing.hs +++ b/lib/KeyRing.hs @@ -3121,7 +3121,9 @@ makeSig doDecrypt top fname subkey_p tags mbsig = do let mp' = mappedPacket fname new_sig return $ KikiSuccess (mp', Map.empty) parsedkey = [packet subkey_p] - hashed0 = KeyFlagsPacket + hashed0 | any isFlagsPacket tags = tags + | otherwise + = KeyFlagsPacket { certify_keys = False , sign_data = False , encrypt_communication = False @@ -3132,6 +3134,8 @@ makeSig doDecrypt top fname subkey_p tags mbsig = do : tags -- implicitly added: -- , SignatureCreationTimePacket (fromIntegral timestamp) + isFlagsPacket (KeyFlagsPacket {}) = True + isFlagsPacket _ = False subgrip = fingerprint (head parsedkey) back_sig <- pgpSign (Message parsedkey) -- cgit v1.2.3