From 867e69187456b7b8a0c8d993d7d9c4963e15b0ca Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 20 Mar 2019 07:55:07 +0000 Subject: [PATCH] Fix crash when adding an ECDSA key to Pageant. The new_priv_openssh method for ECDSA keys was trying to initialise the key as if it was EdDSA, leading to an assertion failure at setup time. This is what I get for not having taken cryptsuite.py all the way to testing every top-level signature algorithm. --- sshecc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sshecc.c b/sshecc.c index 80965685..11c2ce07 100644 --- a/sshecc.c +++ b/sshecc.c @@ -796,12 +796,12 @@ static ssh_key *ecdsa_new_priv_openssh( get_string(src); - struct eddsa_key *ek = snew(struct eddsa_key); + struct ecdsa_key *ek = snew(struct ecdsa_key); ek->sshk.vt = alg; ek->curve = curve; ek->privateKey = NULL; - ek->publicKey = get_epoint(src, curve); + ek->publicKey = get_wpoint(src, curve); if (!ek->publicKey) { eddsa_freekey(&ek->sshk); return NULL;