diff options
Diffstat (limited to 'KeyRing.hs')
-rw-r--r-- | KeyRing.hs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1666,6 +1666,9 @@ makeMemoizingDecrypter operation ctx = do | |||
1666 | && isNothing (passSpecKeySpec sp)) | 1666 | && isNothing (passSpecKeySpec sp)) |
1667 | $ kPassphrases operation | 1667 | $ kPassphrases operation |
1668 | unkeysRef <- newIORef Map.empty | 1668 | unkeysRef <- newIORef Map.empty |
1669 | -- TODO: | ||
1670 | -- Use buildKeyDB on unspilled files to create an unspillable KeyDB. | ||
1671 | -- This KeyDB should be used later by decryptIt. | ||
1669 | return $ doDecrypt unkeysRef (pws `Map.union` pws2) defpw | 1672 | return $ doDecrypt unkeysRef (pws `Map.union` pws2) defpw |
1670 | where | 1673 | where |
1671 | doDecrypt :: IORef (Map.Map KeyKey Packet) | 1674 | doDecrypt :: IORef (Map.Map KeyKey Packet) |
@@ -1681,6 +1684,9 @@ makeMemoizingDecrypter operation ctx = do | |||
1681 | 1684 | ||
1682 | decryptIt [] = return BadPassphrase | 1685 | decryptIt [] = return BadPassphrase |
1683 | decryptIt (getpw:getpws) = do | 1686 | decryptIt (getpw:getpws) = do |
1687 | -- TODO: This function should use mergeKeyPacket to | ||
1688 | -- combine the packet with it's unspilled version before | ||
1689 | -- attempting to decrypt it. | ||
1684 | pw <- getpw | 1690 | pw <- getpw |
1685 | let wkun = fromMaybe wk $ decryptSecretKey pw wk | 1691 | let wkun = fromMaybe wk $ decryptSecretKey pw wk |
1686 | case symmetric_algorithm wkun of | 1692 | case symmetric_algorithm wkun of |