Skip to content

Commit

Permalink
'--pinentry-mode loopback' was introduce in gnupg 2.1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet committed May 3, 2017
1 parent 25ac8d2 commit 6f16c25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions framework/Crypt/lib/Horde/Crypt/Pgp/Backend/Binary.php
Expand Up @@ -80,8 +80,8 @@ public function __construct($gnupg, $temp = null)

/* GnuPG 2 requires specifying the pinentry-mode. */
$result = $this->_callGpg(array('--version'), 'r');
if (preg_match('/gpg \(GnuPG\) (\d+)\.(\d+)\.(\d+)/', $result->stdout, $version) &&
$version[1] >= 2) {
if (preg_match('/gpg \(GnuPG\) (\d+\.\d+\.\d+)/', $result->stdout, $version) &&
version_compare($version[1], '2.1.12', 'ge') ) {
$this->_gnupg[] = '--pinentry-mode loopback';
file_put_contents(
$this->_tempdir . '/gpg-agent.conf',
Expand Down

0 comments on commit 6f16c25

Please sign in to comment.