diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-08-31 07:06:36 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-08-31 07:06:36 +0000 |
| commit | ab5a49d37c0be08bc1a84cea6bd5ddd946377e0a (patch) | |
| tree | 1a1b854fcafe55d0eb1c45e580fb7227267033c1 /plugins/enigma/lib/Crypt | |
| parent | 1767322c2a35dad565e1f25b7466d7a5874ef1a6 (diff) | |
- updated Crypt_GPG package + some small fixes
git-svn-id: https://svn.roundcube.net/trunk@3929 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/enigma/lib/Crypt')
| -rw-r--r-- | plugins/enigma/lib/Crypt/GPG/VerifyStatusHandler.php | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/plugins/enigma/lib/Crypt/GPG/VerifyStatusHandler.php b/plugins/enigma/lib/Crypt/GPG/VerifyStatusHandler.php index 1c54b6e42..083bd3012 100644 --- a/plugins/enigma/lib/Crypt/GPG/VerifyStatusHandler.php +++ b/plugins/enigma/lib/Crypt/GPG/VerifyStatusHandler.php @@ -31,7 +31,7 @@ * @author Michael Gauthier <mike@silverorange.com> * @copyright 2008 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: VerifyStatusHandler.php 302810 2010-08-26 15:30:17Z gauthierm $ + * @version CVS: $Id: VerifyStatusHandler.php 302908 2010-08-31 03:56:54Z gauthierm $ * @link http://pear.php.net/package/Crypt_GPG * @link http://www.gnupg.org/ */ @@ -137,6 +137,32 @@ class Crypt_GPG_VerifyStatusHandler $this->signatures[$this->index] = $signature; break; + case 'ERRSIG': + $signature = new Crypt_GPG_Signature(); + + // if there was a signature id, set it on the new signature + if ($this->signatureId != '') { + $signature->setId($this->signatureId); + $this->signatureId = ''; + } + + // Detect whether fingerprint or key id was returned and set + // signature values appropriately. Key ids are strings of either + // 16 or 8 hexadecimal characters. Fingerprints are strings of 40 + // hexadecimal characters. The key id is the last 16 characters of + // the key fingerprint. + if (strlen($tokens[1]) > 16) { + $signature->setKeyFingerprint($tokens[1]); + $signature->setKeyId(substr($tokens[1], -16)); + } else { + $signature->setKeyId($tokens[1]); + } + + $this->index++; + $this->signatures[$this->index] = $signature; + + break; + case 'VALIDSIG': if (!array_key_exists($this->index, $this->signatures)) { break; |
