initremote: show gpg keys

This commit is contained in:
Joey Hess 2011-04-17 18:18:27 -04:00
parent a91a51fc03
commit 86f7feb278
3 changed files with 13 additions and 4 deletions

View file

@ -27,11 +27,12 @@ encryptionSetup c =
(Just "none", Nothing) -> return c
(Just "none", Just _) -> error "Cannot change encryption type of existing remote."
(Nothing, Just _) -> return c
(Just _, Nothing) -> use $ genCipher c
(Just _, Just v) -> use $ updateCipher c v
(Just _, Nothing) -> use "encryption setup" $ genCipher c
(Just _, Just v) -> use "encryption updated" $ updateCipher c v
where
use a = do
use m a = do
cipher <- liftIO a
showNote $ m ++ " " ++ describeCipher cipher
return $ M.delete "encryption" $ storeCipher c cipher
{- Modifies a Remote to support encryption.