diff options
| author | NIIBE Yutaka <[email protected]> | 2025-10-07 02:47:41 +0000 |
|---|---|---|
| committer | NIIBE Yutaka <[email protected]> | 2025-10-07 02:47:41 +0000 |
| commit | 035d0dd4adf345f3e9645545814944bc6041fdef (patch) | |
| tree | 8cb43b4831e2df69ffa44d90c8d1484453919c62 /sm/call-agent.c | |
| parent | gpgsm: Rearrange the cases for decryption. (diff) | |
| download | gnupg-035d0dd4adf345f3e9645545814944bc6041fdef.tar.gz gnupg-035d0dd4adf345f3e9645545814944bc6041fdef.zip | |
gpgsm: Use KEM API for decryption.
* sm/call-agent.c (gpgsm_agent_pkdecrypt): Add USE_KEM argument.
* sm/decrypt.c (ecdh_decrypt): Remove.
(determine_wrap_cipher, determine_hashalgo): New.
(build_shared_info, ecc_kem_pkdecrypt): New.
(prepare_decryption): Remove NBITS argument.
Call ecc_kem_pkdecrypt, when it's ECC.
(gpgsm_decrypt): Follow the removal of NBITS argument.
* sm/gpgsm.h (gpgsm_agent_pkdecrypt): Add USE_KEM argument.
--
GnuPG-bug-id: 7811
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'sm/call-agent.c')
| -rw-r--r-- | sm/call-agent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sm/call-agent.c b/sm/call-agent.c index 16fb10901..370cd8e30 100644 --- a/sm/call-agent.c +++ b/sm/call-agent.c @@ -554,7 +554,7 @@ inq_ciphertext_cb (void *opaque, const char *line) the hex string KEYGRIP. */ int gpgsm_agent_pkdecrypt (ctrl_t ctrl, const char *keygrip, const char *desc, - ksba_const_sexp_t ciphertext, + int use_kem, ksba_const_sexp_t ciphertext, char **r_buf, size_t *r_buflen ) { int rc; @@ -601,7 +601,7 @@ gpgsm_agent_pkdecrypt (ctrl_t ctrl, const char *keygrip, const char *desc, cipher_parm.ctx = agent_ctx; cipher_parm.ciphertext = ciphertext; cipher_parm.ciphertextlen = ciphertextlen; - rc = assuan_transact (agent_ctx, "PKDECRYPT", + rc = assuan_transact (agent_ctx, use_kem? "PKDECRYPT --kem=CMS": "PKDECRYPT", put_membuf_cb, &data, inq_ciphertext_cb, &cipher_parm, NULL, NULL); if (rc) |
