summaryrefslogtreecommitdiff
path: root/Data/OpenPGP/Util/Verify.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Data/OpenPGP/Util/Verify.hs')
-rw-r--r--Data/OpenPGP/Util/Verify.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Data/OpenPGP/Util/Verify.hs b/Data/OpenPGP/Util/Verify.hs
index 66db2ab..52e9005 100644
--- a/Data/OpenPGP/Util/Verify.hs
+++ b/Data/OpenPGP/Util/Verify.hs
@@ -46,7 +46,7 @@ verify keys over =
46 over {OpenPGP.signatures_over = mapMaybe (uncurry $ verifyOne keys) sigs} 46 over {OpenPGP.signatures_over = mapMaybe (uncurry $ verifyOne keys) sigs}
47 where 47 where
48 sigs :: [(OpenPGP.Packet,BS.ByteString)] 48 sigs :: [(OpenPGP.Packet,BS.ByteString)]
49 sigs = map (\s -> (s, toStrictBS $ encode over `LZ.append` OpenPGP.trailer s)) 49 sigs = map (\s -> (s, LZ.toStrict $ encode over `LZ.append` OpenPGP.trailer s))
50 (OpenPGP.signatures_over over) 50 (OpenPGP.signatures_over over)
51 51
52verifyOne :: OpenPGP.Message -> OpenPGP.Packet -> BS.ByteString -> Maybe OpenPGP.Packet 52verifyOne :: OpenPGP.Message -> OpenPGP.Packet -> BS.ByteString -> Maybe OpenPGP.Packet
@@ -93,7 +93,7 @@ verifyOne keys sig over = fmap (const sig) $ maybeKey >>= verification >>= guard
93#else 93#else
94 rsaVerify k = Just $ Vincent.RSA.verify desc (rsaKey k) over rsaSig 94 rsaVerify k = Just $ Vincent.RSA.verify desc (rsaKey k) over rsaSig
95#endif 95#endif
96 [rsaSig] = map (toStrictBS . LZ.drop 2 . encode) (OpenPGP.signature sig) 96 [rsaSig] = map (LZ.toStrict . LZ.drop 2 . encode) (OpenPGP.signature sig)
97 dsaSig = let [OpenPGP.MPI r, OpenPGP.MPI s] = OpenPGP.signature sig in 97 dsaSig = let [OpenPGP.MPI r, OpenPGP.MPI s] = OpenPGP.signature sig in
98 Vincent.DSA.Signature r s 98 Vincent.DSA.Signature r s
99 ecdsaSig = let [OpenPGP.MPI r, OpenPGP.MPI s] = OpenPGP.signature sig in 99 ecdsaSig = let [OpenPGP.MPI r, OpenPGP.MPI s] = OpenPGP.signature sig in