[imp] PGP functionality
Didi Rieder
adrieder@sbox.tugraz.at
Wed, 25 Sep 2002 15:35:25 +0200
--On Monday, September 23, 2002 10:08:23 AM -0600 Michael M Slusarz
<slusarz@bigworm.colorado.edu> wrote:
> Since neither of these problems occur for me locally, you will have to do
> some more testing/debugging to help us out on this issue.
Hi all,
remember, I hab problems to send my public key to the key server.
IMP always told me that the key (even when it was just created)
is already on the keyserver, which of course was wrong.
After debuging and searching for a possible solution, I'm coming
up with a patch that works for me, could someone check it and tell
me if it makes sense?
/horde/lib/Cyrpt/pgp.php
--- pgp.php Wed Sep 25 14:56:18 2002
+++ pgp.php.new Wed Sep 25 14:56:18 2002
@@ -480,6 +480,7 @@
function getPublicKeyserver($fingerprint, $server =
PGP_KEYSERVER_PUBLIC)
{
/* Create a temporary keyring to store the downloaded key. */
+ unset($this->_public_keyring); // the keyring is already set and
has the key that we want to send stored
$keyring = $this->_createKeyring();
/* Connect to the public keyserver. */
@@ -511,7 +512,7 @@
$info = $this->pgpPacketInformation($pubkey);
/* See if the public key already exists on the keyserver. */
- if ($this->getPublicKeyserver($info['fingerprint'], $server)) {
+ if (! PEAR::isError($this->getPublicKeyserver($info['fingerprint'],
$server))) { // didi
return PEAR::raiseError(_("Key already exists on the public
keyserver."), 'horde.warning');
}
Thanks
Didi
--
-------------------------
Didi Rieder
adrieder@sbox.tugraz.at
-------------------------