summaryrefslogtreecommitdiff
path: root/lib/PacketTranscoder.hs
diff options
context:
space:
mode:
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