This commit is contained in:
Joey Hess 2011-04-17 00:40:23 -04:00
parent d996637fd6
commit b6b04642c8
4 changed files with 9 additions and 9 deletions

View file

@ -29,7 +29,7 @@ import Utility
import Messages
import Ssh
import Remote.Special
import Remote.Encrypted
import Remote.Encryptable
import Crypto
type BupRepo = String
@ -49,7 +49,7 @@ gen r u c = do
bupr <- liftIO $ bup2GitRemote buprepo
(u', bupr') <- getBupUUID bupr u
return $ encryptedRemote c
return $ encryptableRemote c
(storeEncrypted r buprepo)
(retrieveEncrypted buprepo)
Remote {

View file

@ -27,7 +27,7 @@ import Config
import Content
import Utility
import Remote.Special
import Remote.Encrypted
import Remote.Encryptable
import Crypto
remote :: RemoteType Annex
@ -42,7 +42,7 @@ gen :: Git.Repo -> UUID -> Maybe RemoteConfig -> Annex (Remote Annex)
gen r u c = do
dir <- getConfig r "directory" (error "missing directory")
cst <- remoteCost r cheapRemoteCost
return $ encryptedRemote c
return $ encryptableRemote c
(storeEncrypted dir)
(retrieveEncrypted dir)
Remote {

View file

@ -1,11 +1,11 @@
{- common functions for encrypted remotes
{- common functions for encryptable remotes
-
- Copyright 2011 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Remote.Encrypted where
module Remote.Encryptable where
import qualified Data.Map as M
import Control.Monad.State (liftIO)
@ -37,13 +37,13 @@ encryptionSetup c =
-
- Two additional functions must be provided by the remote,
- to support storing and retrieving encrypted content. -}
encryptedRemote
encryptableRemote
:: Maybe RemoteConfig
-> ((Cipher, Key) -> Key -> Annex Bool)
-> ((Cipher, Key) -> FilePath -> Annex Bool)
-> Remote Annex
-> Remote Annex
encryptedRemote c storeKeyEncrypted retrieveKeyFileEncrypted r =
encryptableRemote c storeKeyEncrypted retrieveKeyFileEncrypted r =
r {
storeKey = store,
retrieveKeyFile = retrieve,

View file

@ -28,7 +28,7 @@ import Messages
import Locations
import Config
import Remote.Special
import Remote.Encrypted
import Remote.Encryptable
remote :: RemoteType Annex
remote = RemoteType {