6.0.0-beta1
7/29/25

[#4177] Can't send personal pgp public key to public keyserver pgp.mit.edu
Summary Can't send personal pgp public key to public keyserver pgp.mit.edu
Queue Horde Framework Packages
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners Horde Developers (at)
Requester vanner (at) pop-pa (dot) rnp (dot) br
Created 07/19/2006 (6950 days ago)
Due
Updated 07/20/2006 (6949 days ago)
Assigned 07/19/2006 (6950 days ago)
Resolved 07/20/2006 (6949 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
07/20/2006 12:38:27 AM Michael Slusarz Comment #2
State ⇒ Resolved
Reply to this comment
Looks right (see, e.g.: 
http://www.dmzs.com/~dmz/projects/pks-commands.phps).  Committed to 
HEAD and Horde 3.1.3.
07/19/2006 09:55:54 PM Jan Schneider Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
 
07/19/2006 03:58:24 PM vanner (at) pop-pa (dot) rnp (dot) br Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Can't send personal pgp public key to public keyserver pgp.mit.edu
Queue ⇒ Horde Framework Packages
Reply to this comment
Hi!



Under IMP->Options->PGP Options,  when I click "Send Key to Public 
Keyserver", I receive a message stating that my persoal public key was 
sent successfully, the real message is "Key successfully sent to the 
public keyserver.", but when I check in the public key server, it says 
there's no corresponding public key stored.



I used tcpdump to check Horde<->Public Key Server conversation and 
realized that query sent by Horde was incorrect. I corrected the code 
and it started funcioning correctly.



Here follows my tampering in the code:



--- lib/Horde/Crypt/pgp.php.1.101       2006-07-19 09:35:31.000000000 -0300

+++ lib/Horde/Crypt/pgp.php     2006-07-19 12:20:08.000000000 -0300

@@ -743,7 +743,7 @@

          /* Connect to the public keyserver. _connectKeyserver() returns a

             PEAR_Error object on error and the output text on success. */

          $pubkey = 'keytext=' . urlencode(rtrim($pubkey));

-        $cmd = 'POST /pks/add HTTP/1.0\nContent-Length: ' . 
strlen($pubkey) . "\n\n" . $pubkey . "\n";

+        $cmd = "POST /pks/add HTTP/1.0\r\nHost: " . $server . 
":11371\r\n" . "User-Agent: Horde\r\n" . "Content-type: 
application/x-www-form-urlencoded\r\n" . "Content-length: " . 
strlen($pubkey) . "\r\n" . "Connection: close\r\n\r\n" . $pubkey . 
"\r\n";

          $result = $this->_connectKeyserver($cmd, $server, $timeout);

          if (is_a($result, 'PEAR_Error')) {

              return $result;



I hope I have fixed the right way.



Regards,



Vanner

Saved Queries