summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--KeyRing.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/KeyRing.hs b/KeyRing.hs
index eda19d1..b738a25 100644
--- a/KeyRing.hs
+++ b/KeyRing.hs
@@ -31,7 +31,7 @@ import Data.ASN1.Encoding ( encodeASN1, encodeASN1', decodeASN1' )
31import Data.ASN1.BinaryEncoding ( DER(..) ) 31import Data.ASN1.BinaryEncoding ( DER(..) )
32import Data.Time.Clock.POSIX ( getPOSIXTime ) 32import Data.Time.Clock.POSIX ( getPOSIXTime )
33import qualified Data.Map as Map 33import qualified Data.Map as Map
34import qualified Data.ByteString.Lazy as L ( null, readFile, ByteString, toChunks ) 34import qualified Data.ByteString.Lazy as L ( null, readFile, writeFile, ByteString, toChunks )
35import qualified Data.ByteString as S ( unpack, splitAt, concat, cons ) 35import qualified Data.ByteString as S ( unpack, splitAt, concat, cons )
36import qualified Data.ByteString.Lazy.Char8 as Char8 ( span, unpack, break ) 36import qualified Data.ByteString.Lazy.Char8 as Char8 ( span, unpack, break )
37import qualified Crypto.Types.PubKey.ECC as ECC 37import qualified Crypto.Types.PubKey.ECC as ECC
@@ -700,8 +700,11 @@ writeRingKeys krd db wk secring pubring = do
700 else 700 else
701 let rs = flip map changes $ \c -> (f,MissingPacket (showPacket (packet c))) 701 let rs = flip map changes $ \c -> (f,MissingPacket (showPacket (packet c)))
702 in (ws,report++rs) 702 in (ws,report++rs)
703 todo -- porting from kiki.hs writeOutKeyrings 703 forM_ towrites $ \(f,x) -> do
704 return $ KikiSuccess [] 704 let m = Message $ map packet x
705 -- warn $ "writing "++f
706 L.writeFile f (encode m)
707 return $ KikiSuccess report
705 708
706 709
707runKeyRing :: KeyRingData -> (KeyRingRuntime -> a) -> IO (KikiResult a) 710runKeyRing :: KeyRingData -> (KeyRingRuntime -> a) -> IO (KikiResult a)