diff options
Diffstat (limited to 'Remote/Helper/Encryptable.hs')
-rw-r--r-- | Remote/Helper/Encryptable.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Remote/Helper/Encryptable.hs b/Remote/Helper/Encryptable.hs index 5c661eaa7..a6e79ddc4 100644 --- a/Remote/Helper/Encryptable.hs +++ b/Remote/Helper/Encryptable.hs @@ -36,9 +36,9 @@ encryptionSetup c = maybe genCipher updateCipher $ extractCipher c -- hybrid encryption is the default when a keyid is -- specified but no encryption _ | maybe (M.member "keyid" c) (== "hybrid") encryption -> - use "encryption setup" . genEncryptedCipher key HybridCipher + use "encryption setup" . genEncryptedCipher key Hybrid =<< highRandomQuality - Just "pubkey" -> use "encryption setup" . genEncryptedCipher key PubKeyCipher + Just "pubkey" -> use "encryption setup" . genEncryptedCipher key PubKey =<< highRandomQuality _ -> error $ "Specify " ++ intercalate " or " (map ("encryption=" ++) @@ -52,7 +52,7 @@ encryptionSetup c = maybe genCipher updateCipher $ extractCipher c updateCipher v = case v of SharedCipher _ | maybe True (== "shared") encryption -> return c' EncryptedCipher _ variant _ - | maybe True (== if variant == HybridCipher then "hybrid" else "pubkey") encryption -> + | maybe True (== if variant == Hybrid then "hybrid" else "pubkey") encryption -> use "encryption update" $ updateEncryptedCipher newkeys v _ -> cannotchange use m a = do @@ -154,9 +154,9 @@ extractCipher c = case (M.lookup "cipher" c, M.lookup "cipherkeys" c, M.lookup "encryption" c) of (Just t, Just ks, encryption) | maybe True (== "hybrid") encryption -> - Just $ EncryptedCipher (fromB64 t) HybridCipher (readkeys ks) + Just $ EncryptedCipher (fromB64 t) Hybrid (readkeys ks) (Just t, Just ks, Just "pubkey") -> - Just $ EncryptedCipher (fromB64 t) PubKeyCipher (readkeys ks) + Just $ EncryptedCipher (fromB64 t) PubKey (readkeys ks) (Just t, Nothing, encryption) | maybe True (== "shared") encryption -> Just $ SharedCipher (fromB64 t) _ -> Nothing |