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