aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keylist.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2015-08-06 07:44:03 +0000
committerNIIBE Yutaka <[email protected]>2015-08-06 07:51:14 +0000
commita6e40530898622fbc5d76557a7da5e69368ecaa4 (patch)
tree8af5b8614faee43779d970cb63a14734416953d7 /g10/keylist.c
parentscd: Fix ecc_oid. (diff)
downloadgnupg-a6e40530898622fbc5d76557a7da5e69368ecaa4.tar.gz
gnupg-a6e40530898622fbc5d76557a7da5e69368ecaa4.zip
common: extend API of openpgp_oid_to_curve for canonical name.
* common/openpgp-oid.c (openpgp_oid_to_curve): Add CANON argument. * common/util.h: Update. * g10/import.c (transfer_secret_keys): Follow the change. * g10/keyid.c (pubkey_string): Likewise. * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Likewise. * parse-packet.c (parse_key): Likewise. * scd/app-openpgp.c (send_key_attr, get_public_key): Likewise. -- Change the function so that caller can select canonical name of curve or name for printing. Suggested by wk.
Diffstat (limited to 'g10/keylist.c')
-rw-r--r--g10/keylist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/g10/keylist.c b/g10/keylist.c
index d81e7dd8b..b43165f2f 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -1091,7 +1091,7 @@ list_keyblock_print (KBNODE keyblock, int secret, int fpr,
|| pk2->pubkey_algo == PUBKEY_ALGO_ECDH)
{
char *curve = openpgp_oid_to_str (pk2->pkey[0]);
- const char *name = openpgp_oid_to_curve (curve);
+ const char *name = openpgp_oid_to_curve (curve, 0);
if (!name)
name = curve;
es_fprintf (es_stdout, " %s", name);
@@ -1358,7 +1358,7 @@ list_keyblock_colon (KBNODE keyblock, int secret, int has_secret, int fpr)
|| pk->pubkey_algo == PUBKEY_ALGO_ECDH)
{
char *curve = openpgp_oid_to_str (pk->pkey[0]);
- const char *name = openpgp_oid_to_curve (curve);
+ const char *name = openpgp_oid_to_curve (curve, 0);
if (!name)
name = curve;
es_fputs (name, es_stdout);
@@ -1487,7 +1487,7 @@ list_keyblock_colon (KBNODE keyblock, int secret, int has_secret, int fpr)
|| pk->pubkey_algo == PUBKEY_ALGO_ECDH)
{
char *curve = openpgp_oid_to_str (pk->pkey[0]);
- const char *name = openpgp_oid_to_curve (curve);
+ const char *name = openpgp_oid_to_curve (curve, 0);
if (!name)
name = curve;
es_fputs (name, es_stdout);