aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--g10/parse-packet.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index 041db2cae..003143768 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -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);