Fix 256-colours-match-xterm, based on 256colres.pl from xterm-205.
Largely untested -- may not even compile on Windows.


git-svn-id: svn://svn.tartarus.org/sgt@6393 cda61777-01e9-0310-a592-d414129be87e
Tweak to r6392: spell "MAC" thus.


git-svn-id: svn://svn.tartarus.org/sgt@6399 cda61777-01e9-0310-a592-d414129be87e
Comment explaining back->sendok() semantics from Simon.


git-svn-id: svn://svn.tartarus.org/sgt@6428 cda61777-01e9-0310-a592-d414129be87e
Fix an error I introduced into SSH packet logging in r5642: some outgoing
packets over about 256 bytes would be logged with 12 bytes of preceding
garbage. (But the rest of the packet was logged in its entirety. This
holds for packets where (int(len/256)%2)==1, with an appropriate fudge
factor applied to `len'.) Ahem.


git-svn-id: svn://svn.tartarus.org/sgt@6429 cda61777-01e9-0310-a592-d414129be87e
Add ability for ssh2_userkey_loadpub() to return the key comment.
(Not actually used currently, but it makes life easier for a patch I'm
working on.)


git-svn-id: svn://svn.tartarus.org/sgt@6433 cda61777-01e9-0310-a592-d414129be87e
Allow rsakey_pubblob() to return the key comment.
(like r6433 but for SSH-1)


git-svn-id: svn://svn.tartarus.org/sgt@6434 cda61777-01e9-0310-a592-d414129be87e
Fixes to make r6434 actually useful.


git-svn-id: svn://svn.tartarus.org/sgt@6435 cda61777-01e9-0310-a592-d414129be87e
In Unix PuTTYgen, existing SSH-1 key comments were coming out as "(null)"
for operations not performing decryption (e.g., "puttygen rsa1.ppk -L")
(A use for r6434 -- wasn't expecting that.)


git-svn-id: svn://svn.tartarus.org/sgt@6436 cda61777-01e9-0310-a592-d414129be87e
Revamp SSH authentication code so that user interaction is more
abstracted out; replace loops structured around a single interaction
per loop with less tortuous code (fixes: `ki-multiprompt-crash',
`ssh1-bad-passphrase-crash'; makes `ssh2-password-expiry' and
`proxy-password-prompt' easier).

The new interaction abstraction has a lot of fields that are unused in
the current code (things like window captions); this is groundwork for
`gui-auth'. However, ssh.c still writes directly to stderr; that may
want to be fixed.

In the GUI apps, user interaction is moved to terminal.c. This should
make it easier to fix things like UTF-8 username entry, although I
haven't attempted to do so. Also, control character filtering can be
tailored to be appropriate for individual front-ends; so far I don't
promise anything other than not having made it any worse.

I've tried to test this fairly exhaustively (although Mac stuff is
untested, as usual). It all seems to basically work, but I bet there
are new bugs. (One I know about is that you can no longer make the
PuTTY window go away with a ^D at the password prompt; this should be
fixed.)


git-svn-id: svn://svn.tartarus.org/sgt@6437 cda61777-01e9-0310-a592-d414129be87e
(do_ssh2_authconn_state).method is redundant since r6437; remove.
Remove FIXMEs from .type assignments, as they look fine.


git-svn-id: svn://svn.tartarus.org/sgt@6442 cda61777-01e9-0310-a592-d414129be87e
When a userpass interaction has finished, make sure the 'prompts' structure
is safe for re-use.


git-svn-id: svn://svn.tartarus.org/sgt@6444 cda61777-01e9-0310-a592-d414129be87e
Fix for `ssh2-password-expiry'. Success case tested.
(Much easier since r6437, and actually works to boot.)


git-svn-id: svn://svn.tartarus.org/sgt@6445 cda61777-01e9-0310-a592-d414129be87e
Placate a compiler warning introduced in r6437.
(I forgot we usually compile with -Werror on Unix, oops.)


git-svn-id: svn://svn.tartarus.org/sgt@6446 cda61777-01e9-0310-a592-d414129be87e
Fix minor hiccup in SSH-1 p-k auth.


git-svn-id: svn://svn.tartarus.org/sgt@6447 cda61777-01e9-0310-a592-d414129be87e
I broke the ability to cope with multiple consecutive k-i INFO_REQUESTS
in r6437. This ought to be better (but I can't test that case).


git-svn-id: svn://svn.tartarus.org/sgt@6451 cda61777-01e9-0310-a592-d414129be87e
Oops, used \I where I meant \i. I think this is the only instance.


git-svn-id: svn://svn.tartarus.org/sgt@6454 cda61777-01e9-0310-a592-d414129be87e
r6437 broke the case where Pageant is running but contains no SSH-2 keys
that the SSH-2 server is happy with. Fixed, and since I'm here, fix
`pubkeyfile-and-pageant' as well (for SSH-1 and SSH-2).
Also, in SSH-2, we now reexamine "methods that can continue" for every
Pageant key offer, which is technically more correct although it seems
unlikely that it was causing any real problems.
(It's not entirely pretty, but neither was the old code. We could probably
do with some sort of abstraction for public/private keys to avoid carting
lots of fiddly bits of data around.)


git-svn-id: svn://svn.tartarus.org/sgt@6459 cda61777-01e9-0310-a592-d414129be87e
Missing close parenthesis.


git-svn-id: svn://svn.tartarus.org/sgt@6461 cda61777-01e9-0310-a592-d414129be87e
An MSVC version of the 16->32-bit bignum optimisation, derived from part of
a patch by Lionel Fourquaux. Seems to be about a factor of four improvement
(see wishlist item for details).
I don't claim to understand this in detail, so I can't vouch for its
correctness, but it didn't fall over immediately. It also produces some
compiler warnings, unfortunately.


git-svn-id: svn://svn.tartarus.org/sgt@6469 cda61777-01e9-0310-a592-d414129be87e
SSH-2 rekey bug compatibility setting wasn't being saved
(but _was_ being loaded).


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