From f0eb3586480c301b66657c7326b6546ef086c7f4 Mon Sep 17 00:00:00 2001
From: Kevin McCarthy <kevin@8t8.us>
Date: Mon, 31 Oct 2022 15:06:51 -0700
Subject: [PATCH] Fix public key block listing for old versions of gpgme.

Commit 382355a5 accidentally removed the data import for legacy mode,
which would cause it to produce empty output.
---
 crypt-gpgme.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/crypt-gpgme.c b/crypt-gpgme.c
index 5c3c0fe51669..bf120ab50fc2 100644
--- a/crypt-gpgme.c
+++ b/crypt-gpgme.c
@@ -2386,6 +2386,12 @@ static int pgp_gpgme_extract_keys (gpgme_data_t keydata, FILE** fp)
       dprint (1, (debugfile, "Error setting GPGME context home\n"));
       goto err_tmpdir;
     }
+
+    if ((err = gpgme_op_import (tmpctx, keydata)) != GPG_ERR_NO_ERROR)
+    {
+      dprint (1, (debugfile, "Error importing key\n"));
+      goto err_tmpdir;
+    }
   }
 
   tmpfile = mutt_buffer_pool_get ();
-- 
2.38.1

