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)
committerWerner Koch <wk@gnupg.org>
Tue, 22 Jan 2019 09:06:15 +0000 (10:06 +0100)
commitf97dc55ff1b041071bc3cbe98aa761bf77bb7ac8
treec654e35ec3047853ffea2edcacd94578ad0f388b
parente6d613711a327d63511601dd42aeff34e09ec95a
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>
g10/misc.c