summaryrefslogtreecommitdiffstats
path: root/scd/app-piv.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-02-11 14:38:03 +0100
committerWerner Koch <wk@gnupg.org>2020-02-11 14:40:54 +0100
commit24095101a5069f15a9aea7512498ac436a76814a (patch)
tree58b6e8f20ed4332599cba202003c52062d800b70 /scd/app-piv.c
parentdoc: Improve the warning section of the gpg man page. (diff)
downloadgnupg2-24095101a5069f15a9aea7512498ac436a76814a.tar.xz
gnupg2-24095101a5069f15a9aea7512498ac436a76814a.zip
common: Extend the openpgp_curve_to_oid function.
* common/openpgp-oid.c (openpgp_curve_to_oid): Add optional arg R_NBITS. Change all callers. -- In particular for ed25519 and cv25519 it is quite useful to have an ability to get the required algorithm.
Diffstat (limited to '')
-rw-r--r--scd/app-piv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/scd/app-piv.c b/scd/app-piv.c
index 1b3e2e75b..cefc9d997 100644
--- a/scd/app-piv.c
+++ b/scd/app-piv.c
@@ -2927,9 +2927,10 @@ writekey_ecc (app_t app, data_object_t dobj, int keyref,
name[toklen] = 0;
/* Canonicalize the curve name. We use the openpgp
* functions here because Libgcrypt has no generic curve
- * alias lookup feature and the PIV suppotred curves alre
+ * alias lookup feature and the PIV supported curves are
* also supported by OpenPGP. */
- xname = openpgp_oid_to_curve (openpgp_curve_to_oid (name, NULL), 0);
+ xname = openpgp_oid_to_curve (openpgp_curve_to_oid (name, NULL, NULL),
+ 0);
xfree (name);
if (xname && !strcmp (xname, "nistp256"))