(it would trigger if !type==RSA and !type==DSA, but one of those must
have been true to get there in the first place) and erroneous (it
would return NULL without going through the cleanup code). Since the
code's internal structure guarantees that path isn't reached, replace
it with an assert.
git-svn-id: http://svn.tartarus.org/sgt/putty@9924
cda61777-01e9-0310-a592-
d414129be87e
pos += put_mp(blob+pos, p.start, p.bytes);
pos += put_mp(blob+pos, u.start, u.bytes);
privlen = pos - publen;
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 {
+ assert(type == DSA); /* the only other option from the if above */
struct mpint_pos p, q, g, x, y;
int pos = 4;
if (GET_32BIT(ciphertext) != 0) {
struct mpint_pos p, q, g, x, y;
int pos = 4;
if (GET_32BIT(ciphertext) != 0) {
publen = pos;
pos += put_mp(blob+pos, x.start, x.bytes);
privlen = pos - publen;
publen = pos;
pos += put_mp(blob+pos, x.start, x.bytes);
privlen = pos - publen;
assert(privlen > 0); /* should have bombed by now if not */
assert(privlen > 0); /* should have bombed by now if not */