summaryrefslogtreecommitdiff
path: root/KeyRing.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2015-06-22 13:30:03 -0400
committerjoe <joe@jerkface.net>2015-06-22 13:30:03 -0400
commit4373131e1b077ad1044aec46938a0b28cd35c6bc (patch)
tree47334d3d715428e644cfc2cd087b7f1f622b3803 /KeyRing.hs
parentb42e6e3606ce7d99dea71e51e5deda7915521d1e (diff)
Deletions are now reported
Diffstat (limited to 'KeyRing.hs')
-rw-r--r--KeyRing.hs8
1 files changed, 6 insertions, 2 deletions
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
2142 kd' | kk /= topk = kd 2142 kd' | kk /= topk = kd
2143 | otherwise = kd { keySubKeys = Map.filterWithKey pred $ keySubKeys kd } 2143 | otherwise = kd { keySubKeys = Map.filterWithKey pred $ keySubKeys kd }
2144 pred k _ = k == subk 2144 pred k _ = k == subk
2145 -- TODO: update report with DeletedPacket entries 2145 ps = concat $ maybeToList $ do
2146 return $ KikiSuccess (kd' , report) 2146 SubKey mp sigs <- Map.lookup subk (keySubKeys kd)
2147 return $ packet mp : concatMap (\(p,ts) -> packet p : Map.elems ts) sigs
2148 ctx = InputFileContext (rtSecring rt) (rtPubring rt)
2149 rings = [HomeSec, HomePub] >>= resolveInputFile ctx
2150 return $ KikiSuccess (kd' , report ++ [ (f,DeletedPacket p) | f <- rings, p <- ps ])
2147 2151
2148initializeMissingPEMFiles :: 2152initializeMissingPEMFiles ::
2149 KeyRingOperation 2153 KeyRingOperation