Reinstate a piece of code accidentally removed in r9214, where Windows
PuTTY does not trim a colon suffix off the hostname if it contains
_more than one_ colon. This allows IPv6 literals to be entered.

(Really we need to do a much bigger revamp of all uses of hostnames to
arrange that square-bracketed IPv6 literals work consistently, but
this at least removes a regression over 0.62.)


git-svn-id: svn://svn.tartarus.org/sgt/putty@9983 cda61777-01e9-0310-a592-d414129be87e
Sanitise freeing of DSA keys.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9984 cda61777-01e9-0310-a592-d414129be87e
Remove some redundant null-pointer checks from code that must have
been written before I wrote a never-failing snew.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9985 cda61777-01e9-0310-a592-d414129be87e
Validate newly created DSA keys more carefully. Don't want a structure
half-filled with null pointers.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9986 cda61777-01e9-0310-a592-d414129be87e
More consistently defend against division by zero with assertions. We
now check that all the modular functions (modpow, modinv, modmul,
bigdivmod) have zero moduli, and that modinv also has a nonzero thing
to try to invert.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9987 cda61777-01e9-0310-a592-d414129be87e
Another couple of memory leaks.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9988 cda61777-01e9-0310-a592-d414129be87e
Avoid trying to take the modular inverse of zero in response to a
sufficiently silly DSA signature.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9989 cda61777-01e9-0310-a592-d414129be87e
Make modinv able to return NULL if its inputs are not coprime, and
check for that return value everywhere it is used.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9990 cda61777-01e9-0310-a592-d414129be87e
Spot when we didn't successfully create an RSA public key from a
public blob, and return a proper error in that situation rather than a
struct with unhelpful NULLs in.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9991 cda61777-01e9-0310-a592-d414129be87e
Fix memory leaks in the new error return from modinv.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9992 cda61777-01e9-0310-a592-d414129be87e
Belatedly update the copyright year to 2013.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9993 cda61777-01e9-0310-a592-d414129be87e
Add some more precautionary assertions, just in case anything wildly
out of range manages to get past other recent fixes.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9995 cda61777-01e9-0310-a592-d414129be87e
The bignum code has two representations of zero, since
bn_restore_invariant (and the many loops that duplicate it) leaves a
single zero word in a bignum representing 0, whereas the constant
'Zero' does not have any data words at all. Cope with this in
bignum_cmp.

(It would be a better plan to decide on one representation and stick
with it, but this is the less disruptive fix for the moment.)


git-svn-id: svn://svn.tartarus.org/sgt/putty@9996 cda61777-01e9-0310-a592-d414129be87e
One more defensive assert, just to be sure.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9997 cda61777-01e9-0310-a592-d414129be87e
Bump version number prior to tagging 0.63.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9998 cda61777-01e9-0310-a592-d414129be87e