diff options
author | guilhem <guilhem@fripost.org> | 2013-03-11 02:33:13 +0100 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-03-11 09:48:38 -0400 |
commit | 7fa1e498de9cbb84b23f90b17c66d755292ae716 (patch) | |
tree | dc1f5127473d3450b138b4aedfe43a5248d42939 /Remote/Hook.hs | |
parent | f2292dc3b494dbed517a48ab2876594f5ace0179 (diff) |
GnuPG options for symmetric encryption.
Diffstat (limited to 'Remote/Hook.hs')
-rw-r--r-- | Remote/Hook.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Remote/Hook.hs b/Remote/Hook.hs index 8b0231203..9fbd632d6 100644 --- a/Remote/Hook.hs +++ b/Remote/Hook.hs @@ -33,7 +33,7 @@ gen :: Git.Repo -> UUID -> RemoteConfig -> RemoteGitConfig -> Annex Remote gen r u c gc = do cst <- remoteCost gc expensiveRemoteCost return $ encryptableRemote c - (storeEncrypted hooktype) + (storeEncrypted hooktype $ getGpgOpts gc) (retrieveEncrypted hooktype) Remote { uuid = u, @@ -106,10 +106,10 @@ store :: String -> Key -> AssociatedFile -> MeterUpdate -> Annex Bool store h k _f _p = sendAnnex k (void $ remove h k) $ \src -> runHook h "store" k (Just src) $ return True -storeEncrypted :: String -> (Cipher, Key) -> Key -> MeterUpdate -> Annex Bool -storeEncrypted h (cipher, enck) k _p = withTmp enck $ \tmp -> +storeEncrypted :: String -> GpgOpts -> (Cipher, Key) -> Key -> MeterUpdate -> Annex Bool +storeEncrypted h gpgOpts (cipher, enck) k _p = withTmp enck $ \tmp -> sendAnnex k (void $ remove h enck) $ \src -> do - liftIO $ encrypt cipher (feedFile src) $ + liftIO $ encrypt gpgOpts cipher (feedFile src) $ readBytes $ L.writeFile tmp runHook h "store" enck (Just tmp) $ return True |