From aa36f6ae8bae13b75ba28761ed215f48333f06b9 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Mon, 16 Dec 2024 09:56:24 +0900 Subject: [PATCH] gpg: Fix key generation with existing key from card. * g10/keygen.c (ask_algo): Fix condition. Continue the loop when failure. -- Fixes-commit: e7891225788ab5f6d050a06643b1f488c227771f GnuPG-bug-id: 7309, 7457 Signed-off-by: NIIBE Yutaka --- g10/keygen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g10/keygen.c b/g10/keygen.c index a0cfb5c83..ad5acbedc 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -2784,7 +2784,7 @@ ask_algo (ctrl_t ctrl, int addmode, int *r_subkey_algo, unsigned int *r_usage, if (!keyref) continue; - if (!agent_scd_readkey (ctrl, keyref, &s_pkey, NULL)) + if (agent_scd_readkey (ctrl, keyref, &s_pkey, NULL)) continue; algostr = pubkey_algo_string (s_pkey, &algoid);