Edit report at http://pear.php.net/bugs/bug.php?id=17760&edit=1
ID: 17760
Updated by: [email protected]
Reported By: alec at alec dot pl
Summary: Newer GnuPG responses not supported
-Status: Open
+Status: Closed
Type: Bug
Package: Crypt_GPG
Package Version: 1.1.1
PHP Version: Irrelevant
-Assigned To:
+Assigned To: gauthierm
Roadmap Versions:
New Comment:
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: gauthierm
This bug has been fixed in SVN.
If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should
be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
Thanks for testing and for the patch.
Previous Comments:
------------------------------------------------------------------------
[2010-08-20 07:54:52] alec
Description:
------------
I'm using GnuPG 2.0.15 and it returns not supported response strings
when queried public/secure key not exists. Simple patch:
--- Engine.old 2010-08-20 09:27:04.818725258 +0200
+++ Engine.php 2010-08-20 09:49:04.213181923 +0200
@@ -954,14 +954,14 @@
}
if ($this->_errorCode === Crypt_GPG::ERROR_NONE) {
- $pattern = '/secret key not available/';
+ $pattern = '/(No secret key|secret key not available)/';
if (preg_match($pattern, $line) === 1) {
$this->_errorCode = Crypt_GPG::ERROR_KEY_NOT_FOUND;
}
}
if ($this->_errorCode === Crypt_GPG::ERROR_NONE) {
- $pattern = '/public key not found/';
+ $pattern = '/(No public key|public key not found)/';
if (preg_match($pattern, $line) === 1) {
$this->_errorCode = Crypt_GPG::ERROR_KEY_NOT_FOUND;
}
------------------------------------------------------------------------