From 71075999e9c7cbcb16220c47c750e859d3ccc7e2 Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Mon, 18 May 2020 16:48:40 -0400 Subject: Eq/Ord instances for Fingerprint + defaultFeatures packet. --- Data/OpenPGP/Util/DecryptSecretKey.hs | 2 +- Data/OpenPGP/Util/Fingerprint.hs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'Data/OpenPGP/Util') diff --git a/Data/OpenPGP/Util/DecryptSecretKey.hs b/Data/OpenPGP/Util/DecryptSecretKey.hs index 9f9e42a..753cef3 100644 --- a/Data/OpenPGP/Util/DecryptSecretKey.hs +++ b/Data/OpenPGP/Util/DecryptSecretKey.hs @@ -76,7 +76,7 @@ decryptSecretKey pass k@(OpenPGP.SecretKeyPacket { OpenPGP.version = 4, OpenPGP.key_algorithm = kalgo, OpenPGP.s2k = s2k, OpenPGP.symmetric_algorithm = salgo, OpenPGP.key = existing, OpenPGP.encrypted_data = encd - }) | chkF material == LZ.toStrict chk = + }) | chkF material == LZ.toStrict chk = -- TODO: v5 fmap (\m -> k { OpenPGP.s2k_useage = 0, OpenPGP.symmetric_algorithm = OpenPGP.Unencrypted, diff --git a/Data/OpenPGP/Util/Fingerprint.hs b/Data/OpenPGP/Util/Fingerprint.hs index 955748d..422beac 100644 --- a/Data/OpenPGP/Util/Fingerprint.hs +++ b/Data/OpenPGP/Util/Fingerprint.hs @@ -23,6 +23,7 @@ oo :: (b -> c) -> (a -> a1 -> b) -> a -> a1 -> c oo = (.) . (.) newtype Fingerprint = Fingerprint BS.ByteString + deriving (Eq,Ord) instance Show Fingerprint where show fp = hex fp -- cgit v1.2.3