summaryrefslogtreecommitdiff
path: root/lib/PacketTranscoder.hs
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2019-07-16 20:33:23 -0400
committerAndrew Cady <d@jerkface.net>2019-07-16 20:33:23 -0400
commit8af08303e56fc109135e2ade91299338d03b57b0 (patch)
tree7131b086733c62c610e667638a3f7893b7304618 /lib/PacketTranscoder.hs
parent7a94f5103671011295f818bfcf30280423c44042 (diff)
this compiles
Diffstat (limited to 'lib/PacketTranscoder.hs')
-rw-r--r--lib/PacketTranscoder.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PacketTranscoder.hs b/lib/PacketTranscoder.hs
index 759d83f..b24f3d2 100644
--- a/lib/PacketTranscoder.hs
+++ b/lib/PacketTranscoder.hs
@@ -113,7 +113,7 @@ interpretPassSpec ctx _ PassphraseSpec { passSpecPassFile = fd
113 cachedContents (Just "Enter possibly multi-line passphrase (Press CTRL-D when finished):\n") 113 cachedContents (Just "Enter possibly multi-line passphrase (Press CTRL-D when finished):\n")
114 ctx 114 ctx
115 fd 115 fd
116 let matchkey fp mp = matchpr fp (packet mp) == fp 116 let matchkey fp mp = matchpr fp (packet mp)
117 matchfile file mp = Map.member file (locations mp) 117 matchfile file mp = Map.member file (locations mp)
118 specializers = [ fmap matchkey keyspec, fmap matchfile inputfile] 118 specializers = [ fmap matchkey keyspec, fmap matchfile inputfile]
119 specialize alg mp = 119 specialize alg mp =
@@ -268,7 +268,7 @@ makeMemoizingDecrypter passwdspec ctx (workingkey,keys) = do
268 268
269 trans unkeysRef = transcodeWithCache unkeysRef (foldr (makeTranscoder unkeysRef) (\_ _ -> return BadPassphrase) srcs) 269 trans unkeysRef = transcodeWithCache unkeysRef (foldr (makeTranscoder unkeysRef) (\_ _ -> return BadPassphrase) srcs)
270 270
271keyQueries :: Maybe String -> Map InputFile (StreamInfo,Message) -> (Maybe MappedPacket, Map KeyKey (OriginMapped Query)) 271keyQueries :: Maybe Fingerprint -> Map InputFile (StreamInfo,Message) -> (Maybe MappedPacket, Map KeyKey (OriginMapped Query))
272keyQueries grip ringPackets = (mwk, fmap makeQuery keys) 272keyQueries grip ringPackets = (mwk, fmap makeQuery keys)
273 where 273 where
274 makeQuery (maink,mp,us) = mp { packet = q } 274 makeQuery (maink,mp,us) = mp { packet = q }
@@ -291,8 +291,8 @@ keyQueries grip ringPackets = (mwk, fmap makeQuery keys)
291 mwk = listToMaybe $ do 291 mwk = listToMaybe $ do
292 fp <- maybeToList grip 292 fp <- maybeToList grip
293 let matchfp mp 293 let matchfp mp
294 | not (is_subkey p) && matchpr fp p == fp = Just mp 294 | not (is_subkey p) && matchpr fp p = Just mp
295 | otherwise = Nothing 295 | otherwise = Nothing
296 where p = packet mp 296 where p = packet mp
297 Map.elems $ Map.mapMaybe matchfp $ fmap (\(_,p,_) -> p) $ keys 297 Map.elems $ Map.mapMaybe matchfp $ fmap (\(_,p,_) -> p) $ keys
298 298