store S3 creds in a 600 mode file inside the local git repo

This commit is contained in:
Joey Hess 2012-09-26 12:06:44 -04:00
parent 926ffaf3f3
commit e4bf74a965
5 changed files with 63 additions and 28 deletions

View file

@ -88,6 +88,11 @@ remoteCipher c = go $ extractCipher c
Annex.changeState (\s -> s { Annex.ciphers = M.insert encipher cipher cache })
return $ Just cipher
{- Checks if there is a trusted (non-shared) cipher. -}
isTrustedCipher :: RemoteConfig -> Bool
isTrustedCipher c =
isJust (M.lookup "cipherkeys" c) && isJust (M.lookup "cipher" c)
{- Gets encryption Cipher, and encrypted version of Key. -}
cipherKey :: Maybe RemoteConfig -> Key -> Annex (Maybe (Cipher, Key))
cipherKey Nothing _ = return Nothing