1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-03-19 21:27:41 +01:00

gpg: Fix key generation with existing key from card.

* g10/keygen.c (ask_algo): Fix condition.  Continue the loop when
failure.

--

Fixes-commit: 6022f10da39e512b5b3fed3869fd6579d954090c
GnuPG-bug-id: 7309, 7457
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2024-12-16 09:56:24 +09:00 committed by Werner Koch
parent 4be25979a6
commit cc3efe9a73
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
2 changed files with 4 additions and 1 deletions

3
NEWS
View File

@ -4,6 +4,9 @@ Noteworthy changes in version 2.4.8 (unreleased)
* gpg: Fix a verification DoS due to a malicious subkey in the * gpg: Fix a verification DoS due to a malicious subkey in the
keyring. [T7527] keyring. [T7527]
* gpg: Fix a regression in 2.4.7 for generating a key from card.
[T7457]
Release-info: https://dev.gnupg.org/T7428 Release-info: https://dev.gnupg.org/T7428

View File

@ -2515,7 +2515,7 @@ ask_algo (ctrl_t ctrl, int addmode, int *r_subkey_algo, unsigned int *r_usage,
if (!keyref) if (!keyref)
continue; continue;
if (!agent_scd_readkey (ctrl, keyref, &s_pkey, NULL)) if (agent_scd_readkey (ctrl, keyref, &s_pkey, NULL))
continue; continue;
algostr = pubkey_algo_string (s_pkey, &algoid); algostr = pubkey_algo_string (s_pkey, &algoid);