1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-07 23:27:48 +02:00

Fix cmd_sigkey and agent_hybrid_kem_decap.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2024-03-19 16:52:26 +09:00
parent 68891bfc8b
commit c53abc8ffe
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054
2 changed files with 2 additions and 4 deletions

View File

@ -776,6 +776,7 @@ cmd_sigkey (assuan_context_t ctx, char *line)
int opt_another;
opt_another = has_option (line, "--another");
line = skip_options (line);
rc = parse_keygrip (ctx, line, opt_another? ctrl->keygrip1 : ctrl->keygrip);
if (rc)

View File

@ -241,7 +241,7 @@ agent_hybrid_kem_decap (ctrl_t ctrl, const char *desc_text, int kemid,
}
err = agent_key_from_file (ctrl, NULL, desc_text,
NULL, &shadow_info,
ctrl->keygrip1, &shadow_info,
CACHE_MODE_NORMAL, NULL, &s_skey1, NULL, NULL);
if (gpg_err_code (err) == GPG_ERR_NO_SECKEY)
no_shadow_info = 1;
@ -291,9 +291,6 @@ agent_hybrid_kem_decap (ctrl_t ctrl, const char *desc_text, int kemid,
ecc_ct = gcry_mpi_get_opaque (ecc_ct_mpi, &nbits);
ecc_ct_len = (nbits+7)/8;
/* Remove the 0x40 prefix*/
ecc_ct++;
ecc_ct_len--;
/*FIXME make sure the lengths are all correct. */
/*FIXME: check the internal of optional to determine the KEK-algo and KEKKEYLEN. */
err = gcry_kem_decap (GCRY_KEM_RAW_X25519,