diff --git a/src/Utility/OpenPGP/Backends/Gnupg.php b/src/Utility/OpenPGP/Backends/Gnupg.php index ebec183356..1a8cfe0520 100644 --- a/src/Utility/OpenPGP/Backends/Gnupg.php +++ b/src/Utility/OpenPGP/Backends/Gnupg.php @@ -62,7 +62,10 @@ public function __construct() putenv('GNUPGHOME=' . Configure::read('passbolt.gpg.keyring')); } - $this->_gpg = new PhpGnupg(); + $this->_gpg = new PhpGnupg(array_filter([ + 'file_name' => Configure::read('passbolt.gpg.program'), + 'home_dir' => Configure::read('passbolt.gpg.keyring'), + ], static fn ($v) => !empty($v))); $this->_gpg->seterrormode(GNUPG_ERROR_EXCEPTION); }