gpg: Accept also armored data from the WKD.
authorWerner Koch <wk@gnupg.org>
Thu, 11 Apr 2019 07:54:28 +0000 (09:54 +0200)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 1 Jul 2022 16:06:43 +0000 (17:06 +0100)
* g10/keyserver.c (keyserver_import_wkd): Clear NO_ARMOR.
--

We may even adjust the specs to allow that.  It should not be a
problem for any OpenPGP implementation because armored keys are very
common and de-armoring code is de-facto a mandatory feature.

Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit dc4c7f65e32a0cddc075d06fa0132e099bcb6455)

Gbp-Pq: Topic from-2.2.16
Gbp-Pq: Name gpg-Accept-also-armored-data-from-the-WKD.patch

g10/keyserver.c

index 8509d831448feb88e80f7447294844e4a0611d5f..865e1e94b5c21c60fd7055352f7443b4aed7213c 100644 (file)
@@ -2072,8 +2072,9 @@ keyserver_import_wkd (ctrl_t ctrl, const char *name, int quick,
       int armor_status = opt.no_armor;
       import_filter_t save_filt;
 
-      /* Keys returned via WKD are in binary format. */
-      opt.no_armor = 1;
+      /* Keys returned via WKD are in binary format.  However, we
+       * relax that requirement and allow also for armored data.  */
+      opt.no_armor = 0;
       save_filt = save_and_clear_import_filter ();
       if (!save_filt)
         err = gpg_error_from_syserror ();