summaryrefslogtreecommitdiff
path: root/KeyRing.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2014-05-11 17:07:45 -0400
committerjoe <joe@jerkface.net>2014-05-11 17:07:45 -0400
commit25c5eca6053af9c9c89d735ae795b603212fb1f0 (patch)
tree60e5831f9fec6323ec34e2be5d385393539c393d /KeyRing.hs
parent0b0c24da3fc2389dbf92f2b105b588763916971e (diff)
updated documentation to findTag to reflect that the supplied master
key need not be the "current working key".
Diffstat (limited to 'KeyRing.hs')
-rw-r--r--KeyRing.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/KeyRing.hs b/KeyRing.hs
index 8717e03..68ec843 100644
--- a/KeyRing.hs
+++ b/KeyRing.hs
@@ -2551,12 +2551,12 @@ splitAtMinBy comp xs = minimumBy comp' xxs
2551 2551
2552 2552
2553 2553
2554-- | Given list of subpackets, the working master key, one of its subkeys and a 2554-- | Given list of subpackets, a master key, one of its subkeys and a
2555-- list of signatures on that subkey, yields: 2555-- list of signatures on that subkey, yields:
2556-- 2556--
2557-- * preceding list of signatures 2557-- * preceding list of signatures
2558-- 2558--
2559-- * The most recent valid signature made by the working key along with a 2559-- * The most recent valid signature made by the master key along with a
2560-- flag that indicates whether or not all of the supplied subpackets occur in 2560-- flag that indicates whether or not all of the supplied subpackets occur in
2561-- it or, if no valid signature from the working key is present, Nothing. 2561-- it or, if no valid signature from the working key is present, Nothing.
2562-- 2562--
@@ -2570,19 +2570,19 @@ findTag ::
2570 -> ([(MappedPacket, b)], 2570 -> ([(MappedPacket, b)],
2571 Maybe (Bool, (MappedPacket, b)), 2571 Maybe (Bool, (MappedPacket, b)),
2572 [(MappedPacket, b)]) 2572 [(MappedPacket, b)])
2573findTag tag wk subkey subsigs = (xs',minsig,ys') 2573findTag tag topk subkey subsigs = (xs',minsig,ys')
2574 where 2574 where
2575 vs = map (\sig -> 2575 vs = map (\sig ->
2576 (sig, do 2576 (sig, do
2577 sig <- Just (packet . fst $ sig) 2577 sig <- Just (packet . fst $ sig)
2578 guard (isSignaturePacket sig) 2578 guard (isSignaturePacket sig)
2579 guard $ flip isSuffixOf 2579 guard $ flip isSuffixOf
2580 (fingerprint wk) 2580 (fingerprint topk)
2581 . fromMaybe "%bad%" 2581 . fromMaybe "%bad%"
2582 . signature_issuer 2582 . signature_issuer
2583 $ sig 2583 $ sig
2584 listToMaybe $ 2584 listToMaybe $
2585 map (signature_time . verify (Message [wk])) 2585 map (signature_time . verify (Message [topk]))
2586 (signatures $ Message [wk,subkey,sig]))) 2586 (signatures $ Message [wk,subkey,sig])))
2587 subsigs 2587 subsigs
2588 (xs,ys) = splitAtMinBy (comparing (Down . snd)) vs 2588 (xs,ys) = splitAtMinBy (comparing (Down . snd)) vs