aboutsummaryrefslogtreecommitdiffstats
path: root/g10/card-util.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-02-11 13:38:03 +0000
committerWerner Koch <[email protected]>2020-02-11 13:40:54 +0000
commit24095101a5069f15a9aea7512498ac436a76814a (patch)
tree58b6e8f20ed4332599cba202003c52062d800b70 /g10/card-util.c
parentdoc: Improve the warning section of the gpg man page. (diff)
downloadgnupg-24095101a5069f15a9aea7512498ac436a76814a.tar.gz
gnupg-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 'g10/card-util.c')
-rw-r--r--g10/card-util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/g10/card-util.c b/g10/card-util.c
index cb4dbe5e1..843abd823 100644
--- a/g10/card-util.c
+++ b/g10/card-util.c
@@ -632,7 +632,8 @@ current_card_status (ctrl_t ctrl, estream_t fp,
if (info.key_attr[i].curve)
{
const char *oid;
- oid = openpgp_curve_to_oid (info.key_attr[i].curve, NULL);
+ oid = openpgp_curve_to_oid (info.key_attr[i].curve,
+ NULL, NULL);
if (oid)
curve_for_print = openpgp_oid_to_curve (oid, 0);
}
@@ -1545,7 +1546,7 @@ ask_card_keyattr (int keyno, const struct key_attr *current)
if (curve)
{
key_attr->algo = algo;
- oid_str = openpgp_curve_to_oid (curve, NULL);
+ oid_str = openpgp_curve_to_oid (curve, NULL, NULL);
key_attr->curve = openpgp_oid_to_curve (oid_str, 0);
}
else