diff options
author | Joey Hess <joey@kitenet.net> | 2011-04-17 18:18:27 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-04-17 18:18:27 -0400 |
commit | 86f7feb2784221459d4015b0d70f537dbf2e9bb7 (patch) | |
tree | 3eb005b9a1c98fe24494ec407adb59323eaabe94 /Crypto.hs | |
parent | a91a51fc03a68f2a5ede6df5182471f6ebfcc037 (diff) |
initremote: show gpg keys
Diffstat (limited to 'Crypto.hs')
-rw-r--r-- | Crypto.hs | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -13,6 +13,7 @@ module Crypto ( EncryptedCipher, genCipher, updateCipher, + describeCipher, storeCipher, extractCipher, decryptCipher, @@ -95,6 +96,13 @@ updateCipher c encipher@(EncryptedCipher _ ks) = do where combine (KeyIds a) (KeyIds b) = KeyIds $ a ++ b +describeCipher :: EncryptedCipher -> String +describeCipher (EncryptedCipher _ (KeyIds ks)) = + "with gpg " ++ keys ks ++ " " ++ unwords ks + where + keys [_] = "key" + keys _ = "keys" + {- Stores an EncryptedCipher in a remote's configuration. -} storeCipher :: RemoteConfig -> EncryptedCipher -> RemoteConfig storeCipher c (EncryptedCipher t ks) = |