u/mdw/putty
18 years agoSprinkle some header comments in various files in an attempt to explain what
jacob [Sun, 23 Apr 2006 18:26:03 +0000 (18:26 +0000)]
Sprinkle some header comments in various files in an attempt to explain what
they're for.

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

18 years agoPocketPuTTY website moved.
jacob [Sun, 16 Apr 2006 11:15:20 +0000 (11:15 +0000)]
PocketPuTTY website moved.

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

18 years agoEverywhere we print an fxp_error(), try to make it clear what we were trying
jacob [Thu, 13 Apr 2006 21:18:09 +0000 (21:18 +0000)]
Everywhere we print an fxp_error(), try to make it clear what we were trying
to do at the time.
(A lot of these say just "canonify:". This isn't a nice thing to show to a
user, but I don't believe canonify() will ever return failure due to a server
error, so users shouldn't actually see it, and it means we have a chance of
tracing it if reported.)

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

18 years agoRemove login name prompt from PSFTP.
jacob [Fri, 7 Apr 2006 21:42:30 +0000 (21:42 +0000)]
Remove login name prompt from PSFTP.
ssh.c will prompt for a login name as required, and doing so in psftp.c
before we've even made a connection is incorrect wrt `bypass-ssh2-userauth'.

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

18 years agoECCN / FIPS - we can't be arsed.
owen [Fri, 31 Mar 2006 09:26:59 +0000 (09:26 +0000)]
ECCN / FIPS - we can't be arsed.

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

18 years agoUpdate size when going from maximised to full screen.
owen [Wed, 29 Mar 2006 17:55:40 +0000 (17:55 +0000)]
Update size when going from maximised to full screen.

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

18 years agoExplicitly add linking to our website to the "asking permission for things"
jacob [Wed, 15 Mar 2006 14:31:39 +0000 (14:31 +0000)]
Explicitly add linking to our website to the "asking permission for things"
section.
Replace the FAQ text with a summary + link to feedback.but.

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

18 years agoFix minor memory leak.
jacob [Tue, 14 Mar 2006 22:01:27 +0000 (22:01 +0000)]
Fix minor memory leak.

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

18 years agoPageant docs didn't mention that you could load keys into an existing
jacob [Tue, 14 Mar 2006 11:21:59 +0000 (11:21 +0000)]
Pageant docs didn't mention that you could load keys into an existing
Pageant from the command line.

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

18 years agoEquivalent of r6583 window-border palette-change fix for Gtk.
jacob [Sun, 12 Mar 2006 22:17:46 +0000 (22:17 +0000)]
Equivalent of r6583 window-border palette-change fix for Gtk.

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

18 years agoDimitry Andric spotted that DH gex with SHA-256 was overflowing a buffer.
jacob [Sun, 12 Mar 2006 19:24:05 +0000 (19:24 +0000)]
Dimitry Andric spotted that DH gex with SHA-256 was overflowing a buffer.
Fixed, and added paranoia so that this shouldn't happen again.

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

18 years agoLog the hash used for DH kex (now there's a choice).
jacob [Sun, 12 Mar 2006 15:39:19 +0000 (15:39 +0000)]
Log the hash used for DH kex (now there's a choice).

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

18 years agoFix inadvertent O(N^2) loop within do_paint() which I just
simon [Sun, 12 Mar 2006 14:53:18 +0000 (14:53 +0000)]
Fix inadvertent O(N^2) loop within do_paint() which I just
discovered when profiling IPBT.

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

18 years agoFlesh out `-m' caveats slightly.
jacob [Wed, 8 Mar 2006 23:16:52 +0000 (23:16 +0000)]
Flesh out `-m' caveats slightly.

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

18 years agoOh, and update the docs for NetHack keypad mode too.
simon [Wed, 8 Mar 2006 18:15:16 +0000 (18:15 +0000)]
Oh, and update the docs for NetHack keypad mode too.

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

18 years agoDavid Damerell tells me I should be using Ctrl-hjklyubn rather than
simon [Wed, 8 Mar 2006 18:10:12 +0000 (18:10 +0000)]
David Damerell tells me I should be using Ctrl-hjklyubn rather than
Shift-hjklyubn for batch movement in NetHack, because they have
subtly different behaviour within the game and the Ctrl-moves are
more useful. Unfortunately, PuTTY's NetHack keypad mode doesn't
support Ctrl-moves. Therefore, it does now :-)

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

18 years agoFix a memory leak in key generation.
jacob [Mon, 27 Feb 2006 23:55:07 +0000 (23:55 +0000)]
Fix a memory leak in key generation.

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

18 years agoChange XXX-REMOVE-BEFORE-RELEASE to XXX-REVIEW-BEFORE-RELEASE to allow
jacob [Mon, 27 Feb 2006 22:30:38 +0000 (22:30 +0000)]
Change XXX-REMOVE-BEFORE-RELEASE to XXX-REVIEW-BEFORE-RELEASE to allow
more general changes to be queued up.

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

18 years agoBatch of miscellaneous tweaks to the Windows installer:
jacob [Mon, 27 Feb 2006 22:27:49 +0000 (22:27 +0000)]
Batch of miscellaneous tweaks to the Windows installer:
 - Now we've fixed `win-versioninfo', choose some sensible outcomes from
   the installer's comparisons of binary version numbers. Also, give the
   installer _itself_ a matching binary version.
   In particular, without this change, it would not have been possible
   to downgrade PuTTY -- it would have silently left the "newer" files in
   place. Now it will make some fuss, but permit it.
 - Also remove descriptions from shortcuts, on the grounds that the
   binaries have embedded descriptions now. (Although I've not checked
   whether those are actually visible in the Start Menu.)
 - At the request of various people (e.g., PJB), add flags so that if
   files are in use at the time the (un)installer is run, replacement is
   deferred to the next restart. (The user may be prompted to restart,
   which isn't ideal; see comments).
   This is supposed to make centrally-pushed silent upgrades more robust.
 - Note some limitations of the installer.

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

18 years agoAlain Guibert points out that palette changes weren't causing the space
jacob [Sat, 25 Feb 2006 14:13:46 +0000 (14:13 +0000)]
Alain Guibert points out that palette changes weren't causing the space
between the text area and the window border to be refreshed.
Fixed on Windows. Gtk still has a similar problem.

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

18 years agoDo proper select-for-write on ptys. Currently, pasting a
simon [Thu, 23 Feb 2006 13:38:44 +0000 (13:38 +0000)]
Do proper select-for-write on ptys. Currently, pasting a
sufficiently large string into pterm in any circumstances in which
it's echoed back to the terminal will cause a deadlock once the
pty's write buffer fills up.

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

18 years agoAlain Guibert points out that ESC]P sequences were erroneously
simon [Mon, 20 Feb 2006 19:54:17 +0000 (19:54 +0000)]
Alain Guibert points out that ESC]P sequences were erroneously
accepting 'G' as a hex digit. (The _first_ digit of the sequence
intentionally goes up further than F, but the remaining ones
shouldn't have.)

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

18 years agoDaniel Meidlinger points out a redundant test :-)
simon [Sun, 19 Feb 2006 22:37:31 +0000 (22:37 +0000)]
Daniel Meidlinger points out a redundant test :-)

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

18 years agoFix `restart-reset-terminal': terminal now restored to a sensible state when
jacob [Sun, 19 Feb 2006 14:59:48 +0000 (14:59 +0000)]
Fix `restart-reset-terminal': terminal now restored to a sensible state when
reusing a window to restart a session.

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

18 years agoAdd/tweak a couple of comments.
jacob [Sun, 19 Feb 2006 14:10:02 +0000 (14:10 +0000)]
Add/tweak a couple of comments.

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

18 years agoFix up documentation/usage messages for r6572.
jacob [Sun, 19 Feb 2006 12:52:28 +0000 (12:52 +0000)]
Fix up documentation/usage messages for r6572.

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

18 years agoIntroduce a new checkbox and command-line option to inhibit use of
simon [Sun, 19 Feb 2006 12:05:12 +0000 (12:05 +0000)]
Introduce a new checkbox and command-line option to inhibit use of
Pageant for local authentication. (This is a `don't use Pageant for
authentication at session startup' button rather than a `pretend
Pageant doesn't exist' button: that is, agent forwarding is
independent of this option.)

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

18 years agoAt last, a fix for `large-clipboard-crash'.
jacob [Sun, 19 Feb 2006 01:37:45 +0000 (01:37 +0000)]
At last, a fix for `large-clipboard-crash'.
A growable buffer was only being grown for actual text, not for newlines or
trailing NULs. A large run of empty lines could lead to newlines overflowing
the buffer (> 100 should be enough to guarantee this on all platforms, after
the initial 5k size of the buffer).

Also fix some valgrind in the same area (was probably harmless), and a memory
leak introduced by the RTF attribute pasting.

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

18 years agoPointer type correction in term_clrsb().
jacob [Sat, 18 Feb 2006 22:30:10 +0000 (22:30 +0000)]
Pointer type correction in term_clrsb().
(Harmless, as it happens.)

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

18 years agoTypo in r6555 spotted by Daniel Meidlinger.
jacob [Tue, 14 Feb 2006 13:14:08 +0000 (13:14 +0000)]
Typo in r6555 spotted by Daniel Meidlinger.

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

18 years agoRTF pasting now includes colours and style. Say so.
owen [Mon, 13 Feb 2006 22:25:59 +0000 (22:25 +0000)]
RTF pasting now includes colours and style.  Say so.

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

18 years agoPreserve more attributes of text copied as RTF. Thanks to Stephen Balousek.
owen [Mon, 13 Feb 2006 22:18:17 +0000 (22:18 +0000)]
Preserve more attributes of text copied as RTF.  Thanks to Stephen Balousek.

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

18 years agoDon Heap spotted that our heuristics for dealing with IPv6 literal addresses
jacob [Sat, 11 Feb 2006 19:10:01 +0000 (19:10 +0000)]
Don Heap spotted that our heuristics for dealing with IPv6 literal addresses
in the PSCP command line were bogus, giving "remote to remote not supported"
errors with filenames like '[].txt'. Made the heuristic less bogus.

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

18 years agoFailure to connect to a Unix-domain socket could cause a segfault. Fixed.
jacob [Sat, 11 Feb 2006 18:29:55 +0000 (18:29 +0000)]
Failure to connect to a Unix-domain socket could cause a segfault. Fixed.

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

18 years agoA zero-length return from platform_get_x_display() (for instance, a
jacob [Sat, 11 Feb 2006 18:00:23 +0000 (18:00 +0000)]
A zero-length return from platform_get_x_display() (for instance, a
zero-length DISPLAY variable in the environment) caused an assertion
failure when X11 forwarding was attempted. Fixed (now treated the same
as a NULL return, e.g., a non-existent DISPLAY variable).

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

18 years agoOops. Since r6546, old "Special Commands" menus weren't being deleted from the
jacob [Fri, 10 Feb 2006 20:57:40 +0000 (20:57 +0000)]
Oops. Since r6546, old "Special Commands" menus weren't being deleted from the
context menu, and they tended to pile up.

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

18 years agoUsers of Virtual Dimension are reporting that the "Close" menu item and
jacob [Thu, 9 Feb 2006 23:06:57 +0000 (23:06 +0000)]
Users of Virtual Dimension are reporting that the "Close" menu item and
button tend to get disabled on login.
After a suggestion by "Tkil", change the way we handle the specials menu
to be robust against the window menu being externally modified.

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

18 years agoSomewhat gruesome tweak to use SetClassLongPtr where available and degrade
jacob [Fri, 27 Jan 2006 20:49:59 +0000 (20:49 +0000)]
Somewhat gruesome tweak to use SetClassLongPtr where available and degrade
nicely elsewhere, which should fix `win64' _properly_.
Tested on recent-ish MinGW (with GetWindowLongPtr but not GetClassLongPtr),
and VC++ 6.0 with a recent SDK, but not with vanilla VC++.

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

18 years agoDon't explicitly open the logfile on startup; it'll automatically be opened
owen [Wed, 25 Jan 2006 22:46:33 +0000 (22:46 +0000)]
Don't explicitly open the logfile on startup; it'll automatically be opened
by logwrite() as necessary.  Should fix win-askappend-multi.

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

18 years agos/PuTTY/PuTTYgen/ in two places.
jacob [Tue, 24 Jan 2006 11:08:34 +0000 (11:08 +0000)]
s/PuTTY/PuTTYgen/ in two places.

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

18 years agoVC6 doesn't define LONG_PTR
owen [Wed, 11 Jan 2006 23:43:04 +0000 (23:43 +0000)]
VC6 doesn't define LONG_PTR

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

18 years agoConfigurable font quality on Windows. (Together with a little bit of
owen [Wed, 11 Jan 2006 23:42:02 +0000 (23:42 +0000)]
Configurable font quality on Windows.  (Together with a little bit of
macro stuff to cope with the inadequacy of VC++ 6 headers.)

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

18 years agoFix zero-rows-cols-crash
owen [Tue, 10 Jan 2006 20:02:22 +0000 (20:02 +0000)]
Fix zero-rows-cols-crash

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

18 years agoIt's a new year.
jacob [Sun, 8 Jan 2006 18:18:11 +0000 (18:18 +0000)]
It's a new year.

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

18 years agoUpdate status of this library wrt other variants.
jacob [Sun, 18 Dec 2005 17:05:21 +0000 (17:05 +0000)]
Update status of this library wrt other variants.

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

18 years agoCP866 is popular and small. Add it to both the general and PuTTY
jacob [Sun, 18 Dec 2005 16:57:00 +0000 (16:57 +0000)]
CP866 is popular and small. Add it to both the general and PuTTY
implementations of libcharset, since we've had at least one request for
it in PuTTY.

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

18 years agoMention compile-time directives and where they're documented.
jacob [Fri, 16 Dec 2005 16:43:28 +0000 (16:43 +0000)]
Mention compile-time directives and where they're documented.

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

18 years agoA few small changes to make the PuTTY source base more usable as a
simon [Fri, 9 Dec 2005 20:04:19 +0000 (20:04 +0000)]
A few small changes to make the PuTTY source base more usable as a
basis for other terminal-involving applications: a stub
implementation of the printing interface, an additional function in
notiming.c, and also I've renamed the front-end function beep() to
do_beep() so as not to clash with beep() in lib[n]curses.

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

18 years agoApparently some SSH servers object to our claiming port-forwarded connections
jacob [Wed, 7 Dec 2005 18:01:40 +0000 (18:01 +0000)]
Apparently some SSH servers object to our claiming port-forwarded connections
to be from IP "client-side-connection". Claiming "0.0.0.0" instead seems to
work. Spotted by Brant Thomsen.

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

18 years agoInstitutional failure to memset() things pointed at rather than pointers.
jacob [Wed, 7 Dec 2005 00:24:45 +0000 (00:24 +0000)]
Institutional failure to memset() things pointed at rather than pointers.
Things should now be zeroed and memory not leaked. Spotted by Brant Thomsen.

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

18 years agoImprovements from Spyros Blanas to the MSVC optimisations of r6469:
jacob [Tue, 6 Dec 2005 23:18:27 +0000 (23:18 +0000)]
Improvements from Spyros Blanas to the MSVC optimisations of r6469:
don't do a function call for each divmod, and don't rely on details of
the calling convention.
(This didn't actually make any measurable difference to runtime in any
of my tests, but we may as well keep it as it's neater.)
Also document some general caveats of the divmod macro.

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

18 years agoSSH-2 rekey bug compatibility setting wasn't being saved
jacob [Thu, 1 Dec 2005 16:41:49 +0000 (16:41 +0000)]
SSH-2 rekey bug compatibility setting wasn't being saved
(but _was_ being loaded).

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

18 years agoAn MSVC version of the 16->32-bit bignum optimisation, derived from part of
jacob [Wed, 23 Nov 2005 21:26:05 +0000 (21:26 +0000)]
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/putty@6469 cda61777-01e9-0310-a592-d414129be87e

18 years agoMissing close parenthesis.
jacob [Mon, 14 Nov 2005 09:41:42 +0000 (09:41 +0000)]
Missing close parenthesis.

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

18 years agor6437 broke the case where Pageant is running but contains no SSH-2 keys
jacob [Sun, 13 Nov 2005 16:06:41 +0000 (16:06 +0000)]
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/putty@6459 cda61777-01e9-0310-a592-d414129be87e

18 years agoOops, used \I where I meant \i. I think this is the only instance.
jacob [Sun, 13 Nov 2005 12:13:09 +0000 (12:13 +0000)]
Oops, used \I where I meant \i. I think this is the only instance.

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

18 years agoI broke the ability to cope with multiple consecutive k-i INFO_REQUESTS
jacob [Wed, 9 Nov 2005 23:19:33 +0000 (23:19 +0000)]
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/putty@6451 cda61777-01e9-0310-a592-d414129be87e

18 years agoFix minor hiccup in SSH-1 p-k auth.
jacob [Fri, 4 Nov 2005 23:31:11 +0000 (23:31 +0000)]
Fix minor hiccup in SSH-1 p-k auth.

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

18 years agoPlacate a compiler warning introduced in r6437.
jacob [Fri, 4 Nov 2005 23:21:42 +0000 (23:21 +0000)]
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/putty@6446 cda61777-01e9-0310-a592-d414129be87e

18 years agoFix for `ssh2-password-expiry'. Success case tested.
jacob [Fri, 4 Nov 2005 14:49:22 +0000 (14:49 +0000)]
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/putty@6445 cda61777-01e9-0310-a592-d414129be87e

18 years agoWhen a userpass interaction has finished, make sure the 'prompts' structure
jacob [Wed, 2 Nov 2005 23:15:43 +0000 (23:15 +0000)]
When a userpass interaction has finished, make sure the 'prompts' structure
is safe for re-use.

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

18 years ago(do_ssh2_authconn_state).method is redundant since r6427; remove.
jacob [Mon, 31 Oct 2005 22:43:51 +0000 (22:43 +0000)]
(do_ssh2_authconn_state).method is redundant since r6427; remove.
Remove FIXMEs from .type assignments, as they look fine.

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

18 years agoRevamp SSH authentication code so that user interaction is more
jacob [Sun, 30 Oct 2005 20:24:09 +0000 (20:24 +0000)]
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/putty@6437 cda61777-01e9-0310-a592-d414129be87e

18 years agoIn Unix PuTTYgen, existing SSH-1 key comments were coming out as "(null)"
jacob [Sun, 30 Oct 2005 19:13:43 +0000 (19:13 +0000)]
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/putty@6436 cda61777-01e9-0310-a592-d414129be87e

18 years agoFixes to make r6434 actually useful.
jacob [Sun, 30 Oct 2005 16:28:45 +0000 (16:28 +0000)]
Fixes to make r6434 actually useful.

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

18 years agoAllow rsakey_pubblob() to return the key comment.
jacob [Sun, 30 Oct 2005 15:16:42 +0000 (15:16 +0000)]
Allow rsakey_pubblob() to return the key comment.
(like r6433 but for SSH-1)

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

18 years agoAdd ability for ssh2_userkey_loadpub() to return the key comment.
jacob [Sun, 30 Oct 2005 13:42:36 +0000 (13:42 +0000)]
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/putty@6433 cda61777-01e9-0310-a592-d414129be87e

18 years agoFix an error I introduced into SSH packet logging in r5642: some outgoing
jacob [Wed, 26 Oct 2005 22:18:11 +0000 (22:18 +0000)]
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/putty@6429 cda61777-01e9-0310-a592-d414129be87e

18 years agoComment explaining back->sendok() semantics from Simon.
jacob [Wed, 26 Oct 2005 20:58:01 +0000 (20:58 +0000)]
Comment explaining back->sendok() semantics from Simon.

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

18 years agoTweak to r6392: spell "MAC" thus.
jacob [Thu, 13 Oct 2005 22:51:44 +0000 (22:51 +0000)]
Tweak to r6392: spell "MAC" thus.

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

18 years agoFix 256-colours-match-xterm, based on 256colres.pl from xterm-205.
ben [Thu, 13 Oct 2005 21:56:43 +0000 (21:56 +0000)]
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/putty@6393 cda61777-01e9-0310-a592-d414129be87e

18 years agoMake SSH_MSG_DISCONNECT reasons less scary (without removing useful content).
ben [Thu, 13 Oct 2005 21:51:38 +0000 (21:51 +0000)]
Make SSH_MSG_DISCONNECT reasons less scary (without removing useful content).

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

18 years agoFailed to call set_erase_char() after processing SCO colour sequences.
simon [Sat, 8 Oct 2005 09:09:50 +0000 (09:09 +0000)]
Failed to call set_erase_char() after processing SCO colour sequences.

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

18 years ago`win-versioninfo': all builds of all Windows binaries now contain
jacob [Tue, 4 Oct 2005 14:13:28 +0000 (14:13 +0000)]
`win-versioninfo': all builds of all Windows binaries now contain
a VERSIONINFO resource. The versioning scheme is described in
windows/version.rc2.

Some .rc files are now #included in others. In order to keep MSVC
project files working, these have been renamed to .rc2; there may exist
a better solution.

(This checkin also includes the documentation tweak missing from r6367.)

Testing performed:
 - MinGW (cross-compiler): works
 - VC nmake: works (tested with VC6)
 - VC project files: builds with VERSIONINFO resource (no VER variable though)
 - Borland: an old version of this patch was tested with it and more or
   less worked, except that some of the VERSIONINFO strings were apparently
   not terminated properly. Not attempted to work around this.
 - LCC: not tested. Some fixes are in there from the last time we tried
   this, but then the build ultimately failed and I haven't tried this
   since that was fixed.
 - Dev-C++: untested. (Haven't done anything special.)
 - Unix Gtk/autoconf Makefiles work as before.

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

18 years agoUTF-8 processing was discarding a valid character which interrupted
simon [Mon, 3 Oct 2005 11:38:30 +0000 (11:38 +0000)]
UTF-8 processing was discarding a valid character which interrupted
an otherwise legal sequence, if that valid character was the last
thing in a term_out() run. Spotted by Egmont Koblinger.

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

18 years agothinko
jacob [Mon, 3 Oct 2005 10:24:06 +0000 (10:24 +0000)]
thinko

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

18 years agoSplit out SVN_REV from SNAPSHOT define. This is to support `win-versioninfo',
jacob [Sat, 1 Oct 2005 12:36:46 +0000 (12:36 +0000)]
Split out SVN_REV from SNAPSHOT define. This is to support `win-versioninfo',
but since Simon's made the corresponding change to the build process, this bit
needs checking in now (it should be harmless).

(The documentation in Recipe is slightly out of date; with luck I'll be
checking in `win-versioninfo' changes soon, and I can't be bothered to
disentangle the relevant changes in the meantime.)

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

18 years agoA swathe of new FAQ questions, along the general theme of `will you
simon [Sat, 1 Oct 2005 11:40:26 +0000 (11:40 +0000)]
A swathe of new FAQ questions, along the general theme of `will you
sign something for us / give us assurances / give us indemnity'.

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

18 years agoMention SSH-2 rekeys in the keepalive section.
jacob [Fri, 30 Sep 2005 14:54:03 +0000 (14:54 +0000)]
Mention SSH-2 rekeys in the keepalive section.

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

18 years agoA first stab at guidance for those lost souls who email us asking for
jacob [Sat, 24 Sep 2005 18:33:06 +0000 (18:33 +0000)]
A first stab at guidance for those lost souls who email us asking for
login names and/or passwords. Feel free to hack.
(NB, renumbers a section of the FAQ.)

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

18 years agoAdd DEVCPP to svn:ignore.
jacob [Sat, 24 Sep 2005 16:17:30 +0000 (16:17 +0000)]
Add DEVCPP to svn:ignore.

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

18 years agodlg_listbox_select() now scrolls the list box to ensure that the
simon [Wed, 21 Sep 2005 17:09:07 +0000 (17:09 +0000)]
dlg_listbox_select() now scrolls the list box to ensure that the
item it's just selected is visible.

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

18 years agoPlatform-independent support for zooming around session list by typing
owen [Wed, 21 Sep 2005 14:53:32 +0000 (14:53 +0000)]
Platform-independent support for zooming around session list by typing
in the session name box.  Thwarted on Unix by GTK not automatically
scrolling the listbox to the selected item, but we can fix that in
the platform-specific side later.

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

18 years agoMention that sessions can be saved from "Change Settings" in using.but.
jacob [Mon, 19 Sep 2005 14:34:01 +0000 (14:34 +0000)]
Mention that sessions can be saved from "Change Settings" in using.but.

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

18 years agoAIX 5.1 has <utmpx.h> but no updwtmpx(). Treat the latter as a reason to
ben [Wed, 14 Sep 2005 11:00:34 +0000 (11:00 +0000)]
AIX 5.1 has <utmpx.h> but no updwtmpx().  Treat the latter as a reason to
OMIT_UTMP.  Reported by Mike Protts.

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

18 years agoSome systems (HP-UX) don't yet have <sys/select.h>, putting select() in
ben [Wed, 14 Sep 2005 10:53:39 +0000 (10:53 +0000)]
Some systems (HP-UX) don't yet have <sys/select.h>, putting select() in
<sys/time.h>.  Cope with this.  Where <sys/select.h> _is_ available, though,
use it (since it's where POSIX puts select()).  Problem reported by Mike
Protts.

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

18 years agoWhen asked to malloc zero bytes, malloc one byte instead. This ensures
ben [Tue, 13 Sep 2005 20:17:10 +0000 (20:17 +0000)]
When asked to malloc zero bytes, malloc one byte instead.  This ensures
that we get a unique pointer rather than NULL (which ANSI C otherwise permits).
Problem pointed out by Mike Protts.

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

18 years agoThe ANSI-C constant FILENAME_MAX is ludicrously small on some systems.
ben [Tue, 13 Sep 2005 20:08:25 +0000 (20:08 +0000)]
The ANSI-C constant FILENAME_MAX is ludicrously small on some systems.
Use the POSIX PATH_MAX if it exists, and fall back to 1024 otherwise.
We should really allocate filenames dynamically if PATH_MAX isn't defined.

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

18 years agoSome hosts don't have TIOCSCTTY. Don't try to use it on them.
ben [Tue, 13 Sep 2005 19:57:37 +0000 (19:57 +0000)]
Some hosts don't have TIOCSCTTY.  Don't try to use it on them.
Patch from Mike Protts.

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

18 years agoA couple of places in sk_newlistener were using AF_INET6 even with NO_IPV6.
ben [Tue, 13 Sep 2005 19:54:01 +0000 (19:54 +0000)]
A couple of places in sk_newlistener were using AF_INET6 even with NO_IPV6.
Correct them.

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

18 years agoNothing seems to use the "int64" type, and it apparently causes conflicts
ben [Tue, 13 Sep 2005 19:24:35 +0000 (19:24 +0000)]
Nothing seems to use the "int64" type, and it apparently causes conflicts
on some platform, so remove it.  Thanks to Mike Protts for spotting this.

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

18 years agoApparently the OS X port is stalled.
jacob [Tue, 13 Sep 2005 14:12:16 +0000 (14:12 +0000)]
Apparently the OS X port is stalled.

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

18 years agoWhen the first element in a preference list was unrecognised, PuTTY would
ben [Mon, 12 Sep 2005 15:45:29 +0000 (15:45 +0000)]
When the first element in a preference list was unrecognised, PuTTY would
hang when reading it because strtok() kept getting the full list passed in.
Fix this, and add an assert() for an assumption documented in a comment while
I'm in the area.

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

18 years agoMention relationship between terminal types, keyboard sequences, and
ben [Sat, 10 Sep 2005 17:36:52 +0000 (17:36 +0000)]
Mention relationship between terminal types, keyboard sequences, and
termcap/terminfo.  Suggested by Joachim Durchholz.

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

18 years agoImplement hmac-sha1-96. It's RECOMMENDED in the current transport draft,
ben [Sat, 10 Sep 2005 16:19:53 +0000 (16:19 +0000)]
Implement hmac-sha1-96.  It's RECOMMENDED in the current transport draft,
and we don't have any strong reason not to implement it, for all that it's
rather pointless.

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

18 years agoAdd support for diffie-hellman-group-exchange-sha256. Tested against a
ben [Sun, 4 Sep 2005 14:53:39 +0000 (14:53 +0000)]
Add support for diffie-hellman-group-exchange-sha256.  Tested against a
patched OpenSSH server.  This is controlled by the same user settings
as diffie-hellman-group-exchange-sha1, which may not be optimal, especially
given that they're both referred to as dh-gex-sha1 in saved sessions.

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

18 years agoMention xp-wont-run.
ben [Sat, 3 Sep 2005 17:29:28 +0000 (17:29 +0000)]
Mention xp-wont-run.

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

18 years agoNow that my arcfour-fixes draft has been approved by the IESG, use the
ben [Sat, 3 Sep 2005 17:03:49 +0000 (17:03 +0000)]
Now that my arcfour-fixes draft has been approved by the IESG, use the
IANA-assigned names for its modes.

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

18 years agoRestructure things so that a single entry in the KEX preference list can
ben [Sat, 3 Sep 2005 13:41:43 +0000 (13:41 +0000)]
Restructure things so that a single entry in the KEX preference list can
correspond to multiple SSH-2 KEX algorithms.  We already do the equivalent
for cipher algorithms.

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

18 years agoCheck ssh->v2_session_id_len _after_ assigning to it.
jacob [Fri, 2 Sep 2005 10:51:09 +0000 (10:51 +0000)]
Check ssh->v2_session_id_len _after_ assigning to it.

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