summaryrefslogtreecommitdiff
path: root/Remote/GCrypt.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-09-09 18:06:49 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-09-09 18:06:49 -0400
commit71863ac267113e79e2c6260361a4c1850b979b99 (patch)
tree6e7e4b78de91bd1b67096455343d21647c596ebe /Remote/GCrypt.hs
parent7c5af228ec0438c9ac40832311fd00ba07374abe (diff)
support gpg.program
When gpg.program is configured, it's used to get the command to run for gpg. Useful on systems that have only a gpg2 command or want to use it instead of the gpg command.
Diffstat (limited to 'Remote/GCrypt.hs')
-rw-r--r--Remote/GCrypt.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Remote/GCrypt.hs b/Remote/GCrypt.hs
index 51dfed4f4..3a63642c8 100644
--- a/Remote/GCrypt.hs
+++ b/Remote/GCrypt.hs
@@ -20,6 +20,7 @@ import Control.Exception
import Data.Default
import Common.Annex
+import qualified Annex
import Types.Remote
import Types.GitConfig
import Types.Crypto
@@ -300,7 +301,8 @@ setGcryptEncryption c remotename = do
Just (EncryptedCipher _ _ (KeyIds { keyIds = ks})) -> do
setConfig participants (unwords ks)
let signingkey = ConfigKey $ Git.GCrypt.remoteSigningKey remotename
- skeys <- M.keys <$> liftIO secretKeys
+ cmd <- gpgCmd <$> Annex.getGitConfig
+ skeys <- M.keys <$> liftIO (secretKeys cmd)
case filter (`elem` ks) skeys of
[] -> noop
(k:_) -> setConfig signingkey k