From: Michael M Slusarz Date: Thu, 28 May 2009 12:51:43 +0000 (-0600) Subject: Make sure fingerprint is defined. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e44100fcb44cf123f5ec5e7df6ddb8a54b089489;p=horde.git Make sure fingerprint is defined. --- diff --git a/imp/lib/Crypt/Pgp.php b/imp/lib/Crypt/Pgp.php index 6cb12994d..885b1c98e 100644 --- a/imp/lib/Crypt/Pgp.php +++ b/imp/lib/Crypt/Pgp.php @@ -338,18 +338,18 @@ class IMP_Crypt_Pgp extends Horde_Crypt_Pgp */ public function verifySignature($text, $address, $signature = '') { - $fingerprint = null; - - /* Get fingerprint of key. */ if (!empty($signature)) { $packet_info = $this->pgpPacketInformation($signature); if (isset($packet_info['fingerprint'])) { $fingerprint = $packet_info['fingerprint']; } - } else { + } + + if (!isset($fingerprint)) { $fingerprint = $this->getSignersKeyID($text); } + /* Get fingerprint of key. */ $public_key = $this->getPublicKey($address, array('fingerprint' => $fingerprint)); if (empty($signature)) {