kbx: Don't put zero-byte for ECC.

* kbx/keybox-openpgp.c (parse_key): Only put zero for non-ECC.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-11-02 15:34:03 +09:00
parent 90c3d623ce
commit 8211d0bc3b
1 changed files with 18 additions and 17 deletions

View File

@ -369,7 +369,8 @@ parse_key (const unsigned char *data, size_t datalen,
/* Note: Starting here we need to jump to leave on error. */
/* Make sure the MPIs are unsigned. */
/* For non-ECC, make sure the MPIs are unsigned. */
if (!is_ecc)
for (i=0; i < npkey; i++)
{
if (!keyparm[i].len || (keyparm[i].mpi[0] & 0x80))