diff options
author | Joey Hess <joey@kitenet.net> | 2011-04-16 18:22:52 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-04-16 19:12:50 -0400 |
commit | 4f9fafa02354d275d6fa83ff42ada4ebd1bc83d8 (patch) | |
tree | 83fd6a4ade64d2e8e6ab390459fc48ba80b9c435 /Crypto.hs | |
parent | 9fe7e6be7064d9c47e6c6fd4f1b3a70da604727d (diff) |
full encryption support for directory special remotes
Diffstat (limited to 'Crypto.hs')
-rw-r--r-- | Crypto.hs | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -9,6 +9,8 @@ -} module Crypto ( + Cipher, + EncryptedCipher, genCipher, updateCipher, storeCipher, @@ -133,7 +135,10 @@ gpgRead params = pOpen ReadFromPipe "gpg" (gpgParams params) hGetContentsStrict gpgPipeStrict :: [CommandParam] -> String -> IO String gpgPipeStrict params input = do - (_, output) <- pipeBoth "gpg" (gpgParams params) input + (pid, fromh, toh) <- hPipeBoth "gpg" (gpgParams params) + _ <- forkIO $ finally (hPutStr toh input) (hClose toh) + output <- hGetContentsStrict fromh + forceSuccess pid return output gpgPipeBytes :: [CommandParam] -> L.ByteString -> IO (PipeHandle, L.ByteString) |