1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

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.
This commit is contained in:
Simon Tatham 2019-03-20 07:55:07 +00:00
parent 93c29b2277
commit 867e691874

View File

@ -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;