GnuPG 2.1: Add option to configure gpgconf binary location

pull/5498/head
Aleksander Machniak 8 years ago
parent a70faaa692
commit fba3e1ae0c

@ -24,6 +24,10 @@ $config['enigma_pgp_binary'] = '';
// It's used with GnuPG 2.x.
$config['enigma_pgp_agent'] = '';
// Location of gpgconf binary. By default it will be auto-detected.
// It's used with GnuPG >= 2.1.
$config['enigma_pgp_gpgconf'] = '';
// Enables signatures verification feature.
$config['enigma_signatures'] = true;

@ -43,6 +43,7 @@ class enigma_driver_gnupg extends enigma_driver
$debug = $this->rc->config->get('enigma_debug');
$binary = $this->rc->config->get('enigma_pgp_binary');
$agent = $this->rc->config->get('enigma_pgp_agent');
$gpgconf = $this->rc->config->get('enigma_pgp_gpgconf');
if (!$homedir) {
return new enigma_error(enigma_error::INTERNAL,
@ -88,6 +89,9 @@ class enigma_driver_gnupg extends enigma_driver
if ($agent) {
$options['agent'] = $agent;
}
if ($gpgconf) {
$options['gpgconf'] = $gpgconf;
}
// Create Crypt_GPG object
try {

Loading…
Cancel
Save