diff options
author | Werner Koch <[email protected]> | 2023-11-08 16:09:04 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2023-11-08 16:09:22 +0000 |
commit | 3572b19fbd8f6eea1edcaa8f753a7c9654702bed (patch) | |
tree | 26e3bc1245f0171eb429862b22689d0ddd0c79fc /sm | |
parent | common: Declare two LibrePGP constants for future use (diff) | |
download | gnupg-3572b19fbd8f6eea1edcaa8f753a7c9654702bed.tar.gz gnupg-3572b19fbd8f6eea1edcaa8f753a7c9654702bed.zip |
gpgsm: Support ECDSA in de-vs mode.
* common/compliance.h (PK_ALGO_FLAG_ECC18): New.
* common/compliance.c (gnupg_pk_is_allowed): Implement.
* sm/decrypt.c (gpgsm_decrypt): Pass new flag.
* sm/sign.c (gpgsm_sign): Ditto.
* sm/verify.c (gpgsm_verify): Ditto.
--
GnuPG-bug-id: 6802
Diffstat (limited to 'sm')
-rw-r--r-- | sm/decrypt.c | 3 | ||||
-rw-r--r-- | sm/sign.c | 4 | ||||
-rw-r--r-- | sm/verify.c | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/sm/decrypt.c b/sm/decrypt.c index 787e2f5e6..6d63189b8 100644 --- a/sm/decrypt.c +++ b/sm/decrypt.c @@ -1318,7 +1318,8 @@ gpgsm_decrypt (ctrl_t ctrl, int in_fd, estream_t out_fp) /* Check compliance. */ if (!gnupg_pk_is_allowed (opt.compliance, PK_USE_DECRYPTION, - pk_algo, 0, NULL, nbits, curve)) + pk_algo, PK_ALGO_FLAG_ECC18, + NULL, nbits, curve)) { char kidstr[10+1]; @@ -835,8 +835,8 @@ gpgsm_sign (ctrl_t ctrl, certlist_t signerlist, goto leave; } - if (!gnupg_pk_is_allowed (opt.compliance, PK_USE_SIGNING, pk_algo, 0, - NULL, nbits, curve)) + if (!gnupg_pk_is_allowed (opt.compliance, PK_USE_SIGNING, pk_algo, + PK_ALGO_FLAG_ECC18, NULL, nbits, curve)) { char kidstr[10+1]; diff --git a/sm/verify.c b/sm/verify.c index 1f5c1d378..e83a24f44 100644 --- a/sm/verify.c +++ b/sm/verify.c @@ -503,6 +503,7 @@ gpgsm_verify (ctrl_t ctrl, int in_fd, int data_fd, estream_t out_fp) audit_log_i (ctrl->audit, AUDIT_DATA_HASH_ALGO, algo); /* Check compliance. */ + pkalgoflags |= PK_ALGO_FLAG_ECC18; if (! gnupg_pk_is_allowed (opt.compliance, PK_USE_VERIFICATION, pkalgo, pkalgoflags, NULL, nbits, pkcurve)) { |