gpg: Stop early when trying to create a primary Elgamal key.
authorWerner Koch <wk@gnupg.org>
Tue, 22 Jan 2019 09:06:15 +0000 (10:06 +0100)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 1 Jul 2022 16:06:43 +0000 (17:06 +0100)
commitab6623745cf93a59dcf8f9e18152b44819c97e03
treef455a78a0e2dd553659b76e03690a32eb9e7d232
parentbda82782633749ebce0c0dd0801dcb3327da4555
gpg: Stop early when trying to create a primary Elgamal key.

* g10/misc.c (openpgp_pk_test_algo2): Add extra check.
--

The problem is that --key-gen --batch with a parameter file didn't
detect that Elgamal is not capable of signing and so an error was only
triggered at the time the self-signature was created.  See the code
comment for details.

GnuPG-bug-id: 4329
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit f97dc55ff1b041071bc3cbe98aa761bf77bb7ac8)
(cherry picked from commit f5d3b982e44c5cfc60e9936020102a598b635187)

Gbp-Pq: Topic from-2.2.13
Gbp-Pq: Name gpg-Stop-early-when-trying-to-create-a-primary-Elgamal-ke.patch
g10/misc.c