summaryrefslogtreecommitdiff
path: root/lib/PacketTranscoder.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PacketTranscoder.hs')
-rw-r--r--lib/PacketTranscoder.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/PacketTranscoder.hs b/lib/PacketTranscoder.hs
index 830ec2f..730a221 100644
--- a/lib/PacketTranscoder.hs
+++ b/lib/PacketTranscoder.hs
@@ -106,9 +106,9 @@ interpretPassSpec :: InputFileContext
106 -> (Maybe MappedPacket, Map.Map KeyKey (OriginMapped Query)) 106 -> (Maybe MappedPacket, Map.Map KeyKey (OriginMapped Query))
107 -> PassphraseSpec 107 -> PassphraseSpec
108 -> IO (KikiCondition (PassphraseSource, IO ()) ) 108 -> IO (KikiCondition (PassphraseSource, IO ()) )
109interpretPassSpec ctx keys PassphraseSpec { passSpecPassFile = fd 109interpretPassSpec ctx _ PassphraseSpec { passSpecPassFile = fd
110 , passSpecKeySpec = keyspec 110 , passSpecKeySpec = keyspec
111 , passSpecRingFile = inputfile } = do 111 , passSpecRingFile = inputfile } = do
112 getpw <- 112 getpw <-
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
@@ -241,6 +241,7 @@ transcodeWithCache unkeysRef miss alg0 mp@MappedPacket{ packet = wk } = do
241 else maybe (miss alg mp) (return . KikiSuccess) 241 else maybe (miss alg mp) (return . KikiSuccess)
242 $ Map.lookup (keykey wk,fst alg, snd alg) unkeys 242 $ Map.lookup (keykey wk,fst alg, snd alg) unkeys
243 243
244tryInOrder :: [PacketTranscoder] -> PacketTranscoder
244tryInOrder [] _ _ = return BadPassphrase 245tryInOrder [] _ _ = return BadPassphrase
245tryInOrder [f] alg mp = f alg mp 246tryInOrder [f] alg mp = f alg mp
246tryInOrder (f:fs) alg mp = do 247tryInOrder (f:fs) alg mp = do