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

Fix assertion failure on ssh.com export of ECDSA.

It's a key type that format doesn't know how to handle, but that's no
excuse to fail an assertion - we have a perfectly good failure code we
can return from the export function, so we should use it.
This commit is contained in:
Simon Tatham 2018-06-03 15:38:06 +01:00
parent 869a0f5f71
commit 405800290d

View File

@ -2265,8 +2265,7 @@ int sshcom_write(const Filename *filename, struct ssh2_userkey *key,
initial_zero = 1;
type = "dl-modp{sign{dsa-nist-sha1},dh{plain}}";
} else {
assert(0); /* zoinks! */
exit(1); /* XXX: GCC doesn't understand assert() on some systems. */
goto error; /* unsupported key type */
}
outblob = strbuf_new();