summaryrefslogtreecommitdiff
path: root/lib/KeyRing.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/KeyRing.hs')
-rw-r--r--lib/KeyRing.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/KeyRing.hs b/lib/KeyRing.hs
index 80b7826..4e83d80 100644
--- a/lib/KeyRing.hs
+++ b/lib/KeyRing.hs
@@ -54,6 +54,7 @@ module KeyRing
54 , keyflags 54 , keyflags
55 -- * Miscelaneous Utilities 55 -- * Miscelaneous Utilities
56 , isKey 56 , isKey
57 , isSecretKey
57 , derRSA 58 , derRSA
58 , derToBase32 59 , derToBase32
59 , backsig 60 , backsig
@@ -2570,7 +2571,9 @@ makeMemoizingDecrypter operation ctx keys = do
2570 case symmetric_algorithm wkun of 2571 case symmetric_algorithm wkun of
2571 Unencrypted -> do 2572 Unencrypted -> do
2572 writeIORef unkeysRef (Map.insert kk wkun unkeys) 2573 writeIORef unkeysRef (Map.insert kk wkun unkeys)
2573 ek <- encryptSecretKey pw dest_s2k dest_alg wkun 2574 ek <- if dest_alg==Unencrypted
2575 then return $ Just wkun
2576 else encryptSecretKey pw dest_s2k dest_alg wkun
2574 case ek of 2577 case ek of
2575 Nothing -> return $ BadPassphrase 2578 Nothing -> return $ BadPassphrase
2576 Just wken -> return $ KikiSuccess wken 2579 Just wken -> return $ KikiSuccess wken