summaryrefslogtreecommitdiff
path: root/kiki.hs
diff options
context:
space:
mode:
Diffstat (limited to 'kiki.hs')
-rw-r--r--kiki.hs15
1 files changed, 0 insertions, 15 deletions
diff --git a/kiki.hs b/kiki.hs
index 4daff67..41e6e6b 100644
--- a/kiki.hs
+++ b/kiki.hs
@@ -766,19 +766,6 @@ flattenKeys isPublic db = Message $ concatMap (map packet . flattenTop "" isPubl
766 isSecret _ = False 766 isSecret _ = False
767 767
768 768
769flattenTop :: FilePath -> Bool -> KeyData -> [MappedPacket]
770flattenTop fname ispub (KeyData key sigs uids subkeys) =
771 unk ispub key :
772 ( flattenAllUids fname ispub uids
773 ++ concatSort fname head (flattenSub fname ispub) (Map.elems subkeys))
774
775flattenSub :: FilePath -> Bool -> SubKey -> [MappedPacket]
776flattenSub fname ispub (SubKey key sigs) = unk ispub key: concatSort fname head (unsig fname ispub) sigs
777
778unk :: Bool -> MappedPacket -> MappedPacket
779unk isPublic = if isPublic then toPacket secretToPublic else id
780 where toPacket f mp@(MappedPacket {packet=p}) = mp {packet=(f p)}
781
782ifSecret (SecretKeyPacket {}) t f = t 769ifSecret (SecretKeyPacket {}) t f = t
783ifSecret _ t f = f 770ifSecret _ t f = f
784 771
@@ -791,8 +778,6 @@ showPacket p | isKey p = (if is_subkey p
791 | otherwise = showPacket0 p 778 | otherwise = showPacket0 p
792showPacket0 p = concat . take 1 $ words (show p) 779showPacket0 p = concat . take 1 $ words (show p)
793 780
794keyMappedPacket (KeyData k _ _ _) = k
795
796writeOutKeyrings :: Map.Map FilePath t -> KeyDB -> IO () 781writeOutKeyrings :: Map.Map FilePath t -> KeyDB -> IO ()
797writeOutKeyrings lkmap db = do 782writeOutKeyrings lkmap db = do
798 let ks = Map.elems db 783 let ks = Map.elems db