mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-23 15:07:03 +01:00
Fix cmd_sigkey and agent_hybrid_kem_decap.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
68891bfc8b
commit
c53abc8ffe
@ -776,6 +776,7 @@ cmd_sigkey (assuan_context_t ctx, char *line)
|
|||||||
int opt_another;
|
int opt_another;
|
||||||
|
|
||||||
opt_another = has_option (line, "--another");
|
opt_another = has_option (line, "--another");
|
||||||
|
line = skip_options (line);
|
||||||
|
|
||||||
rc = parse_keygrip (ctx, line, opt_another? ctrl->keygrip1 : ctrl->keygrip);
|
rc = parse_keygrip (ctx, line, opt_another? ctrl->keygrip1 : ctrl->keygrip);
|
||||||
if (rc)
|
if (rc)
|
||||||
|
@ -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,
|
err = agent_key_from_file (ctrl, NULL, desc_text,
|
||||||
NULL, &shadow_info,
|
ctrl->keygrip1, &shadow_info,
|
||||||
CACHE_MODE_NORMAL, NULL, &s_skey1, NULL, NULL);
|
CACHE_MODE_NORMAL, NULL, &s_skey1, NULL, NULL);
|
||||||
if (gpg_err_code (err) == GPG_ERR_NO_SECKEY)
|
if (gpg_err_code (err) == GPG_ERR_NO_SECKEY)
|
||||||
no_shadow_info = 1;
|
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 = gcry_mpi_get_opaque (ecc_ct_mpi, &nbits);
|
||||||
ecc_ct_len = (nbits+7)/8;
|
ecc_ct_len = (nbits+7)/8;
|
||||||
/* Remove the 0x40 prefix*/
|
|
||||||
ecc_ct++;
|
|
||||||
ecc_ct_len--;
|
|
||||||
/*FIXME make sure the lengths are all correct. */
|
/*FIXME make sure the lengths are all correct. */
|
||||||
/*FIXME: check the internal of optional to determine the KEK-algo and KEKKEYLEN. */
|
/*FIXME: check the internal of optional to determine the KEK-algo and KEKKEYLEN. */
|
||||||
err = gcry_kem_decap (GCRY_KEM_RAW_X25519,
|
err = gcry_kem_decap (GCRY_KEM_RAW_X25519,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user