From dcf877c692749459c53a557c4243ce344a3e7001 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 27 Jul 2016 13:36:30 +0200 Subject: [PATCH] Enigma: Add possibility to configure gpg-agent binary location (enigma_pgp_agent) --- CHANGELOG | 1 + plugins/enigma/config.inc.php.dist | 4 ++++ plugins/enigma/lib/enigma_driver_gnupg.php | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index e28273df2..87bc1358e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -23,6 +23,7 @@ CHANGELOG Roundcube Webmail - Managesieve: Support 'duplicate' extension [RFC 7352] - Managesieve: Unhide advanced rule controls if there are inputs with errors - Managesieve: Display warning message when filter form contains errors +- Enigma: Add possibility to configure gpg-agent binary location (enigma_pgp_agent) RELEASE 1.2.1 ------------- diff --git a/plugins/enigma/config.inc.php.dist b/plugins/enigma/config.inc.php.dist index d65aba7bb..74e1669b1 100644 --- a/plugins/enigma/config.inc.php.dist +++ b/plugins/enigma/config.inc.php.dist @@ -20,6 +20,10 @@ $config['enigma_pgp_homedir'] = null; // This is also a way to force gpg2 use if there are both 1.x and 2.x on the system. $config['enigma_pgp_binary'] = ''; +// Location of gpg-agent binary. By default it will be auto-detected. +// It's used with GnuPG 2.x. +$config['enigma_pgp_agent'] = ''; + // Enables signatures verification feature. $config['enigma_signatures'] = true; diff --git a/plugins/enigma/lib/enigma_driver_gnupg.php b/plugins/enigma/lib/enigma_driver_gnupg.php index 9d7998c61..3c02f9f43 100644 --- a/plugins/enigma/lib/enigma_driver_gnupg.php +++ b/plugins/enigma/lib/enigma_driver_gnupg.php @@ -42,6 +42,7 @@ class enigma_driver_gnupg extends enigma_driver $homedir = $this->rc->config->get('enigma_pgp_homedir', INSTALL_PATH . 'plugins/enigma/home'); $debug = $this->rc->config->get('enigma_debug'); $binary = $this->rc->config->get('enigma_pgp_binary'); + $agent = $this->rc->config->get('enigma_pgp_agent'); if (!$homedir) { return new enigma_error(enigma_error::INTERNAL, @@ -84,6 +85,9 @@ class enigma_driver_gnupg extends enigma_driver if ($binary) { $options['binary'] = $binary; } + if ($agent) { + $options['agent'] = $agent; + } // Create Crypt_GPG object try {