diff options
Diffstat (limited to 'kiki.hs')
-rw-r--r-- | kiki.hs | 15 |
1 files changed, 0 insertions, 15 deletions
@@ -766,19 +766,6 @@ flattenKeys isPublic db = Message $ concatMap (map packet . flattenTop "" isPubl | |||
766 | isSecret _ = False | 766 | isSecret _ = False |
767 | 767 | ||
768 | 768 | ||
769 | flattenTop :: FilePath -> Bool -> KeyData -> [MappedPacket] | ||
770 | flattenTop 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 | |||
775 | flattenSub :: FilePath -> Bool -> SubKey -> [MappedPacket] | ||
776 | flattenSub fname ispub (SubKey key sigs) = unk ispub key: concatSort fname head (unsig fname ispub) sigs | ||
777 | |||
778 | unk :: Bool -> MappedPacket -> MappedPacket | ||
779 | unk isPublic = if isPublic then toPacket secretToPublic else id | ||
780 | where toPacket f mp@(MappedPacket {packet=p}) = mp {packet=(f p)} | ||
781 | |||
782 | ifSecret (SecretKeyPacket {}) t f = t | 769 | ifSecret (SecretKeyPacket {}) t f = t |
783 | ifSecret _ t f = f | 770 | ifSecret _ 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 |
792 | showPacket0 p = concat . take 1 $ words (show p) | 779 | showPacket0 p = concat . take 1 $ words (show p) |
793 | 780 | ||
794 | keyMappedPacket (KeyData k _ _ _) = k | ||
795 | |||
796 | writeOutKeyrings :: Map.Map FilePath t -> KeyDB -> IO () | 781 | writeOutKeyrings :: Map.Map FilePath t -> KeyDB -> IO () |
797 | writeOutKeyrings lkmap db = do | 782 | writeOutKeyrings lkmap db = do |
798 | let ks = Map.elems db | 783 | let ks = Map.elems db |