From 0ec10fbd0d4007997cec59da9a514797bc0531a8 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 25 Apr 2023 13:47:49 +0900 Subject: [PATCH] gpg: Fix for overridden key import. * g10/import.c (do_transfer): Force the overridden key import even when smartcard is available. -- Fixes-commit: 2c1297055041b4657ea1a927acac978c2b09a483 GnuPG-bug-id: 3456 Signed-off-by: NIIBE Yutaka --- g10/import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g10/import.c b/g10/import.c index 7b46d8941..5e44942e7 100644 --- a/g10/import.c +++ b/g10/import.c @@ -2958,7 +2958,7 @@ do_transfer (ctrl_t ctrl, kbnode_t keyblock, PKT_public_key *pk, int force = 0; int already_exist = agent_probe_secret_key (ctrl, pk); - if (already_exist == 2) + if (already_exist == 2 || already_exist == 4) { if (!opt.quiet) log_info (_("key %s: card reference is overridden by key material\n"),