aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app-openpgp.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 /scd/app-openpgp.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 'scd/app-openpgp.c')
-rw-r--r--scd/app-openpgp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index 07fbf7474..62ec710bb 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -1494,7 +1494,7 @@ ecdh_params (const char *curve)
{
unsigned int nbits;
- openpgp_curve_to_oid (curve, &nbits);
+ openpgp_curve_to_oid (curve, &nbits, NULL);
/* See RFC-6637 for those constants.
0x03: Number of bytes
@@ -1535,7 +1535,7 @@ ecc_read_pubkey (app_t app, ctrl_t ctrl, u32 created_at, int keyno,
}
curve = app->app_local->keyattr[keyno].ecc.curve;
- oidstr = openpgp_curve_to_oid (curve, NULL);
+ oidstr = openpgp_curve_to_oid (curve, NULL, NULL);
err = openpgp_oid_from_str (oidstr, &oid);
if (err)
return err;
@@ -3608,7 +3608,7 @@ change_keyattr_from_string (app_t app, ctrl_t ctrl,
const unsigned char *oidbuf;
size_t oid_len;
- oidstr = openpgp_curve_to_oid (string+n, NULL);
+ oidstr = openpgp_curve_to_oid (string+n, NULL, NULL);
if (!oidstr)
{
err = gpg_error (GPG_ERR_INV_DATA);
@@ -4115,7 +4115,7 @@ ecc_writekey (app_t app, ctrl_t ctrl,
else
algo = PUBKEY_ALGO_ECDSA;
- oidstr = openpgp_curve_to_oid (curve, NULL);
+ oidstr = openpgp_curve_to_oid (curve, NULL, NULL);
err = openpgp_oid_from_str (oidstr, &oid);
if (err)
goto leave;