diff options
author | Werner Koch <[email protected]> | 2023-11-07 19:07:45 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2023-11-07 19:38:27 +0000 |
commit | 387ee7dcbd77d19687af967901ed4818cbdb8b3c (patch) | |
tree | 3fc63cd303b2d07454794064e4e6528df2dbf42c /sm/encrypt.c | |
parent | doc: Use the em dash to mark a break in a sentence. (diff) | |
parent | w32: Use utf8 for the asctimestamp function. (diff) | |
download | gnupg-387ee7dcbd77d19687af967901ed4818cbdb8b3c.tar.gz gnupg-387ee7dcbd77d19687af967901ed4818cbdb8b3c.zip |
Merge branch 'STABLE-BRANCH-2-4'
* common/b64dec.c (b64decode): Move to ...
* common/miscellaneous.c: here.
* common/t-b64.c: Re-inroduce and keep only the b64decode test code.
Diffstat (limited to 'sm/encrypt.c')
-rw-r--r-- | sm/encrypt.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sm/encrypt.c b/sm/encrypt.c index 923fdfd99..9113028db 100644 --- a/sm/encrypt.c +++ b/sm/encrypt.c @@ -749,11 +749,12 @@ gpgsm_encrypt (ctrl_t ctrl, certlist_t recplist, estream_t data_fp, unsigned char *encval; unsigned int nbits; int pk_algo; + char *curve = NULL; /* Check compliance. */ - pk_algo = gpgsm_get_key_algo_info (cl->cert, &nbits); + pk_algo = gpgsm_get_key_algo_info (cl->cert, &nbits, &curve); if (!gnupg_pk_is_compliant (opt.compliance, pk_algo, 0, - NULL, nbits, NULL)) + NULL, nbits, curve)) { char kidstr[10+1]; @@ -768,9 +769,12 @@ gpgsm_encrypt (ctrl_t ctrl, certlist_t recplist, estream_t data_fp, /* Fixme: When adding ECC we need to provide the curvename and * the key to gnupg_pk_is_compliant. */ if (compliant - && !gnupg_pk_is_compliant (CO_DE_VS, pk_algo, 0, NULL, nbits, NULL)) + && !gnupg_pk_is_compliant (CO_DE_VS, pk_algo, 0, NULL, nbits, curve)) compliant = 0; + xfree (curve); + curve = NULL; + rc = encrypt_dek (dek, cl->cert, pk_algo, &encval); if (rc) { |