summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-10-22 14:39:59 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-10-22 14:39:59 -0400
commit299c10bc37ab60b0a0c62e8e931a83f61ce2e0a6 (patch)
tree8047848362ec99d4912ae47947489bd6f1740b76
parentcf9306dd11812a02b2b4ed01ce38a2b0321a722e (diff)
show in info whether a remote uses hybrid encryption or not
-rw-r--r--Remote/Helper/Encryptable.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/Remote/Helper/Encryptable.hs b/Remote/Helper/Encryptable.hs
index 5e342803d..4903cffb4 100644
--- a/Remote/Helper/Encryptable.hs
+++ b/Remote/Helper/Encryptable.hs
@@ -163,5 +163,10 @@ describeEncryption :: RemoteConfig -> String
describeEncryption c = case extractCipher c of
Nothing -> "not encrypted"
(Just (SharedCipher _)) -> "encrypted (encryption key stored in git repository)"
- (Just (EncryptedCipher _ _ (KeyIds { keyIds = ks }))) ->
- "encrypted (to gpg keys: " ++ unwords ks ++ ")"
+ (Just (EncryptedCipher _ v (KeyIds { keyIds = ks }))) -> unwords $ catMaybes
+ [ Just "encrypted (to gpg keys:"
+ , Just (unwords ks ++ ")")
+ , case v of
+ PubKey -> Nothing
+ Hybrid -> Just "(hybrid mode)"
+ ]