diff options
author | NIIBE Yutaka <[email protected]> | 2015-08-06 07:44:03 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2015-08-06 07:51:14 +0000 |
commit | a6e40530898622fbc5d76557a7da5e69368ecaa4 (patch) | |
tree | 8af5b8614faee43779d970cb63a14734416953d7 /scd/app-openpgp.c | |
parent | scd: Fix ecc_oid. (diff) | |
download | gnupg-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 'scd/app-openpgp.c')
-rw-r--r-- | scd/app-openpgp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index cc9577383..637f6b19d 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -911,7 +911,7 @@ send_key_attr (ctrl_t ctrl, app_t app, const char *keyword, int keyno) keyno+1, app->app_local->keyattr[keyno].ecc.flags? PUBKEY_ALGO_EDDSA: (keyno==1? PUBKEY_ALGO_ECDH: PUBKEY_ALGO_ECDSA), - openpgp_oid_to_curve (app->app_local->keyattr[keyno].ecc.oid)); + openpgp_oid_to_curve (app->app_local->keyattr[keyno].ecc.oid, 0)); } else snprintf (buffer, sizeof buffer, "%d 0 0 UNKNOWN", keyno+1); @@ -1442,7 +1442,7 @@ get_public_key (app_t app, int keyno) format = "(public-key(ecc(curve%s)(flags eddsa)(q%b)))"; err = gcry_sexp_build (&s_pkey, NULL, format, - openpgp_oid_to_curve (app->app_local->keyattr[keyno].ecc.oid), + openpgp_oid_to_curve (app->app_local->keyattr[keyno].ecc.oid, 1), (int)mlen, mbuf); if (err) goto leave; |