diff options
Diffstat (limited to 'KeyRing.hs')
-rw-r--r-- | KeyRing.hs | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -31,7 +31,7 @@ import Data.ASN1.Encoding ( encodeASN1, encodeASN1', decodeASN1' ) | |||
31 | import Data.ASN1.BinaryEncoding ( DER(..) ) | 31 | import Data.ASN1.BinaryEncoding ( DER(..) ) |
32 | import Data.Time.Clock.POSIX ( getPOSIXTime ) | 32 | import Data.Time.Clock.POSIX ( getPOSIXTime ) |
33 | import qualified Data.Map as Map | 33 | import qualified Data.Map as Map |
34 | import qualified Data.ByteString.Lazy as L ( null, readFile, ByteString, toChunks ) | 34 | import qualified Data.ByteString.Lazy as L ( null, readFile, writeFile, ByteString, toChunks ) |
35 | import qualified Data.ByteString as S ( unpack, splitAt, concat, cons ) | 35 | import qualified Data.ByteString as S ( unpack, splitAt, concat, cons ) |
36 | import qualified Data.ByteString.Lazy.Char8 as Char8 ( span, unpack, break ) | 36 | import qualified Data.ByteString.Lazy.Char8 as Char8 ( span, unpack, break ) |
37 | import qualified Crypto.Types.PubKey.ECC as ECC | 37 | import 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 | ||
707 | runKeyRing :: KeyRingData -> (KeyRingRuntime -> a) -> IO (KikiResult a) | 710 | runKeyRing :: KeyRingData -> (KeyRingRuntime -> a) -> IO (KikiResult a) |