summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2019-07-06 17:26:54 -0400
committerJoe Crayne <joe@jerkface.net>2019-07-06 17:26:54 -0400
commitb1ae1ecdc9d1f16134ea40b07a6cedcc26a94db8 (patch)
treeb46ce0c50abb65fdff3a80f5f072b9010c05294e /lib
parentea924c53e6ecb2148747353ce34ae7b0ea416d8c (diff)
Quiet down some of the warnings.
Diffstat (limited to 'lib')
-rw-r--r--lib/KeyRing/BuildKeyDB.hs8
-rw-r--r--lib/PacketTranscoder.hs7
-rw-r--r--lib/Transforms.hs13
3 files changed, 17 insertions, 11 deletions
diff --git a/lib/KeyRing/BuildKeyDB.hs b/lib/KeyRing/BuildKeyDB.hs
index dd204d1..9a806a3 100644
--- a/lib/KeyRing/BuildKeyDB.hs
+++ b/lib/KeyRing/BuildKeyDB.hs
@@ -673,7 +673,13 @@ merge_ db filename qs = foldl mergeit db (zip [0..] qs)
673 whatP (a,_) = concat . take 1 . words . show $ a 673 whatP (a,_) = concat . take 1 . words . show $ a
674 674
675 675
676-- insertSubkey :: (MappedPacket -> IO (KikiCondition Packet)) -> t -> KeyData -> [SignatureSubpacket] -> [Char] -> Packet -> IO (KikiCondition (KeyData, [([Char], KikiReportAction)])) 676insertSubkey :: PacketTranscoder
677 -> keykey
678 -> KeyData
679 -> [SignatureSubpacket]
680 -> InputFile
681 -> Packet
682 -> IO (KikiCondition (KeyData, [(FilePath, KikiReportAction)]))
677insertSubkey transcode kk (KeyData top topsigs uids subs) tags inputfile key0 = do 683insertSubkey transcode kk (KeyData top topsigs uids subs) tags inputfile key0 = do
678 let topcipher = symmetric_algorithm $ packet top 684 let topcipher = symmetric_algorithm $ packet top
679 tops2k = s2k $ packet top 685 tops2k = s2k $ packet top
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
diff --git a/lib/Transforms.hs b/lib/Transforms.hs
index 664cf86..adb7830 100644
--- a/lib/Transforms.hs
+++ b/lib/Transforms.hs
@@ -343,17 +343,16 @@ getBindings ::
343 -> 343 ->
344 ( [([Packet],[SignatureOver])] -- other signatures with key sets 344 ( [([Packet],[SignatureOver])] -- other signatures with key sets
345 -- that were used for the verifications 345 -- that were used for the verifications
346 , [(Word8, 346 , [(Word8, -- 1-master, 2-subkey, 0-other(see last element of tuple)
347 (Packet, Packet), -- (topkey,subkey) 347 (Packet, Packet), -- (topkey,subkey)
348 [String], -- usage flags 348 [String], -- usage flags
349 [SignatureSubpacket], -- hashed data 349 [SignatureSubpacket], -- hashed data
350 [Packet])] -- binding signatures 350 [Packet])] -- binding signatures
351 ) 351 )
352getBindings pkts = (sigs,bindings) 352getBindings pkts = (sigs,bindings)
353 where 353 where
354 (sigs,concat->bindings) = unzip $ do 354 (sigs,concat->bindings) = unzip $ do
355 let (keys,_) = partition isKey pkts 355 keys <- disjoint_fp (filter isKey pkts)
356 keys <- disjoint_fp keys
357 let (bs,sigs) = verifyBindings keys pkts 356 let (bs,sigs) = verifyBindings keys pkts
358 return . ((keys,sigs),) $ do 357 return . ((keys,sigs),) $ do
359 b <- bs -- trace ("sigs = "++show (map (map signature_issuer . signatures_over) sigs)) bs 358 b <- bs -- trace ("sigs = "++show (map (map signature_issuer . signatures_over) sigs)) bs
@@ -370,7 +369,7 @@ getBindings pkts = (sigs,bindings)
370 return (code,(topkey b,subkey b), kind, hashed,claimants) 369 return (code,(topkey b,subkey b), kind, hashed,claimants)
371 370
372 371
373-- Returned data is simmilar to getBindings but the Word8 codes 372-- Returned data is similar to getBindings but the Word8 codes
374-- are ORed together. 373-- are ORed together.
375accBindings :: 374accBindings ::
376 Bits t => 375 Bits t =>