diff options
author | joe <joe@jerkface.net> | 2015-06-22 13:30:03 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2015-06-22 13:30:03 -0400 |
commit | 4373131e1b077ad1044aec46938a0b28cd35c6bc (patch) | |
tree | 47334d3d715428e644cfc2cd087b7f1f622b3803 /KeyRing.hs | |
parent | b42e6e3606ce7d99dea71e51e5deda7915521d1e (diff) |
Deletions are now reported
Diffstat (limited to 'KeyRing.hs')
-rw-r--r-- | KeyRing.hs | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 | ||
2148 | initializeMissingPEMFiles :: | 2152 | initializeMissingPEMFiles :: |
2149 | KeyRingOperation | 2153 | KeyRingOperation |