From eab1790ea317508309794d640940dce03ffaf65d Mon Sep 17 00:00:00 2001 From: guilhem Date: Sun, 1 Sep 2013 20:12:00 +0200 Subject: Allow public-key encryption of file content. With the initremote parameters "encryption=pubkey keyid=788A3F4C". /!\ Adding or removing a key has NO effect on files that have already been copied to the remote. Hence using keyid+= and keyid-= with such remotes should be used with care, and make little sense unless the point is to replace a (sub-)key by another. /!\ Also, a test case has been added to ensure that the cipher and file contents are encrypted as specified by the chosen encryption scheme. --- Creds.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Creds.hs') diff --git a/Creds.hs b/Creds.hs index 7791ce85d..588d67cfe 100644 --- a/Creds.hs +++ b/Creds.hs @@ -52,7 +52,7 @@ setRemoteCredPair c storage = go =<< getRemoteCredPair c storage return c storeconfig creds key (Just cipher) = do - s <- liftIO $ encrypt (GpgOpts []) cipher + s <- liftIO $ encrypt [] cipher (feedBytes $ L.pack $ encodeCredPair creds) (readBytes $ return . L.unpack) return $ M.insert key (toB64 s) c -- cgit v1.2.3