summaryrefslogtreecommitdiff
path: root/KeyRing.hs
diff options
context:
space:
mode:
Diffstat (limited to 'KeyRing.hs')
-rw-r--r--KeyRing.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/KeyRing.hs b/KeyRing.hs
index bcd8ac8..53e7438 100644
--- a/KeyRing.hs
+++ b/KeyRing.hs
@@ -1608,9 +1608,14 @@ writePEMKeys doDecrypt db exports = do
1608makeMemoizingDecrypter :: KeyRingOperation -> InputFileContext 1608makeMemoizingDecrypter :: KeyRingOperation -> InputFileContext
1609 -> IO (MappedPacket -> IO (KikiCondition Packet)) 1609 -> IO (MappedPacket -> IO (KikiCondition Packet))
1610makeMemoizingDecrypter operation ctx = do 1610makeMemoizingDecrypter operation ctx = do
1611 -- (*) Notice we do not pass ctx to resolveForReport.
1612 -- This is because the merge function does not currently use a context
1613 -- and the pws map keys must match the MappedPacket locations.
1614 -- TODO: Perhaps these should both be of type InputFile rather than
1615 -- FilePath?
1611 pws <- 1616 pws <-
1612 Traversable.mapM (cachedContents ctx . fromJust . pwfile . typ) 1617 Traversable.mapM (cachedContents ctx . fromJust . pwfile . typ)
1613 (Map.mapKeys (resolveForReport $ Just ctx) 1618 (Map.mapKeys (resolveForReport Nothing) -- see note (*) note above
1614 $ Map.filter (isJust . pwfile . typ) $ kFiles operation) 1619 $ Map.filter (isJust . pwfile . typ) $ kFiles operation)
1615 unkeysRef <- newIORef Map.empty 1620 unkeysRef <- newIORef Map.empty
1616 return $ doDecrypt unkeysRef pws 1621 return $ doDecrypt unkeysRef pws