X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/038ec85e825fc940c1387f64a88ae73b75f6822b..f7aa4b367eaf2c1e928f97263bcf4da74680aff3:/import.c diff --git a/import.c b/import.c index d4b87bc7..32a1ac5d 100644 --- a/import.c +++ b/import.c @@ -1473,9 +1473,12 @@ struct ssh2_userkey *sshcom_read(const Filename *filename, char *passphrase, pos += put_mp(blob+pos, p.start, p.bytes); pos += put_mp(blob+pos, u.start, u.bytes); privlen = pos - publen; - } else if (type == DSA) { + } else { struct mpint_pos p, q, g, x, y; int pos = 4; + + assert(type == DSA); /* the only other option from the if above */ + if (GET_32BIT(ciphertext) != 0) { errmsg = "predefined DSA parameters not supported"; goto error; @@ -1500,8 +1503,7 @@ struct ssh2_userkey *sshcom_read(const Filename *filename, char *passphrase, publen = pos; pos += put_mp(blob+pos, x.start, x.bytes); privlen = pos - publen; - } else - return NULL; + } assert(privlen > 0); /* should have bombed by now if not */