From: Michael M Slusarz Date: Thu, 26 Feb 2009 05:07:00 +0000 (-0700) Subject: Fix some code relating to verifying PGP message X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=196e6ffe7d02bec868ed193c77d8eddc95bb5baf;p=horde.git Fix some code relating to verifying PGP message --- diff --git a/imp/lib/Crypt/pgp.php b/imp/lib/Crypt/pgp.php index 54214b8b4..3633b3120 100644 --- a/imp/lib/Crypt/pgp.php +++ b/imp/lib/Crypt/pgp.php @@ -192,7 +192,7 @@ class IMP_Horde_Crypt_pgp extends Horde_Crypt_pgp /* Try retrieving via a PGP public keyserver. */ if ($server && is_a($result, 'PEAR_Error')) { - $this->getFromPublicKeyserver($fingerprint, $address); + $result = $this->getFromPublicKeyserver($fingerprint, $address); } /* Return now, if no public key found at all. */ @@ -303,10 +303,10 @@ class IMP_Horde_Crypt_pgp extends Horde_Crypt_pgp foreach ($conf['utils']['gnupg_keyserver'] as $server) { $result = $this->getPublicKeyserver($data, $server, $timeout, $additional); if (!is_a($result, 'PEAR_Error')) { - throw new Horde_Exception($result); + return $result; } } - return $result; + throw new Horde_Exception(_("Could not connect to public PGP keyserver")); } else { return $this->putPublicKeyserver($data, $conf['utils']['gnupg_keyserver'][0], $timeout); }