u/mdw/putty
12 years agoSwitch to using automake for the Unix autoconfigured build.
simon [Sat, 23 Jul 2011 11:33:29 +0000 (11:33 +0000)]
Switch to using automake for the Unix autoconfigured build.

mkfiles.pl no longer generates a Makefile.in, but instead generates a
Makefile.am on which mkauto.sh runs automake. This means that the
autoconfigured makefile now does build-time dependency tracking (a
standard feature of automake-generated makefiles), and is generally
more like what Unix people will expect.

Some of the old-style make command-line settings (VER=-DRELEASE=foo,
XFLAGS=-DDEBUG) will still work; the COMPAT settings are better done
by autoconfiguration, and my habitual 'XFLAGS="-g -O0"' for an easily
debuggable build will actually not work any more because CFLAGS is
specified _after_ XFLAGS, so I should instead write 'make CFLAGS=-O0'
(-g is the default in automake, removed at 'make install' time).

The new makefile will automatically degrade into one that builds the
command-line tools only, in the case where GTK could not be found. In
principle, therefore, it should be an adequate replacement for _both_
the static Unix makefiles, Makefile.gtk and Makefile.ux. I haven't
actually retired those in this commit, but I'm pretty tempted.

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

12 years agoWhen we check for libX11 in the autoconf script, add it to $GTK_LIBS
simon [Wed, 20 Jul 2011 17:50:02 +0000 (17:50 +0000)]
When we check for libX11 in the autoconf script, add it to $GTK_LIBS
on success rather than to $LIBS, because it's only used in the GUI
tools and we don't want the command-line tools linked against it.

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

12 years agoFix 'Duplicate Session' on Windows, broken during the config revamp.
simon [Wed, 20 Jul 2011 15:55:07 +0000 (15:55 +0000)]
Fix 'Duplicate Session' on Windows, broken during the config revamp.

(In an embarrassingly silly way, too. No end of difficult stuff about
Conf serialisation done with great care and working just fine, and
then a trivial goof in using sscanf lets the whole lot down.)

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

12 years agoTrivial fix for assertion failure introduced by the config revamp.
simon [Tue, 19 Jul 2011 17:06:43 +0000 (17:06 +0000)]
Trivial fix for assertion failure introduced by the config revamp.
Spotted by Leonid Lisovskiy.

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

12 years agoMinor amendment to r9226: don't log GSSAPI failure in the Event Log
simon [Mon, 18 Jul 2011 18:09:36 +0000 (18:09 +0000)]
Minor amendment to r9226: don't log GSSAPI failure in the Event Log
twice. (Once in the GSSAPI code, once at the top of the main auth
loop. Removed the latter.)

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

12 years agoReinstate a missing invocation of the FONT_QUALITY macro which I
simon [Mon, 18 Jul 2011 18:04:39 +0000 (18:04 +0000)]
Reinstate a missing invocation of the FONT_QUALITY macro which I
accidentally removed in the big config revamp.

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

12 years agoFix a typo in r9214 that plausibly explains a resizing weirdness I had with
jacob [Sun, 17 Jul 2011 22:35:08 +0000 (22:35 +0000)]
Fix a typo in r9214 that plausibly explains a resizing weirdness I had with
today's snapshot on Windows.

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

12 years agoFix version reporting in Unix builds versioned by a specific svn
simon [Sun, 17 Jul 2011 22:17:53 +0000 (22:17 +0000)]
Fix version reporting in Unix builds versioned by a specific svn
revision ('Custom build r1234'). Those builds were passing
'-DSVN_REV=r1234' to version.c, instead of -DSVN_REV=1234 as they
should have, leading to silly run-time version messages such as
'plink: Custom build rr9226'.

To chop the r off the front of the revision string passed in, I've
used a bashism in mkunxarc.sh. I think this is an acceptable extra
dependency.

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

12 years ago--with-gtk-version option to configure, so you can explicitly tell it
simon [Sun, 17 Jul 2011 22:17:40 +0000 (22:17 +0000)]
--with-gtk-version option to configure, so you can explicitly tell it
which GTK version you want to build with if both are installed. Based
on a patch by Malcolm Smith, though somewhat modified.

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

12 years agoSupport for re-running autoconf in the absence of the autoconf macro
simon [Sun, 17 Jul 2011 22:17:30 +0000 (22:17 +0000)]
Support for re-running autoconf in the absence of the autoconf macro
files which provide auto-detection of GTK 1 and GTK 2. This makes it
easier for casual PuTTY developers to rerun autoconf for their own
purposes without having to install obscure extra packages. Obviously
the resulting configure script will not know how to detect whichever
version of GTK they didn't have support for, so it won't be product-
quality by my standards, but it should be good enough that they can
prepare unrelated patches to send to us.

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

12 years agoReorganise the logging and display of messages about SSH
simon [Sat, 16 Jul 2011 12:06:32 +0000 (12:06 +0000)]
Reorganise the logging and display of messages about SSH
authentication. We should now produce an Event Log entry for every
authentication attempted and every authentication failure; meanwhile,
messages in the PuTTY window will not be generated for the failure of
auth types unless we also announced in the PuTTY window that we were
trying them. (GSSAPI was getting the latter wrong, leading to spurious
'Access denied' for many users of 0.61.)

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

12 years agoMostly cosmetic change: don't claim to have found an SSH agent if
simon [Sat, 16 Jul 2011 12:03:14 +0000 (12:03 +0000)]
Mostly cosmetic change: don't claim to have found an SSH agent if
SSH_AUTH_SOCK is defined to the empty string. (Because a common way to
'unset' it is to run commands like 'SSH_AUTH_SOCK= putty -load thing'.)

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

12 years agoFix display of VT100 vertically-offset horizontal line characters
simon [Sat, 16 Jul 2011 11:13:00 +0000 (11:13 +0000)]
Fix display of VT100 vertically-offset horizontal line characters
(o,p,r,s). They are displayed in Windows by actually writing the
centred one (q) with a vertical offset, in case fonts don't have the
offset versions; this requires terminal.c to separate those characters
into distinct calls to do_text(). Unfortunately, it was only breaking
up a text-drawing call _before_ one of those characters, not after
one. Spotted by Robert de Bath.

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

12 years agoDon't delete everything under a string-subkeyed primary key by using a
simon [Fri, 15 Jul 2011 18:30:47 +0000 (18:30 +0000)]
Don't delete everything under a string-subkeyed primary key by using a
loop that fetches the next item using conf_get_str_strs and passing
the previous key as a parameter, because the previous key will have
been freed by the intervening conf_del_str_str. Instead, use the
technique of repeatedly using conf_get_str_nthstrkey with index 0 and
deleting what comes back, as PSCP and PSFTP do.

Spotted by Minefield with the aid of Jacob, or possibly vice versa.

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

12 years agoMissing free.
simon [Fri, 15 Jul 2011 18:21:30 +0000 (18:21 +0000)]
Missing free.

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

12 years agoconf_copy_into must empty the entire target conf before filling it
simon [Fri, 15 Jul 2011 18:18:28 +0000 (18:18 +0000)]
conf_copy_into must empty the entire target conf before filling it
with the entries from the source one, otherwise add234 will keep
failing ("this key already exists"). Completely broke Plink, ahem.

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

12 years agoWhen doing manual underlining, underline the text in question rather than a box
jacob [Fri, 15 Jul 2011 16:03:06 +0000 (16:03 +0000)]
When doing manual underlining, underline the text in question rather than a box
to the right of it. Probably introduced sometime around r9063.

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

12 years agoPost-release destabilisation! Completely remove the struct type
simon [Thu, 14 Jul 2011 18:52:21 +0000 (18:52 +0000)]
Post-release destabilisation! Completely remove the struct type
'Config' in putty.h, which stores all PuTTY's settings and includes an
arbitrary length limit on every single one of those settings which is
stored in string form. In place of it is 'Conf', an opaque data type
everywhere outside the new file conf.c, which stores a list of (key,
value) pairs in which every key contains an integer identifying a
configuration setting, and for some of those integers the key also
contains extra parts (so that, for instance, CONF_environmt is a
string-to-string mapping). Everywhere that a Config was previously
used, a Conf is now; everywhere there was a Config structure copy,
conf_copy() is called; every lookup, adjustment, load and save
operation on a Config has been rewritten; and there's a mechanism for
serialising a Conf into a binary blob and back for use with Duplicate
Session.

User-visible effects of this change _should_ be minimal, though I
don't doubt I've introduced one or two bugs here and there which will
eventually be found. The _intended_ visible effects of this change are
that all arbitrary limits on configuration strings and lists (e.g.
limit on number of port forwardings) should now disappear; that list
boxes in the configuration will now be displayed in a sorted order
rather than the arbitrary order in which they were added to the list
(since the underlying data structure is now a sorted tree234 rather
than an ad-hoc comma-separated string); and one more specific change,
which is that local and dynamic port forwardings on the same port
number are now mutually exclusive in the configuration (putting 'D' in
the key rather than the value was a mistake in the first place).

One other reorganisation as a result of this is that I've moved all
the dialog.c standard handlers (dlg_stdeditbox_handler and friends)
out into config.c, because I can't really justify calling them generic
any more. When they took a pointer to an arbitrary structure type and
the offset of a field within that structure, they were independent of
whether that structure was a Config or something completely different,
but now they really do expect to talk to a Conf, which can _only_ be
used for PuTTY configuration, so I've renamed them all things like
conf_editbox_handler and moved them out of the nominally independent
dialog-box management module into the PuTTY-specific config.c.

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

12 years agoReadjust checklist, because actually the section on updating the
simon [Tue, 12 Jul 2011 19:59:15 +0000 (19:59 +0000)]
Readjust checklist, because actually the section on updating the
website _wasn't_ missing - I just looked straight past it somehow.
Fold the two versions together into one more complete than either.

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

12 years agoVarious updates to the release checklist:
simon [Tue, 12 Jul 2011 19:56:00 +0000 (19:56 +0000)]
Various updates to the release checklist:
 - for 'ixion' read 'atreus' throughout
 - the signature-checking commands needed minor modifications to cope
   with more *sums files
 - stated a few things explicitly which were previously implied, in
   case the next inter-release gap is also long enough for me to
   forget them.

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

12 years agoBump version number prior to tagging 0.61 release.
simon [Tue, 12 Jul 2011 18:26:18 +0000 (18:26 +0000)]
Bump version number prior to tagging 0.61 release.

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

12 years agoFix the _rest_ of the Windows compile warnings. (ahem)
simon [Tue, 12 Jul 2011 18:13:33 +0000 (18:13 +0000)]
Fix the _rest_ of the Windows compile warnings. (ahem)

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

12 years agoFix Windows compile warnings by adding explicit casts.
simon [Tue, 12 Jul 2011 18:09:46 +0000 (18:09 +0000)]
Fix Windows compile warnings by adding explicit casts.

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

12 years agoAdd a directory 'contrib/cygtermd', containing the source code for my
simon [Sun, 10 Jul 2011 14:22:32 +0000 (14:22 +0000)]
Add a directory 'contrib/cygtermd', containing the source code for my
hacky helper program to let PuTTY act as a local pterm-oid on
Cygwin-enabled Windows systems.

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

12 years agoGenerate some checksum files with more up-to-date hash functions than
simon [Sun, 10 Jul 2011 11:45:52 +0000 (11:45 +0000)]
Generate some checksum files with more up-to-date hash functions than
MD5. Shipped (and signed) alongside the existing 'md5sums' file.

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

12 years agoFix 'winadj-success': since at least one server (boks_sshd) blithely responds
jacob [Fri, 1 Jul 2011 21:53:41 +0000 (21:53 +0000)]
Fix 'winadj-success': since at least one server (boks_sshd) blithely responds
to "winadj@putty.projects.tartarus.org" with SSH_MSG_CHANNEL_SUCCESS despite
probably having no idea what it means, treat this just the same as
SSH_MSG_CHANNEL_FAILURE instead of killing the connection.
Tested only as far as making sure that winadj/FAILURE with a normal server
isn't _completely_ broken.

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

12 years agoRewrite gprefs() in settings.c so that its input mapping includes
simon [Sat, 25 Jun 2011 17:37:31 +0000 (17:37 +0000)]
Rewrite gprefs() in settings.c so that its input mapping includes
information about where to put items that aren't mentioned in the
saved configuration. So far the only nontrivial use I've made of this
facility is to default to placing KEX_RSA just above KEX_WARN in the
absence of any other information, which should fix
'ssh2-rsa-kex-pref'.

While I'm here I've rewritten wprefs() on general principles to remove
the needless length limit, since I was touching it anyway. The length
limit is still in gprefs (but I've lengthened it just in case).

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

12 years agoMake Pageant use the same SID-selection logic as the Pageant client
simon [Wed, 8 Jun 2011 20:47:07 +0000 (20:47 +0000)]
Make Pageant use the same SID-selection logic as the Pageant client
code (as introduced in r9043), so that it uses the user SID rather
than the default SID.

This does change the access-control model, in that a Pageant running
with administrator privilege will now serve keys to an unprivileged
PuTTY running as the same user who started Pageant. Owen and I think
this isn't a problem (in particular, it will still not serve keys to a
_different_ user).

More importantly, making the Pageant client and server code work the
same way means that PuTTY and Pageant can still talk to each other
when UAC is turned off, which we've had several reports of r9043
having broken.

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

12 years agoWhen we fail to get a response from Pageant, we should log the fact.
simon [Wed, 8 Jun 2011 20:39:06 +0000 (20:39 +0000)]
When we fail to get a response from Pageant, we should log the fact.
Currently, if the IPC exchange goes wrong, the Event Log just prints
"Pageant is running. Requesting keys." and then goes on to the next
step without ever saying what happened.

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

13 years agoFixes (mostly from Colin Watson, a couple redone by me) to make Unix
simon [Sat, 7 May 2011 10:57:19 +0000 (10:57 +0000)]
Fixes (mostly from Colin Watson, a couple redone by me) to make Unix
PuTTY compile cleanly under gcc 4.6.0 without triggering any of its
new warnings.

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

13 years agoThe documentation was still claiming that we don't support x11-auth.
jacob [Fri, 8 Apr 2011 15:52:02 +0000 (15:52 +0000)]
The documentation was still claiming that we don't support x11-auth.

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

13 years agoNote the possibility of a pause due to /dev/random blocking.
jacob [Wed, 9 Mar 2011 18:10:47 +0000 (18:10 +0000)]
Note the possibility of a pause due to /dev/random blocking.

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

13 years agoImplement zlib@openssh.com, using the rekey-after-userauth method suggested in
jacob [Fri, 4 Mar 2011 22:34:47 +0000 (22:34 +0000)]
Implement zlib@openssh.com, using the rekey-after-userauth method suggested in
the wishlist entry.

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

13 years agoColin Watson reports that gnome-session has been known to leave
simon [Wed, 2 Mar 2011 19:12:42 +0000 (19:12 +0000)]
Colin Watson reports that gnome-session has been known to leave
SIGPIPE ignored in its child processes, leading to unexpected
behaviour inside pterms. (The gnome-session I'm sitting in front of
doesn't seem to do this as far as I can tell, but I don't doubt there
are some that do.) Add SIGPIPE to the list of signals we reset to
default behaviour before launching pterm's child process.

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

13 years agoSet the 'must_close_session' flag at the end of close_session(), so
simon [Wed, 2 Mar 2011 18:52:03 +0000 (18:52 +0000)]
Set the 'must_close_session' flag at the end of close_session(), so
that we won't keep calling close_session() again the next time we go
round the message loop. Should fix unclean-close-hang. Thanks to Simon
Coleman for debugging.

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

13 years agoFix probably-harmless type mismatch in nogss.c (and #include "putty.h" to stop
jacob [Wed, 2 Mar 2011 00:18:03 +0000 (00:18 +0000)]
Fix probably-harmless type mismatch in nogss.c (and #include "putty.h" to stop
it happening again; this was spotted by GCC's "-flto" option).

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

13 years agoAdd some extra validation to zlib decompression (primarily to shut up a GCC 4.6
jacob [Tue, 1 Mar 2011 23:44:06 +0000 (23:44 +0000)]
Add some extra validation to zlib decompression (primarily to shut up a GCC 4.6
warning).

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

13 years agoAdd some "#ifdef OPTIMISE_SCROLL" scar tissue to placate GCC 4.6
jacob [Tue, 1 Mar 2011 23:10:16 +0000 (23:10 +0000)]
Add some "#ifdef OPTIMISE_SCROLL" scar tissue to placate GCC 4.6
-Wunused-but-set-variable.

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

13 years agoRemove an unused variable (should shut up a warning from GCC 4.6).
jacob [Tue, 1 Mar 2011 23:04:37 +0000 (23:04 +0000)]
Remove an unused variable (should shut up a warning from GCC 4.6).

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

13 years agoUse pid_t more consistently. Should shut up a warning from GCC 4.6, and may
jacob [Tue, 1 Mar 2011 23:00:32 +0000 (23:00 +0000)]
Use pid_t more consistently. Should shut up a warning from GCC 4.6, and may
conceivably help on platforms where int and pid_t aren't sufficiently similar.

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

13 years agoRejig the bottom-level loops in internal_mul_* to use pointers instead
simon [Tue, 22 Feb 2011 19:09:27 +0000 (19:09 +0000)]
Rejig the bottom-level loops in internal_mul_* to use pointers instead
of array indices. You'd hope that compilers could automatically turn
the one representation into the other if it was faster to do so, but
apparently not: even on gcc -O3, this source transformation gains over
15% performance.

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

13 years agoMake bignum.py self-contained, by importing versions of the two
simon [Tue, 22 Feb 2011 00:06:12 +0000 (00:06 +0000)]
Make bignum.py self-contained, by importing versions of the two
functions I was depending on from my personal Python maths utility
module.

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

13 years agoMove the malloc and free of scratch space out of the internal_mul
simon [Mon, 21 Feb 2011 19:47:28 +0000 (19:47 +0000)]
Move the malloc and free of scratch space out of the internal_mul
routines into their callers, where they'll be done once for a whole
modpow rather than many times within each multiply. Doesn't save much
time as far as I can see - perhaps a couple of percent, one second in
the minute it takes to run the new bignum test suite - but seems like
a sensible idea anyway on general principles.

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

13 years agosvn:ignore property mentioning 'bignum.txt', which is what I'm calling
simon [Sun, 20 Feb 2011 15:45:23 +0000 (15:45 +0000)]
svn:ignore property mentioning 'bignum.txt', which is what I'm calling
the output of bignum.py.

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

13 years agoA few more modpow tests, exercising the fallback option. This is
simon [Sun, 20 Feb 2011 15:42:44 +0000 (15:42 +0000)]
A few more modpow tests, exercising the fallback option. This is
mostly so I can valgrind both and make sure they free all their
workspace - a memory leak in this code would be not merely an
inconvenience but a security hazard.

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

13 years agoAdd tests of modpow.
simon [Sun, 20 Feb 2011 15:27:48 +0000 (15:27 +0000)]
Add tests of modpow.

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

13 years agoNearly forgot. Reinstate the original unoptimised modpow, as a
simon [Sun, 20 Feb 2011 15:14:02 +0000 (15:14 +0000)]
Nearly forgot. Reinstate the original unoptimised modpow, as a
fallback for when Montgomery is inapplicable.

(I may also at some point switch to using it for small exponents, if
speed testing should reveal that there's a noticeable threshold beyond
which preparing the Montgomery setup is uneconomical.)

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

13 years agoFix bug in Karatsuba multiplication, which affected propagation of a
simon [Sun, 20 Feb 2011 15:06:39 +0000 (15:06 +0000)]
Fix bug in Karatsuba multiplication, which affected propagation of a
carry by more than one word. Now the current set of test cases all
pass again.

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

13 years agoBeginnings of a test suite for the bignum code. The output of
simon [Sun, 20 Feb 2011 14:59:00 +0000 (14:59 +0000)]
Beginnings of a test suite for the bignum code. The output of
testdata/bignum.py is twice the size of the rest of the PuTTY source
put together, so I'm not checking it in.

This reveals bugs in the new multiplication code, which I have yet to
fix.

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

13 years agoPrompt for a remote username in rlogin connections, if one wasn't
simon [Fri, 18 Feb 2011 19:12:20 +0000 (19:12 +0000)]
Prompt for a remote username in rlogin connections, if one wasn't
specified in the configuration. Jacob's userpass abstraction proves
its worth in making this a trivial job.

(Actually reported by a user - somebody's still using rlogin!)

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

13 years agoImplement the Chinese Remainder Theorem optimisation for speeding up
simon [Fri, 18 Feb 2011 08:25:39 +0000 (08:25 +0000)]
Implement the Chinese Remainder Theorem optimisation for speeding up
RSA private key operations by making use of the fact that we know the
factors of the modulus.

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

13 years agoImplement the Montgomery technique for speeding up modular
simon [Fri, 18 Feb 2011 08:25:38 +0000 (08:25 +0000)]
Implement the Montgomery technique for speeding up modular
exponentiation by replacing the modulo operation by a cleverly chosen
multiplication. This was not worth doing in the previous state of the
code (because my multiply was about as slow as my modulo), but now
that multiplication has been sped up by the Karatsuba optimisation,
Montgomery becomes worthwhile.

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

13 years agoImplement the Karatsuba technique for recursive divide-and-conquer
simon [Fri, 18 Feb 2011 08:25:37 +0000 (08:25 +0000)]
Implement the Karatsuba technique for recursive divide-and-conquer
optimisation of large multiplies.

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

13 years agoAdd some appropriate bignum typedefs for generic 64-bit systems,
simon [Fri, 18 Feb 2011 08:25:36 +0000 (08:25 +0000)]
Add some appropriate bignum typedefs for generic 64-bit systems,
setting BignumInt to 32 bits. gcc defines _LP64 on x86-64 and
presumably on other 64-bit architectures, so I've conditioned my
defines on that in the hope that they won't need redoing for the next
few such architectures.

I've also added a set for _LLP64, but it's untested as yet.

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

13 years agoAllow setting the WM_CLASS X window property as a configuration option
simon [Sat, 15 Jan 2011 11:39:44 +0000 (11:39 +0000)]
Allow setting the WM_CLASS X window property as a configuration option
in saved sessions, so that a programmable window manager can
distinguish different PuTTYs/pterms on startup and assign them
different window management properties.

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

13 years agoTweak to r7635: when changing between protocols in the configuration dialog
jacob [Fri, 14 Jan 2011 19:57:00 +0000 (19:57 +0000)]
Tweak to r7635: when changing between protocols in the configuration dialog
and avoiding trashing a non-default port, don't treat a port of 0 as special;
this was causing defaults to "freeze in" for sequences of clicks like SSH,
Raw, Telnet.
Arrange that a port of 0 (which in a backend indicates no default) is displayed
as a blank in the port box, to make this less jarring.

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

13 years agoIt's a new year.
jacob [Wed, 5 Jan 2011 12:01:00 +0000 (12:01 +0000)]
It's a new year.

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

13 years agoRemove references to the now-dead Mac OS 9 port.
jacob [Wed, 5 Jan 2011 11:58:52 +0000 (11:58 +0000)]
Remove references to the now-dead Mac OS 9 port.

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

13 years agoWhen iterating over all channels for a dead SSH connection, don't miss out
jacob [Mon, 3 Jan 2011 16:50:41 +0000 (16:50 +0000)]
When iterating over all channels for a dead SSH connection, don't miss out
those in the CHAN_SOCKDATA_DORMANT state (i.e., local-to-remote forwardings
which the SSH server had not yet acknowledged).
Marcel Kilgus has been running with the ssh_do_close() patch for nearly two
years (*cough*) and reports that it has eliminated frequent
'unclean-close-crash' symptoms for him (due to the unclosed socket generating
a pfd_closing() which accessed freed memory), although I've not reproduced
that. The patch to ssh_free() is mine and not known to fix any symptoms.

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

13 years agoStop general_textout() from trying to slice up the input clipping
simon [Thu, 30 Dec 2010 00:06:43 +0000 (00:06 +0000)]
Stop general_textout() from trying to slice up the input clipping
rectangle into smaller ones: it doesn't work any more, since the new
variable-pitch code can now call general_textout() with a larger
clipping rectangle than the text it's meant to be displaying. Instead,
general_textout() now uses the same semantics as the next loop up in
do_text_internal(): the first piece of text it displays uses the
opacity setting passed in, which blanks the entire clipping rectangle
if necessary, and then subsequent overlays are non-opaque. And the
same clipping rectangle is used throughout.

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

13 years agoRationalise the mechanism in do_text_internal for providing the 'lpDx'
simon [Wed, 29 Dec 2010 23:48:54 +0000 (23:48 +0000)]
Rationalise the mechanism in do_text_internal for providing the 'lpDx'
array to ExtTextOut:
 - move it inside the new big loop (this should fix a potential bug
   whereby the DBCS handling altered some elements of it but the loop
   did not actually step along it)
 - initialise it more sensibly
 - rename it to lpDx rather than IpDx, since as far as I can tell the
   latter name was derived from a misreading of the former in the
   Windows API docs.

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

13 years agoMove some not-compiled-in debug code somewhere more useful.
jacob [Wed, 29 Dec 2010 22:38:36 +0000 (22:38 +0000)]
Move some not-compiled-in debug code somewhere more useful.

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

13 years agoFix segfault in general_textout with variable-pitch fonts: we can't
simon [Wed, 29 Dec 2010 16:00:58 +0000 (16:00 +0000)]
Fix segfault in general_textout with variable-pitch fonts: we can't
pass null lpDx, because general_textout depends on it being filled in.
Instead we null it out in the calls to subroutines _from_
general_textout.

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

13 years agoSupport for using variable-pitch fonts for the terminal on Windows.
simon [Wed, 29 Dec 2010 14:11:25 +0000 (14:11 +0000)]
Support for using variable-pitch fonts for the terminal on Windows.

Done in much the same way as it is in the GTK front end: the character
cell width is determined using the font's digits (which seems to give
generally not-too-offensive spacing in most cases, at the expense of
Ms and Ws typically overhanging a bit into adjacent cells) and each
character is centred in its cell. Overhangs never leave permanent
droppings on the window, because the existing work done in r5003
handles them just fine even in this stressful scenario.

There's a hacky new checkbox in the Appearance panel to make
variable-pitch fonts appear in the font selector (they still don't by
default, because I still think it's _usually_ not What You Want); the
checkbox state is not actually stored as part of a saved session, but
it should be automatically ticked when reloading a session that's got
a variable pitch font selected.

(I'm half-expecting a potential flurry of requests for this feature in
the wake of http://xkcd.com/840/ , so I thought I'd pre-empt them :-)

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

13 years agoVyacheslav Andrejev points out a heap management goof in the new jump
simon [Wed, 29 Dec 2010 13:35:44 +0000 (13:35 +0000)]
Vyacheslav Andrejev points out a heap management goof in the new jump
list code. Free the old value of the pointer variable we just
overwrote, not the new one!

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

13 years agoThou shalt not suffer a misplaced apostrophe to live.
simon [Wed, 29 Dec 2010 11:57:04 +0000 (11:57 +0000)]
Thou shalt not suffer a misplaced apostrophe to live.

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

13 years agoFix resize handling when enabling and disabling full-screen mode.
simon [Mon, 27 Dec 2010 12:58:39 +0000 (12:58 +0000)]
Fix resize handling when enabling and disabling full-screen mode.

I'm not sure whether I broke this in the recent revamp or whether it
was always broken, but: transitions in and out of full-screen mode
work by first maximising or restoring the window, which triggers a
WM_SIZE, whose handler then fiddles with the window style to disable
or re-enable all the furniture, which in turn triggers a recursive
WM_SIZE. The trouble is, after returning from the handler for the
inner WM_SIZE, the rest of the outer handler runs, and its client area
size is now out of date.

So I've added a flag which is set when a resize is handled 'properly',
so that after returning from the inner WM_SIZE handler the outer one
knows not to try to redo badly work that's already been done well.

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

13 years agoAdd an option to disable SSH-2 banners.
jacob [Mon, 27 Dec 2010 01:19:13 +0000 (01:19 +0000)]
Add an option to disable SSH-2 banners.

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

13 years agoFix up svn:eol-style and svn:keywords on new files.
jacob [Mon, 27 Dec 2010 00:24:48 +0000 (00:24 +0000)]
Fix up svn:eol-style and svn:keywords on new files.

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

13 years agoRemove a couple of unused variables.
jacob [Sun, 26 Dec 2010 23:23:11 +0000 (23:23 +0000)]
Remove a couple of unused variables.

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

13 years agoTry to delete jump lists in "-cleanup".
jacob [Sun, 26 Dec 2010 20:00:45 +0000 (20:00 +0000)]
Try to delete jump lists in "-cleanup".

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

13 years agoOptionally define PropVariantInit() locally to restore ability to build with
jacob [Sun, 26 Dec 2010 18:29:53 +0000 (18:29 +0000)]
Optionally define PropVariantInit() locally to restore ability to build with
MinGW after r9046, and munge the COMPTR() macro to remove a couple of warnings
with my MinGW GCC (3.4.5).

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

13 years agoDocument the behaviour of Alt in the "hybrid" resizing mode alluded to in
jacob [Thu, 23 Dec 2010 22:19:13 +0000 (22:19 +0000)]
Document the behaviour of Alt in the "hybrid" resizing mode alluded to in
r9045.

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

13 years agoSupport for Windows 7 jump lists (right-click on a program's taskbar
simon [Thu, 23 Dec 2010 17:32:28 +0000 (17:32 +0000)]
Support for Windows 7 jump lists (right-click on a program's taskbar
icon, even if the program isn't running at the time, to be presented
with an application-defined collection of helpful links). The current
jump list is updated every time a saved session is loaded, and shows
the last few launchable saved sessions (i.e. not those like Default
Settings) that were loaded. Also, if Pageant or PuTTYgen or both is in
the same directory as the PuTTY binary, the jump list will present
links to launch those too.

Based on a patch sent last year by Daniel B. Roy, though it's barely
recognisable any more...

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

13 years agoThe special treatment of Alt-resize (to cause resizing to affect the
simon [Thu, 23 Dec 2010 17:16:19 +0000 (17:16 +0000)]
The special treatment of Alt-resize (to cause resizing to affect the
font instead of the terminal size) should only be active in
RESIZE_EITHER mode - in RESIZE_TERM it is worse than useless.

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

13 years agoAnother fix to yesterday's window-resizing revamp: when restoring from
simon [Thu, 23 Dec 2010 15:44:20 +0000 (15:44 +0000)]
Another fix to yesterday's window-resizing revamp: when restoring from
maximised state, we must be sure to disable the window offset used to
centre the terminal in cases where the window is non-negotiably the
wrong size (e.g. maximised). Hence we must call reset_window after our
terminal resize.

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

13 years agoMore careful owner SID selection in the Pageant client code. This
simon [Thu, 23 Dec 2010 15:22:50 +0000 (15:22 +0000)]
More careful owner SID selection in the Pageant client code. This
should solve some of the SID-mismatch issues we've occasionally had
reported. Because it's a modification on the client side, it doesn't
affect the security of Pageant itself.

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

13 years agoPay attention to the width and height provided in WM_SIZE even when
simon [Wed, 22 Dec 2010 16:14:11 +0000 (16:14 +0000)]
Pay attention to the width and height provided in WM_SIZE even when
restoring a maximised window.

Failure to do this was noticeable in the following scenario (again
using Aero UI enhancements):
 1. resize window using topmost resize handle, and move pointer to top
    of screen which 'maximises' the window vertically
 2. now maximise the window properly using the maximise button in top
    right
 3. now restore. Notepad restores to its position before step 1,
    because Aero remembers that position for the purpose, but PuTTY
    thinks it knows better. Only now it doesn't any more.

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

13 years agoReorganise handling of WM_SIZE to fix two generality problems.
simon [Wed, 22 Dec 2010 15:49:33 +0000 (15:49 +0000)]
Reorganise handling of WM_SIZE to fix two generality problems.

Firstly, maximise and restore events were expected never to occur
during an interactive resize process (i.e. between WM_ENTERSIZEMOVE
and WM_EXITSIZEMOVE), but in fact Aero now allows this to happen if
you move the pointer to the top of the screen while dragging the
window.

Secondly, plain old WM_SIZE events were expected never to occur
_outside_ interactive resizes, but Aero permits that too (e.g.
Windows-left and Windows-right), and also third-party window
repositioning tools will send these.

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

13 years agoProtect against a (non-security-related) buffer overrun if PuTTY is
simon [Tue, 21 Dec 2010 10:11:32 +0000 (10:11 +0000)]
Protect against a (non-security-related) buffer overrun if PuTTY is
installed somewhere with an exceptionally long pathname.

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

13 years agoAdd an 'XLFLAGS' make variable to Makefile.vc, permitting user-
simon [Mon, 20 Dec 2010 13:04:34 +0000 (13:04 +0000)]
Add an 'XLFLAGS' make variable to Makefile.vc, permitting user-
supplied extra link flags. This makes it reasonably convenient to
compile for Visual Studio debugging: just build using

  nmake /f Makefile.vc XFLAGS="/Zi /Od" XLFLAGS="/debug"

then load the resulting executable into Visual Studio (using 'Open
Project' rather than 'Open File') and the debugger should be able to
access the source.

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

13 years agoAdd some more entries to svn:ignore to cope with stuff left by Visual
simon [Fri, 17 Dec 2010 13:42:52 +0000 (13:42 +0000)]
Add some more entries to svn:ignore to cope with stuff left by Visual
Studio 10. (Not that I think I'm about to migrate, but I've been
experimenting.)

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

13 years agoAdd more possible baud rates to the Unix serial backend. These are the
jacob [Wed, 8 Dec 2010 14:21:35 +0000 (14:21 +0000)]
Add more possible baud rates to the Unix serial backend. These are the
union of rates found in the termios.h of Linux 2.6.24 and "SunOS 5.6
Generic_105181-29 sun4u sparc SUNW,Ultra-4" machines. After a patch by
Thomas Bechtold.

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

13 years agoMore sensible (and also more idiomatic) bounds checking on esc_args.
simon [Tue, 7 Dec 2010 00:21:42 +0000 (00:21 +0000)]
More sensible (and also more idiomatic) bounds checking on esc_args.

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

13 years agoDavid Laight reports that sometimes reads on a serial port will
simon [Sat, 6 Nov 2010 17:22:38 +0000 (17:22 +0000)]
David Laight reports that sometimes reads on a serial port will
attempt to block, and hence return EAGAIN/EWOULDBLOCK, in spite of
the port having been reported readable by select(2). Don't treat
those errors as fatal.

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

13 years agoBah, r9008 caused an assertion failure on Windows due to a clash with the
jacob [Mon, 27 Sep 2010 11:33:40 +0000 (11:33 +0000)]
Bah, r9008 caused an assertion failure on Windows due to a clash with the
shortcuts for the preference list buttons. That'll teach me to only test the
Gtk version.

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

13 years agoAdd index terms for GSSAPI stuff. Mention GSSAPI in "use system username"
jacob [Sat, 25 Sep 2010 16:18:02 +0000 (16:18 +0000)]
Add index terms for GSSAPI stuff. Mention GSSAPI in "use system username"
section and other tweaks.

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

13 years agoSince GSSAPI is now on its own panel, we may as well have a full set of
jacob [Sat, 25 Sep 2010 15:51:14 +0000 (15:51 +0000)]
Since GSSAPI is now on its own panel, we may as well have a full set of
keyboard shortcuts.

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

13 years agoOops: r9004 should have removed various pieces from the Makefile and
simon [Sat, 25 Sep 2010 08:37:30 +0000 (08:37 +0000)]
Oops: r9004 should have removed various pieces from the Makefile and
header file setup too.

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

13 years agoRetire the old Mac Classic port directory! It's been unused for
simon [Sat, 25 Sep 2010 07:30:08 +0000 (07:30 +0000)]
Retire the old Mac Classic port directory! It's been unused for
ages, is increasingly irrelevant now that 'Mac' pretty much
universally means something running OS X, is probably bit-rotted
past usefulness already, and certainly will be after the next time
some major reengineering takes place.

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

13 years agoCleanups of the GSSAPI support. On Windows, standard GSS libraries
simon [Sat, 25 Sep 2010 07:16:56 +0000 (07:16 +0000)]
Cleanups of the GSSAPI support. On Windows, standard GSS libraries
are now loaded from standard locations (system32 for SSPI, the
registry-stored MIT KfW install location for KfW) rather than using
the risky default DLL search path; I've therefore also added an
option to manually specify a GSS DLL we haven't heard of (which
should in principle Just Work provided it supports proper GSS-API as
specified in the RFC). The same option exists on Unix too, because
it seemed like too useful an idea to reserve to Windows. In
addition, GSSAPI is now documented, and also (unfortunately) its GUI
configuration has been moved out into a sub-subpanel on the grounds
that it was too big to fit in Auth.

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

13 years agoUse the same key for both saving and loading the GSSAPI implementation
jacob [Wed, 15 Sep 2010 18:50:34 +0000 (18:50 +0000)]
Use the same key for both saving and loading the GSSAPI implementation
preference list. Spotted by Daniel Kessler.

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

13 years agoFix obvious braino in the Windows GSSAPI library display names.
simon [Mon, 13 Sep 2010 08:45:18 +0000 (08:45 +0000)]
Fix obvious braino in the Windows GSSAPI library display names.

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

13 years agoCreate, and use for all loads of system DLLs, a wrapper function
simon [Mon, 13 Sep 2010 08:29:45 +0000 (08:29 +0000)]
Create, and use for all loads of system DLLs, a wrapper function
called load_system32_dll() which constructs a full pathname for the
DLL using GetSystemDirectory.

The only DLL load not covered by this change is the one for
gssapi32.dll, because that one's not in the system32 directory.

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

13 years agoMissing close() causing resource leak when reading from /dev/random.
simon [Thu, 9 Sep 2010 14:36:46 +0000 (14:36 +0000)]
Missing close() causing resource leak when reading from /dev/random.

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

13 years agoRemove redundant check for NULL in sshfwd_close(). The thing we're
simon [Thu, 9 Sep 2010 14:35:16 +0000 (14:35 +0000)]
Remove redundant check for NULL in sshfwd_close(). The thing we're
testing against NULL has already been dereferenced by the time we
bother to test it, so it's a bit pointless - and in any case, no
null pointer can come to this function from any existing call site.

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

13 years agoCast incoming characters to unsigned char to avoid accidental sign
simon [Thu, 9 Sep 2010 14:32:25 +0000 (14:32 +0000)]
Cast incoming characters to unsigned char to avoid accidental sign
extension. Since ldisc_send() uses bit 8 as an internal flag, we
shouldn't be setting it except when we really want to.

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

13 years agoWhen we disconnect because we have no supported authentication
simon [Tue, 10 Aug 2010 18:45:51 +0000 (18:45 +0000)]
When we disconnect because we have no supported authentication
methods left to try, it's nice to have the version of that message
going to the client contain the list of methods sent by the server.
Saves a user having to pull it out of an SSH packet log.

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

13 years agoMass correction of svn:keywords and svn:eol-style properties.
simon [Tue, 10 Aug 2010 17:21:25 +0000 (17:21 +0000)]
Mass correction of svn:keywords and svn:eol-style properties.

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

13 years agoCancelling a remote port forwarding that had been refused by the server caused
jacob [Fri, 30 Jul 2010 20:47:03 +0000 (20:47 +0000)]
Cancelling a remote port forwarding that had been refused by the server caused
a double-free. Reported and diagnosed by Sven Schaepe.
Also fix a minor memory leak in ssh_free().

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