From 4373131e1b077ad1044aec46938a0b28cd35c6bc Mon Sep 17 00:00:00 2001 From: joe Date: Mon, 22 Jun 2015 13:30:03 -0400 Subject: Deletions are now reported --- KeyRing.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'KeyRing.hs') diff --git a/KeyRing.hs b/KeyRing.hs index 1d21ff5..14772d8 100644 --- a/KeyRing.hs +++ b/KeyRing.hs @@ -2142,8 +2142,12 @@ performManipulations doDecrypt rt wk manip = do kd' | kk /= topk = kd | otherwise = kd { keySubKeys = Map.filterWithKey pred $ keySubKeys kd } pred k _ = k == subk - -- TODO: update report with DeletedPacket entries - return $ KikiSuccess (kd' , report) + ps = concat $ maybeToList $ do + SubKey mp sigs <- Map.lookup subk (keySubKeys kd) + return $ packet mp : concatMap (\(p,ts) -> packet p : Map.elems ts) sigs + ctx = InputFileContext (rtSecring rt) (rtPubring rt) + rings = [HomeSec, HomePub] >>= resolveInputFile ctx + return $ KikiSuccess (kd' , report ++ [ (f,DeletedPacket p) | f <- rings, p <- ps ]) initializeMissingPEMFiles :: KeyRingOperation -- cgit v1.2.3