gpg: Accept also armored data from the WKD.
authorWerner Koch <wk@gnupg.org>
Thu, 11 Apr 2019 07:54:28 +0000 (09:54 +0200)
committerWerner Koch <wk@gnupg.org>
Thu, 11 Apr 2019 07:55:27 +0000 (09:55 +0200)
* 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>
g10/keyserver.c

index 66900f7..04802d1 100644 (file)
@@ -2051,8 +2051,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 ();