mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Fix --version output and explicitly disable ECC.
* g10/misc.c (openpgp_pk_algo_name): New. Replace all calls in g10/ to gcry_pk_algo_name by a call to this function. (map_pk_openpgp_to_gcry): Map algo PUBKEY_ALGO_ELGAMAL_E to GCRY_PK_ELG. (openpgp_pk_test_algo): Use PUBKEY_ALGO_ELGAMAL_E instead of GCRY_PK_ELG_E. Return an error for ECC algos. (openpgp_pk_test_algo2): Return an error for ECC algos. * g10/gpg.c (build_list): Avoid printing ECC two times. * include/cipher.h: Do not use GCRY_PK_* macros for PUBKEY_ALGO_*. -- Due to recent changes to adjust for use with Libgcrypt 1.6, "gpg --version" printed two question marks. This patches fixes that and also make sure that gpg does advertise any ECC features. The patch in build_list is not really needed. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
3544beff86
commit
6286d01ba3
11 changed files with 111 additions and 81 deletions
|
@ -854,8 +854,8 @@ my_strusage( int level )
|
|||
case 33: p = _("\nSupported algorithms:\n"); break;
|
||||
case 34:
|
||||
if (!pubkeys)
|
||||
pubkeys = build_list (_("Pubkey: "), 0,
|
||||
gcry_pk_algo_name,
|
||||
pubkeys = build_list (_("Pubkey: "), 'P',
|
||||
openpgp_pk_algo_name,
|
||||
openpgp_pk_test_algo );
|
||||
p = pubkeys;
|
||||
break;
|
||||
|
@ -906,6 +906,9 @@ build_list (const char *text, char letter,
|
|||
|
||||
for (i=0; i <= 110; i++ )
|
||||
{
|
||||
if (letter == 'P' && i == 19 )
|
||||
continue; /* No need to print a second "ECC" string. */
|
||||
|
||||
if (!chkf (i) && (s = mapf (i)))
|
||||
{
|
||||
if (mb.len - len > 60)
|
||||
|
@ -921,7 +924,7 @@ build_list (const char *text, char letter,
|
|||
put_membuf_str (&mb, text);
|
||||
|
||||
put_membuf_str (&mb, s);
|
||||
if (opt.verbose && letter)
|
||||
if (opt.verbose && letter && letter != 'P')
|
||||
{
|
||||
char num[20];
|
||||
snprintf (num, sizeof num, " (%c%d)", letter, i);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue