aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app-openpgp.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2023-11-23 15:01:58 +0000
committerWerner Koch <[email protected]>2023-11-23 15:01:58 +0000
commit4c456bf07508cb65f4937394afc1ee18f1fd2655 (patch)
tree199182a06c418c760e269a64b8886ff419f3f921 /scd/app-openpgp.c
parentagent: Update the key file only if changed (slight return). (diff)
downloadgnupg-4c456bf07508cb65f4937394afc1ee18f1fd2655.tar.gz
gnupg-4c456bf07508cb65f4937394afc1ee18f1fd2655.zip
scd:openpgp: Fallback to default ECDH params in writekey.
* scd/app-openpgp.c (ecc_writekey): Use default ECDH parameters and remove the now useless check. -- This seems to be better than bailing out. In almost all cases our standard parameters are used and if not, well, the fingerprint will be wrong. GnuPG-bug-id: 6378
Diffstat (limited to 'scd/app-openpgp.c')
-rw-r--r--scd/app-openpgp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index 014cd9395..3e77f8540 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -4733,9 +4733,11 @@ ecc_writekey (app_t app, ctrl_t ctrl,
if (algo == PUBKEY_ALGO_ECDH && !ecdh_param)
{
- log_error ("opgp: ecdh parameters missing\n");
- err = gpg_error (GPG_ERR_INV_VALUE);
- goto leave;
+ /* In case this is used by older clients we fallback to our
+ * default ecc parameters. */
+ log_info ("opgp: using default ecdh parameters\n");
+ ecdh_param = ecdh_params (curve);
+ ecdh_param_len = 4;
}
oidstr = openpgp_curve_to_oid (curve, &n, NULL);