mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
gpg: Mark experimental algorithms in the key listing.
* g10/keylist.c (list_keyblock_print): Remove duplicate curve name. Print a note for experimental algorithms. * g10/misc.c (print_pubkey_algo_note): Fix warning message.
This commit is contained in:
parent
8fee6c1ce6
commit
09055aa0f7
@ -1,6 +1,7 @@
|
||||
/* keylist.c - Print information about OpenPGP keys
|
||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
* 2008, 2010, 2012 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2013, 2014 Werner Koch
|
||||
*
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
@ -822,18 +823,6 @@ list_keyblock_print (KBNODE keyblock, int secret, int fpr, void *opaque)
|
||||
pubkey_string (pk, pkstrbuf, sizeof pkstrbuf),
|
||||
keystr_from_pk (pk), datestr_from_pk (pk));
|
||||
|
||||
if (pk->pubkey_algo == PUBKEY_ALGO_ECDSA
|
||||
|| pk->pubkey_algo == PUBKEY_ALGO_EDDSA
|
||||
|| pk->pubkey_algo == PUBKEY_ALGO_ECDH)
|
||||
{
|
||||
char *curve = openpgp_oid_to_str (pk->pkey[0]);
|
||||
const char *name = openpgp_oid_to_curve (curve);
|
||||
if (!*name || *name == '?')
|
||||
name = curve;
|
||||
es_fprintf (es_stdout, " %s", name);
|
||||
xfree (curve);
|
||||
}
|
||||
|
||||
if (pk->flags.revoked)
|
||||
{
|
||||
es_fprintf (es_stdout, " [");
|
||||
@ -863,6 +852,9 @@ list_keyblock_print (KBNODE keyblock, int secret, int fpr, void *opaque)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pk->pubkey_algo >= 100)
|
||||
es_fprintf (es_stdout, " [experimental algorithm %d]", pk->pubkey_algo);
|
||||
|
||||
es_fprintf (es_stdout, "\n");
|
||||
|
||||
if (fpr)
|
||||
|
@ -299,10 +299,10 @@ print_pubkey_algo_note (pubkey_algo_t algo)
|
||||
{
|
||||
warn=1;
|
||||
log_info (_("WARNING: using experimental public key algorithm %s\n"),
|
||||
openpgp_cipher_algo_name (algo));
|
||||
openpgp_pk_algo_name (algo));
|
||||
}
|
||||
}
|
||||
else if (algo == 20)
|
||||
else if (algo == PUBKEY_ALGO_ELGAMAL)
|
||||
{
|
||||
log_info (_("WARNING: Elgamal sign+encrypt keys are deprecated\n"));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user