aboutsummaryrefslogtreecommitdiffstats
path: root/g10/import.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2015-07-08 06:05:06 +0000
committerNIIBE Yutaka <[email protected]>2015-07-08 06:05:06 +0000
commit5b46726931049e060d8fbfa879db7907078a9aed (patch)
tree112ddebf6dfa06cc9dae1c194d8a1dc711c4d39c /g10/import.c
parentdrop long-deprecated gpgsm-gencert.sh (diff)
downloadgnupg-5b46726931049e060d8fbfa879db7907078a9aed.tar.gz
gnupg-5b46726931049e060d8fbfa879db7907078a9aed.zip
g10: Use canonical name for curve.
* g10/import.c (transfer_secret_keys): Use canonical name. * common/openpgp-oid.c (openpgp_curve_to_oid): Return NULL on error. * g10/keyid.c (pubkey_string): Follow change of openpgp_curve_to_oid. * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Ditto. * g10/parse-packet.c (parse_key): Ditto.
Diffstat (limited to 'g10/import.c')
-rw-r--r--g10/import.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/g10/import.c b/g10/import.c
index de2252069..0a2ebcd46 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -1414,7 +1414,9 @@ transfer_secret_keys (ctrl_t ctrl, struct stats_s *stats, kbnode_t sec_keyblock,
err = gpg_error_from_syserror ();
else
{
- err = gcry_sexp_build (&curve, NULL, "(curve %s)", curvestr);
+ const char *curvename = openpgp_oid_to_curve (curvestr);
+ err = gcry_sexp_build (&curve, NULL, "(curve %s)",
+ curvename?curvename:curvestr);
xfree (curvestr);
if (!err)
{