mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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.
This commit is contained in:
parent
d088d2c816
commit
a6e4053089
7 changed files with 13 additions and 13 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue