#796712 gnupg2: Hangs when sending key to keyserver

#796712#5
Date:
2015-08-23 15:27:35 UTC
From:
To:
Hi!

When trying to send my GPG key to the keyserver network gpg2 just
hangs (no packages being sent at all according to tcpdump). gpg1
works just find and sends the key. Also gpg2 sends my other key
(83C5BAA3) just fine. Attached is a ascii-armored export of my key as
failing (so you still have a testcase if importing more signatures or
something makes it work again).

Thanks!

  Christoph

#796712#10
Date:
2015-08-24 08:43:01 UTC
From:
To:
Hi!

Your key is with 871k even longer than Zack's key and dirmngr chokes on
it.  Here is a patch:

From 84f4c8811fc5bdd78693c4dc289389a8337cc257 Mon Sep 17 00:00:00 2001
From: Werner Koch <wk@gnupg.org>
Date: Sun, 23 Aug 2015 21:16:39 +0200
Subject: [PATCH] dirmngr: Allow sending of Zack's key.

* dirmngr/server.c (MAX_KEYBLOCK_LENGTH): Increase to 1 MiB.

Signed-off-by: Werner Koch <wk@gnupg.org>
---
 dirmngr/server.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dirmngr/server.c b/dirmngr/server.c
index 1b7e9e9..5c142e8 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -59,8 +59,9 @@

 /* The same goes for OpenPGP keyblocks, but here we need to allow for
    much longer blocks; a 200k keyblock is not too unusual for keys
-   with a lot of signatures (e.g. 0x5b0358a2).  */
-#define MAX_KEYBLOCK_LENGTH (512*1024)
+   with a lot of signatures (e.g. 0x5b0358a2).  9C31503C6D866396 even
+   has 770 KiB as of 2015-08-23.  */
+#define MAX_KEYBLOCK_LENGTH (1024*1024)


 #define PARM_ERROR(t) assuan_set_error (ctx, \