aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/call-agent.c10
-rw-r--r--g10/card-util.c13
2 files changed, 13 insertions, 10 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c
index e7af001df..b17a80f11 100644
--- a/g10/call-agent.c
+++ b/g10/call-agent.c
@@ -624,15 +624,7 @@ learn_status_cb (void *opaque, const char *line)
parm->key_attr[keyno].nbits = strtoul (line+n+3, NULL, 10);
else if (algo == PUBKEY_ALGO_ECDH || algo == PUBKEY_ALGO_ECDSA
|| algo == PUBKEY_ALGO_EDDSA)
- {
- const char *curve;
-
- for (i = 0; (curve = openpgp_enum_curves (&i));)
- if (!strcmp (curve, line+n))
- break;
-
- parm->key_attr[keyno].curve = curve;
- }
+ parm->key_attr[keyno].curve = openpgp_is_curve_supported (line+n, NULL);
}
else if (keywordlen == 12 && !memcmp (keyword, "PRIVATE-DO-", 11)
&& strchr("1234", keyword[11]))
diff --git a/g10/card-util.c b/g10/card-util.c
index 2f3f7142e..b5fe84bb1 100644
--- a/g10/card-util.c
+++ b/g10/card-util.c
@@ -568,7 +568,18 @@ card_status (estream_t fp, char *serialno, size_t serialnobuflen)
else if (info.key_attr[i].algo == PUBKEY_ALGO_ECDH
|| info.key_attr[i].algo == PUBKEY_ALGO_ECDSA
|| info.key_attr[i].algo == PUBKEY_ALGO_EDDSA)
- tty_fprintf (fp, " %s", info.key_attr[i].curve);
+ {
+ const char *curve_for_print = "?";
+
+ if (info.key_attr[i].curve)
+ {
+ const char *oid;
+ oid = openpgp_curve_to_oid (info.key_attr[i].curve, NULL);
+ if (oid)
+ curve_for_print = openpgp_oid_to_curve (oid, 0);
+ }
+ tty_fprintf (fp, " %s", curve_for_print);
+ }
tty_fprintf (fp, "\n");
}
tty_fprintf (fp, "Max. PIN lengths .: %d %d %d\n",