mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-23 10:29:58 +01:00
ecc-sos: Fix parsing key for EdDSA/ECDH.
* g10/parse-packet.c (parse_key): Read by sos_read. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
ed4c1e213a
commit
a9b31fc3e4
@ -2591,7 +2591,11 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
|
||||
else
|
||||
{
|
||||
unsigned int n = pktlen;
|
||||
pk->pkey[i] = mpi_read (inp, &n, 0);
|
||||
if (algorithm == PUBKEY_ALGO_EDDSA
|
||||
|| algorithm == PUBKEY_ALGO_ECDH)
|
||||
pk->pkey[i] = sos_read (inp, &n, 0);
|
||||
else
|
||||
pk->pkey[i] = mpi_read (inp, &n, 0);
|
||||
pktlen -= n;
|
||||
if (!pk->pkey[i])
|
||||
err = gpg_error (GPG_ERR_INV_PACKET);
|
||||
|
Loading…
x
Reference in New Issue
Block a user