u/mdw/putty
20 years agoAdded a command-line key generation tool. Currently builds and runs
simon [Thu, 22 Jan 2004 19:15:32 +0000 (19:15 +0000)]
Added a command-line key generation tool. Currently builds and runs
on Linux, but the (very few) platform-specific bits are already
abstracted out of the main code, so it should port to other
platforms with a minimum of fuss.

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

20 years agoPlacate some gcc warnings.
simon [Thu, 22 Jan 2004 18:52:49 +0000 (18:52 +0000)]
Placate some gcc warnings.

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

20 years agoFix a casting bug with the length-independent sshbn code.
simon [Thu, 22 Jan 2004 18:37:48 +0000 (18:37 +0000)]
Fix a casting bug with the length-independent sshbn code.

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

20 years agoBah! Nicolas Barry correctly points out that my async agent code
simon [Wed, 21 Jan 2004 21:11:03 +0000 (21:11 +0000)]
Bah! Nicolas Barry correctly points out that my async agent code
simply doesn't work - if multiple concurrent agent requests are
attempted, some of them will fail for no apparent reason. I assume
concurrent SendMessage() calls don't work in the Windows API, or
some such. So I'm commenting out the async code for the moment
(there wasn't a Windows Pageant that made helpful use of it anyway
yet) and returning to the drawing board.

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

20 years agoKaisuke Nakajima points out that it's unnecessary to translate
simon [Wed, 21 Jan 2004 20:59:20 +0000 (20:59 +0000)]
Kaisuke Nakajima points out that it's unnecessary to translate
negative font sizes (meaning pixels) into positive ones (points) in
winstore.c, since it gets done anyway at the point of font creation;
and removing the code in winstore.c means that the precise font
entered by the user is saved in the config, rather than being
rounded.

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

20 years agoDarryl L. Miles's patch to support an optional port number argument
simon [Wed, 21 Jan 2004 19:56:08 +0000 (19:56 +0000)]
Darryl L. Miles's patch to support an optional port number argument
on the PSFTP `open' command; it was arguably a bug that this command
couldn't do such an obvious thing that could be done from the main
command line. Also had to fix a NULL-dereference in do_sftp_cleanup
in the process.

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

20 years agoTheo Markettos's unsigned-vs-signed-char pedantry patch.
simon [Wed, 21 Jan 2004 19:45:44 +0000 (19:45 +0000)]
Theo Markettos's unsigned-vs-signed-char pedantry patch.

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

20 years agoTwo small memory leaks, also noticed by Martin Prikryl.
simon [Wed, 21 Jan 2004 19:41:34 +0000 (19:41 +0000)]
Two small memory leaks, also noticed by Martin Prikryl.

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

20 years agoMartin Prikryl points out that need_pw may be used uninitialised.
simon [Wed, 21 Jan 2004 19:33:48 +0000 (19:33 +0000)]
Martin Prikryl points out that need_pw may be used uninitialised.

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

20 years ago`What is PuTTY?' gets asked _just_ frequently enough to have finally
simon [Wed, 21 Jan 2004 17:11:55 +0000 (17:11 +0000)]
`What is PuTTY?' gets asked _just_ frequently enough to have finally
annoyed me.

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

20 years agoUpdate for latest mkfiles.pl kerfuffle
jacob [Tue, 20 Jan 2004 21:00:07 +0000 (21:00 +0000)]
Update for latest mkfiles.pl kerfuffle

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

20 years agoFix unterminated comments in previous checkin
jacob [Tue, 20 Jan 2004 20:42:43 +0000 (20:42 +0000)]
Fix unterminated comments in previous checkin

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

20 years agoOh, and mention lcc in the README.
simon [Tue, 20 Jan 2004 20:35:49 +0000 (20:35 +0000)]
Oh, and mention lcc in the README.

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

20 years agoAlexey Savelyev's mkfiles.pl patch to support lcc-win32. This has
simon [Tue, 20 Jan 2004 20:35:27 +0000 (20:35 +0000)]
Alexey Savelyev's mkfiles.pl patch to support lcc-win32. This has
caused a small amount of extra inconvenience at the tops of .rc
files, but it's been positive overall since lcc has managed to point
out some pedantic errors (typically static/extern mismatches between
function prototypes and definitions) which everything else missed.

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

20 years agoPaul van der Meij points out that do_reconfig() should not free
simon [Tue, 20 Jan 2004 19:46:00 +0000 (19:46 +0000)]
Paul van der Meij points out that do_reconfig() should not free
dp.errtitle, since it's also freed in dp_cleanup(). Minefield
agrees. Fixed.

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

20 years agoJosh Hill's patch for full-screen mode on a multi-monitor system:
simon [Tue, 20 Jan 2004 19:41:43 +0000 (19:41 +0000)]
Josh Hill's patch for full-screen mode on a multi-monitor system:
clicks in the top left of the window should not be detected by
comparing the coordinates with (0,0) since this won't work on
secondary monitors.

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

20 years agoMark Wutzke points out that the comment in sk_proxy_set_frozen()
simon [Tue, 20 Jan 2004 19:30:41 +0000 (19:30 +0000)]
Mark Wutzke points out that the comment in sk_proxy_set_frozen()
states that plug_receive() may recurse back into
sk_proxy_set_frozen() again. Therefore, bufchain_consume() should
have been called _before_ calling plug_receive(), to prevent an
infinite loop overflowing the stack. I can't immediately figure out
under what circumstances this might happen, but it seems an
obviously sensible precaution.

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

20 years ago`portfwd-loopback-choice' was not consistently documented.
jacob [Tue, 20 Jan 2004 12:46:36 +0000 (12:46 +0000)]
`portfwd-loopback-choice' was not consistently documented.
 - update usage info in tools
   - ack, plink is over 24 lines now
 - update man pages for Unix version
 - Doc changes:
   - move long description from (GUI) "config" to "using"
     - sorry if complete specification isn't what this section is meant for,
       but if you only read "using" it was hard to find.
   - ensure enough references to this made in other sections (GUI,
     command-line)
   - update instance of plink usage info

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

20 years agoIdiot me _twice_! The new store_host_key() was failing in the
simon [Mon, 19 Jan 2004 09:37:17 +0000 (09:37 +0000)]
Idiot me _twice_! The new store_host_key() was failing in the
absence of an existing host key file. Duhh.

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

20 years agoRe local X server auth, clarify that it's _us_ you should mail, and link
jacob [Mon, 19 Jan 2004 00:19:32 +0000 (00:19 +0000)]
Re local X server auth, clarify that it's _us_ you should mail, and link
to the Feedback section.

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

20 years agoMemory management fixes. Fixed a segfault in SSH1 compression
simon [Sun, 18 Jan 2004 09:14:41 +0000 (09:14 +0000)]
Memory management fixes. Fixed a segfault in SSH1 compression
cleanup noticed by Gerhard Wiesinger, and also fixed some memory
leaks spotted by valgrind while debugging same.

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

20 years agoOops, two lines moved out of my snapshot script should have been
simon [Sun, 18 Jan 2004 08:45:50 +0000 (08:45 +0000)]
Oops, two lines moved out of my snapshot script should have been
left there! Bah.

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

20 years agoVarious uninitialised-variable accesses picked up by valgrind.
simon [Sat, 17 Jan 2004 14:25:36 +0000 (14:25 +0000)]
Various uninitialised-variable accesses picked up by valgrind.

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

20 years agoBuilding source archives for previous releases has always been a
simon [Sat, 17 Jan 2004 14:17:21 +0000 (14:17 +0000)]
Building source archives for previous releases has always been a
fiddly process. Let's have a magic script designed to do it right.

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

20 years agoJoe Yates's patch to make mkfiles.pl generate Visual Studio project
simon [Sat, 17 Jan 2004 13:48:40 +0000 (13:48 +0000)]
Joe Yates's patch to make mkfiles.pl generate Visual Studio project
files as well as an nmake makefile. Needed line-end tweakery in
order to be able to generate usable project files when run on Unix,
but other than that appears fine. Ooh!

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

20 years agoSo _that's_ why mkfiles.pl was running so slowly on my Windows box!
simon [Sat, 17 Jan 2004 13:24:59 +0000 (13:24 +0000)]
So _that's_ why mkfiles.pl was running so slowly on my Windows box!
&findfile() now caches its results. At least one full order of
magnitude speedup when running on an SMB-mounted volume. Phew.

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

20 years agoIdiot me! store_host_key() was blindly _appending_ new host keys to
simon [Sat, 17 Jan 2004 13:00:18 +0000 (13:00 +0000)]
Idiot me! store_host_key() was blindly _appending_ new host keys to
the end of the host key file. This is perfectly all right if a host
key never changes, but it's completely useless if you need to
replace an existing entry. This version should do better.

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

20 years agoIt's a new year.
simon [Thu, 1 Jan 2004 16:47:55 +0000 (16:47 +0000)]
It's a new year.

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

20 years agoJoe Yates's memory leak patch was overenthusiastically freeing
simon [Thu, 1 Jan 2004 16:42:48 +0000 (16:42 +0000)]
Joe Yates's memory leak patch was overenthusiastically freeing
things; it called freebn on the DH gex values even if DH gex had not
taken place. Bug was trivially reproducible as a NULL-dereference
segfault by making any SSH2 connection with DH gex disabled. Should
now be fixed.

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

20 years agoD'oh! WideFont and WideBoldFont were being read from session files,
simon [Wed, 31 Dec 2003 16:09:55 +0000 (16:09 +0000)]
D'oh! WideFont and WideBoldFont were being read from session files,
but not written. I _thought_ something odd was happening with my
UTF-8 pterms.

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

20 years agoJoe Yates's memory leak patches.
simon [Fri, 19 Dec 2003 12:44:46 +0000 (12:44 +0000)]
Joe Yates's memory leak patches.

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

20 years agoAndy Hood points out that `#ifdef MONITOR_DEFAULTTONEAREST' would
simon [Tue, 16 Dec 2003 18:28:43 +0000 (18:28 +0000)]
Andy Hood points out that `#ifdef MONITOR_DEFAULTTONEAREST' would
benefit from _also_ being conditional on NO_MULTIMON not being
defined, to prevent the possibility of only half the multimon code
being included.

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

20 years agotweak for consistency with previous checkin
jacob [Thu, 4 Dec 2003 00:10:07 +0000 (00:10 +0000)]
tweak for consistency with previous checkin

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

20 years agoFix from Michael Wardle in bell error message
jacob [Wed, 3 Dec 2003 23:32:47 +0000 (23:32 +0000)]
Fix from Michael Wardle in bell error message

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

20 years agoSpotted by Tim Kosse: reput on an already complete file was hanging.
jacob [Wed, 3 Dec 2003 23:25:48 +0000 (23:25 +0000)]
Spotted by Tim Kosse: reput on an already complete file was hanging.
Should be fixed now (we only wait for packets if we know there are some
that haven't been replied to yet).

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

20 years agoAdd updating the wishlist to the Release checklist
jacob [Wed, 3 Dec 2003 22:49:32 +0000 (22:49 +0000)]
Add updating the wishlist to the Release checklist

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

20 years agofflush(stdout) after each line of stats
jacob [Wed, 3 Dec 2003 22:45:32 +0000 (22:45 +0000)]
fflush(stdout) after each line of stats

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

20 years agoFix for `logging-save-default': allow logging settings to be saved with
jacob [Wed, 3 Dec 2003 19:17:14 +0000 (19:17 +0000)]
Fix for `logging-save-default': allow logging settings to be saved with
Default Settings.

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

20 years agoI think the time has come for PuTTYgen to mention "authorized_keys" instead
jacob [Mon, 24 Nov 2003 13:40:58 +0000 (13:40 +0000)]
I think the time has come for PuTTYgen to mention "authorized_keys" instead
of "authorized_keys2" by default. I believe this change was made in OpenSSH
around June 2001, so any versions which it applies should have been replaced
by now for other reasons.
(The docs still adequately document the confusion surrounding this)

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

20 years agoTrivial braino in parsing of the port forwarding config data. Was
simon [Sat, 22 Nov 2003 14:50:57 +0000 (14:50 +0000)]
Trivial braino in parsing of the port forwarding config data. Was
causing all port forwardings after the first dynamic one to be
ignored.

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

20 years agoIntroduce a new mouse handling option, in which the right button
simon [Thu, 20 Nov 2003 18:41:12 +0000 (18:41 +0000)]
Introduce a new mouse handling option, in which the right button
brings up the context menu (and you can then paste by selecting
`Paste'). Should be more friendly to Windows-oriented users as
opposed to expatriate X users; also has the effect of making it more
difficult to paste into PuTTY by a single misplaced mouse click,
which has been a common theme of complaint recently.
For the moment, `Compromise' (the X-like behaviour with the right
and middle buttons reversed so that two-button users still get the
two most important functions) is still the default. I'm uncertain
that it might not be better to make the new option the default,
though, since the compromise option is optimal for _nobody_.

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

20 years agoMove the `translation of line drawing characters when pasting'
simon [Thu, 20 Nov 2003 18:33:22 +0000 (18:33 +0000)]
Move the `translation of line drawing characters when pasting'
option from the Selection panel to the Translation panel (where it
fits at least as well). This frees a line in the Selection panel
which I'm about to use for an additional mouse handling option.

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

20 years agoIntroduce a context menu which appears on Ctrl+rightclick. This menu
simon [Wed, 19 Nov 2003 20:48:30 +0000 (20:48 +0000)]
Introduce a context menu which appears on Ctrl+rightclick. This menu
contains all the stuff in the System menu except for the standard
System menu bits (move, resize, close etc), and also contains `Paste'.

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

20 years agoMake that last checkin more explicit, and in particular reference the
jacob [Wed, 19 Nov 2003 19:09:07 +0000 (19:09 +0000)]
Make that last checkin more explicit, and in particular reference the
"common errors" section of the documentation.

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

20 years agoSoften language in `faq-incorrect-mac': buggy ssh.com servers aren't the
jacob [Wed, 19 Nov 2003 19:03:24 +0000 (19:03 +0000)]
Soften language in `faq-incorrect-mac': buggy ssh.com servers aren't the
only possible reason for this message.

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

20 years agoI _think_ this should fix the problem reported by `Stacey': failure
simon [Wed, 19 Nov 2003 17:30:16 +0000 (17:30 +0000)]
I _think_ this should fix the problem reported by `Stacey': failure
to fclose a private key file.

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

20 years agoCosmetic fix from Daniel Fazekas: apparently we were failing to allow
jacob [Thu, 6 Nov 2003 14:17:56 +0000 (14:17 +0000)]
Cosmetic fix from Daniel Fazekas: apparently we were failing to allow
window-furniture in Playschool Windows be animated on mouse-over. This
fix also seems like the Right Thing to do. I've tried it and it seems
harmless enough on Win2K.

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

20 years agoWe now mention the version number on the Download page, so I'd
simon [Mon, 3 Nov 2003 13:59:46 +0000 (13:59 +0000)]
We now mention the version number on the Download page, so I'd
better remember to change it next time :-)

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

20 years agoClose the host keys file after use. Well spotted Theo Markettos.
simon [Fri, 31 Oct 2003 21:45:15 +0000 (21:45 +0000)]
Close the host keys file after use. Well spotted Theo Markettos.

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

20 years agoHmm, that relative link wasn't too good. Try a more helpful one.
simon [Thu, 30 Oct 2003 10:41:59 +0000 (10:41 +0000)]
Hmm, that relative link wasn't too good. Try a more helpful one.
Also add to the release checklist so that I'll remember to set this
up properly in the next set of release docs...

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

20 years agoMove the reference to sitestyle.css out into a separate .but file
simon [Thu, 30 Oct 2003 10:30:23 +0000 (10:30 +0000)]
Move the reference to sitestyle.css out into a separate .but file
which is only included if you explicitly tell the docs Makefile to
do so. Also make it a relative reference, while we're at it.

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

20 years agoFix usage comments
jacob [Tue, 21 Oct 2003 13:26:12 +0000 (13:26 +0000)]
Fix usage comments

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

20 years agoUpdate faq-pscp-ascii.
jacob [Wed, 15 Oct 2003 12:09:24 +0000 (12:09 +0000)]
Update faq-pscp-ascii.

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

20 years agoAdd `--unix' mode to generate ~/.putty/sshhostkeys from known_hosts.
jacob [Tue, 14 Oct 2003 23:23:28 +0000 (23:23 +0000)]
Add `--unix' mode to generate ~/.putty/sshhostkeys from known_hosts.
(should now be called `kh2putty.py')

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

20 years agoRemove dead comment about writing settings, and query one about reading them.
jacob [Tue, 14 Oct 2003 21:01:12 +0000 (21:01 +0000)]
Remove dead comment about writing settings, and query one about reading them.

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

20 years agoWe now have Unix ports of PSCP and PSFTP.
jacob [Tue, 14 Oct 2003 19:57:50 +0000 (19:57 +0000)]
We now have Unix ports of PSCP and PSFTP.

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

20 years agoActually fix winnet-if2lo, I think. Tested in an ad-hoc manner by
simon [Sun, 12 Oct 2003 14:12:54 +0000 (14:12 +0000)]
Actually fix winnet-if2lo, I think. Tested in an ad-hoc manner by
deliberately making a connection from nemesis's real IP address to
its loopback address; not tested in the original failing case of SMB.

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

20 years agoThe WinSock library is now loaded at run-time, which means we can
simon [Sun, 12 Oct 2003 13:46:12 +0000 (13:46 +0000)]
The WinSock library is now loaded at run-time, which means we can
attempt to load WS2 and then fall back to WS1 if that fails. This
should allow us to use WS2-specific functionality to find out the
local system's list of IP addresses, thus fixing winnet-if2lo, while
degrading gracefully back to the previous behaviour if that
functionality is unavailable. (I haven't yet actually done this; I've
just laid the groundwork.)
This checkin _may_ cause instability; it seemed fine to me on
initial testing, but it's a bit of an upheaval and I wouldn't like
to make bets on it just yet.

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

20 years agoRemove all the "assert(len>0)" which forbade zero-length writes across the
jacob [Sun, 12 Oct 2003 13:16:39 +0000 (13:16 +0000)]
Remove all the "assert(len>0)" which forbade zero-length writes across the
from_backend() interface, after having made all implementations safe against
being called with len==0 and possibly-NULL/undefined "data".

(This includes making misc.c:bufchain_add() more robust in this area.)

Assertion was originally added 2002-03-01; e.g., see plink.c:1.53 [r1571].

I believe this now shouldn't break anything.

This should hopefully make `ppk-empty-comment' finally GO AWAY. (Tested
with Unix PuTTY.)

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

20 years agoAdd random commentary to SOCKS code.
jacob [Fri, 10 Oct 2003 22:58:53 +0000 (22:58 +0000)]
Add random commentary to SOCKS code.
Also fix what I think are a couple of very minor bugs in SOCKS4; one won't
affect anyone AFAIK, and the other is unlikely to cause trouble.

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

20 years agoIn SOCKS5 dynamic forwarding, we were echoing back DST.{ADDR,PORT} as
jacob [Fri, 10 Oct 2003 21:20:01 +0000 (21:20 +0000)]
In SOCKS5 dynamic forwarding, we were echoing back DST.{ADDR,PORT} as
BND.{ADDR,PORT}. Besides being clearly wrong, correspondence with
Sascha Schwarz suggests that this can confuse some SOCKS5 clients
(Aventail and sockscap32) which seem to assume that the reply must
have ATYP=1 (IPv4 literal) and so get the length wrong.

Now all replies have ATYP=1 with BND.{ADDR,PORT} = 0.0.0.0:0 -- this
apparently follows practice in OpenSSH. (We don't have enough info to
fill these fields in correctly.)

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

20 years agomissed a bit in last commit
jacob [Wed, 8 Oct 2003 21:39:54 +0000 (21:39 +0000)]
missed a bit in last commit

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

20 years agoCosmetic, to fix ssh2-des-cbc-is-std
owen [Wed, 8 Oct 2003 20:09:55 +0000 (20:09 +0000)]
Cosmetic, to fix ssh2-des-cbc-is-std

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

20 years ago`baltic-default-translation': change default Baltic (CP1257) encoding from
jacob [Tue, 7 Oct 2003 21:31:21 +0000 (21:31 +0000)]
`baltic-default-translation': change default Baltic (CP1257) encoding from
8859-4 to 8859-13 as suggested by Vaidrius Petrauskas, on the grounds that
he has a .lt address and sounds like he knows what he's talking about.

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

20 years agoMy ASN.1 decoder returned wrong IDs for anything above 0x1E! Good
simon [Fri, 3 Oct 2003 21:21:23 +0000 (21:21 +0000)]
My ASN.1 decoder returned wrong IDs for anything above 0x1E! Good
job it's never had to yet. Ahem.

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

20 years agoPSCP in SFTP mode now uses the fast download/upload manager.
simon [Mon, 29 Sep 2003 15:39:56 +0000 (15:39 +0000)]
PSCP in SFTP mode now uses the fast download/upload manager.

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

20 years agoObvious memory leak in new fast download management. Oops.
simon [Mon, 29 Sep 2003 15:39:36 +0000 (15:39 +0000)]
Obvious memory leak in new fast download management. Oops.

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

20 years agoUploads turn out to be much easier than downloads, so here's faster
simon [Sun, 28 Sep 2003 14:24:01 +0000 (14:24 +0000)]
Uploads turn out to be much easier than downloads, so here's faster
upload support in PSFTP as well.

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

20 years agoFirst cut at speeding up SFTP. Generic download-management code in
simon [Sat, 27 Sep 2003 17:52:34 +0000 (17:52 +0000)]
First cut at speeding up SFTP. Generic download-management code in
sftp.c, and psftp.c now uses that instead of going it alone. Should
in principle be easily installed in PSCP as well, but I haven't done
it yet; also it only handles downloads, not uploads, and finally it
doesn't yet properly calculate the correct number of parallel
requests to queue. Still, it's a start, and in my own tests it
seemed to perform as expected (download speed suddenly became
roughly what you'd expect from the available bandwidth, and
decreased by roughly the expected number of round-trip times).

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

20 years agoClarify what happens when you enter a code page that's not listed.
jacob [Fri, 26 Sep 2003 13:04:56 +0000 (13:04 +0000)]
Clarify what happens when you enter a code page that's not listed.

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

20 years agoNote what versions of SOCKS are implemented for dynamic port forwarding.
jacob [Thu, 25 Sep 2003 12:38:02 +0000 (12:38 +0000)]
Note what versions of SOCKS are implemented for dynamic port forwarding.

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

20 years agoImply that some features that have been implemented may appear on the Wishlist
jacob [Tue, 23 Sep 2003 10:12:02 +0000 (10:12 +0000)]
Imply that some features that have been implemented may appear on the Wishlist
but not the Changes page, as this is now often the case.

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

20 years agoMention Windows on Alpha as worth mentioning
jacob [Tue, 23 Sep 2003 10:05:06 +0000 (10:05 +0000)]
Mention Windows on Alpha as worth mentioning

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

20 years agoOops. Fix a bug in my `keyfile-diagnostic' work which caused SSH-2 key loading
jacob [Wed, 10 Sep 2003 12:30:10 +0000 (12:30 +0000)]
Oops. Fix a bug in my `keyfile-diagnostic' work which caused SSH-2 key loading
in pageant (and presumably puttygen) to crash.

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

20 years agoImplement `default-colours' on Windows based loosely on Michael Wardle's patch.
jacob [Wed, 3 Sep 2003 20:14:38 +0000 (20:14 +0000)]
Implement `default-colours' on Windows based loosely on Michael Wardle's patch.

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

20 years agoAdd pscp to .cvsignore
jacob [Wed, 3 Sep 2003 18:37:35 +0000 (18:37 +0000)]
Add pscp to .cvsignore

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

20 years agoChange an incorrect comment about "PuTTY-User-Key-File-2" private key format
jacob [Tue, 2 Sep 2003 19:02:06 +0000 (19:02 +0000)]
Change an incorrect comment about "PuTTY-User-Key-File-2" private key format
after discussion with Simon.

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

20 years agoWhen loading SSH-2 key, ignore passphrase argument if key is unencrypted.
jacob [Tue, 2 Sep 2003 19:00:17 +0000 (19:00 +0000)]
When loading SSH-2 key, ignore passphrase argument if key is unencrypted.
This should get rid of a problem that three or four people reported where
PuTTY intermittently reports "Unable to load private key" (MAC failed).

(ssh.c:do_ssh2_authconn() should also initialise its passphrase so it's not
passing garbage passphrases around, of course, but I haven't yet worked out
where the best place in the auth loop to do that would be.)

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

20 years agoInclude stdlib.h for exit() - thanks Colin.
simon [Tue, 2 Sep 2003 09:52:13 +0000 (09:52 +0000)]
Include stdlib.h for exit() - thanks Colin.

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

20 years agoRemove CRs. Oops :-/
simon [Tue, 2 Sep 2003 09:00:35 +0000 (09:00 +0000)]
Remove CRs. Oops :-/

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

20 years agoAdd support for a DESTDIR variable in the Unix makefile to set the root of the
ben [Mon, 1 Sep 2003 21:27:36 +0000 (21:27 +0000)]
Add support for a DESTDIR variable in the Unix makefile to set the root of the
installation tree (for building packages etc).

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

20 years agoWork towards wish `keyfile-diagnostic'. Many sshpubk.c keyfile-loading
jacob [Fri, 29 Aug 2003 22:52:57 +0000 (22:52 +0000)]
Work towards wish `keyfile-diagnostic'. Many sshpubk.c keyfile-loading
functions have sprouted `**errorstr' arguments, which if non-NULL can
return a textual error message. The interface additions are patchy and
ad-hoc since this seemed to suit the style of the existing interfaces.

I've since realised that most of this is masked by sanity-checking that
gets done before these functions are called, but it will at least report
MAC failures and the like (tested on Unix), which was the original point
of the exercise.

Note that not everyone who could be using this information is at the
moment.

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

20 years agodupstr() should cope with being passed NULL
jacob [Fri, 29 Aug 2003 22:14:04 +0000 (22:14 +0000)]
dupstr() should cope with being passed NULL

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

20 years agoMinimal fixes to minimal plink man page.
jacob [Fri, 29 Aug 2003 19:41:57 +0000 (19:41 +0000)]
Minimal fixes to minimal plink man page.

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

20 years agoAdd "-s" option to Unix plink too.
jacob [Fri, 29 Aug 2003 19:21:49 +0000 (19:21 +0000)]
Add "-s" option to Unix plink too.
Compiled, but not tested as Unix plink seems to be segfaulting today.

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

20 years agoNew option for plink: "-s" specifies that the remote command is an SSH-2
jacob [Fri, 29 Aug 2003 19:06:22 +0000 (19:06 +0000)]
New option for plink: "-s" specifies that the remote command is an SSH-2
subsystem. (pinched from OpenSSH)

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

20 years ago... and there's a Unix port of PSCP. Ooh.
simon [Mon, 25 Aug 2003 14:30:59 +0000 (14:30 +0000)]
... and there's a Unix port of PSCP. Ooh.

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

20 years agoFix a couple of blatant memory leaks; thanks to Ruurd Beerstra for
simon [Mon, 25 Aug 2003 14:18:14 +0000 (14:18 +0000)]
Fix a couple of blatant memory leaks; thanks to Ruurd Beerstra for
pointing at least one of them out.

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

20 years agoWindows PSCP now links against winsftp.c, and scp.c is now a
simon [Mon, 25 Aug 2003 13:53:41 +0000 (13:53 +0000)]
Windows PSCP now links against winsftp.c, and scp.c is now a
platform-independent source file. Haven't yet added the extra
abstraction routines to uxsftp.c to create a Unix PSCP port, but it
shouldn't take long.
Also in this checkin, a change of semantics in platform_default_s():
now strings returned from it are expected to be dynamically allocated.

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

20 years agoAnd just to prove that psftp.c really is now platform-independent
simon [Sun, 24 Aug 2003 13:22:17 +0000 (13:22 +0000)]
And just to prove that psftp.c really is now platform-independent
... here's a Unix port of PSFTP. Woo. (Oddly PSCP looks to be
somewhat harder; there's more Windows code interleaved than there
was in PSFTP.)

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

20 years agoNext phase of general SFTP reworking: psftp.c is now a platform-
simon [Sun, 24 Aug 2003 12:47:46 +0000 (12:47 +0000)]
Next phase of general SFTP reworking: psftp.c is now a platform-
independent source file. All Windowsisms have been moved out to
winsftp.c.

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

20 years agoFix for `slow-startup-printer': use PRINTER_INFO_4 on NT-class systems, which
jacob [Thu, 21 Aug 2003 19:48:45 +0000 (19:48 +0000)]
Fix for `slow-startup-printer': use PRINTER_INFO_4 on NT-class systems, which
apparently tries less hard to find printers so won't slow the system down.

Tested on 2000 and 98; in both cases printer enumeration and printing worked
as well as they did in 2003-08-21.

Made a single shared copy of osVersion in winmisc.c so that printing.c can
find it. Made other users (window.c, pageant.c) use this copy.

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

20 years agoRichard B's patch to enable users to explicitly request shadow bold
simon [Thu, 21 Aug 2003 18:39:17 +0000 (18:39 +0000)]
Richard B's patch to enable users to explicitly request shadow bold
by disabling bold-font-name guessing (if their bold fonts are ugly).
I've turned the UI inside out, but the meat is pretty much the same.

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

20 years agoRichard B's patch to support X cut buffers as well as ordinary
simon [Thu, 21 Aug 2003 18:07:27 +0000 (18:07 +0000)]
Richard B's patch to support X cut buffers as well as ordinary
selections, meaning that (a) a pterm can leave copied text in the
cut buffer after it terminates so that applications can pick it up
even though it isn't still around to deliver the selection in
person, and (b) pterm can pick up things left in this way by other
apps.
Downside is that all of this only happens in ISO8859-1, because X is
weird like that.

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

20 years agoRichard Boulton's patch for improved correctness in selection
simon [Thu, 21 Aug 2003 18:03:06 +0000 (18:03 +0000)]
Richard Boulton's patch for improved correctness in selection
handling (generally, selection request timestamps should be set to
the timestamp on the event that caused them).

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

20 years agoControl of 'addr' is now handed over to {platform_,}new_connection() and
jacob [Thu, 7 Aug 2003 16:04:33 +0000 (16:04 +0000)]
Control of 'addr' is now handed over to {platform_,}new_connection() and
sk_new() on invocation; these functions become responsible for (eventually)
freeing it. The caller must not do anything with 'addr' after it's been passed
in. (Ick.)

Why:
A SOCKS5 crash appears to have been caused by overzealous freeing of
a SockAddr (ssh.c:1.257 [r2492]), which for proxied connections is
squirreled away long-term (and this can't easily be avoided).

It would have been nice to make a copy of the SockAddr, in case the caller has
a use for it, but one of the implementations (uxnet.c) hides a "struct
addrinfo" in there, and we have no defined way to duplicate those. (None of the
current callers _do_ have a further use for the SockAddr.)

As far as I can tell, everything _except_ proxying only needs addr for the
duration of the call, so sk_addr_free()s immediately. If I'm mistaken, it
should at least be easier to find the offending free()...

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

20 years agoClarify that '-m' takes a _local_ file.
jacob [Wed, 16 Jul 2003 08:28:31 +0000 (08:28 +0000)]
Clarify that '-m' takes a _local_ file.
ref. <kjt9hv49dagqmvru0nq9qcc0f5p11vg0ma@4ax.com>

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

20 years agoAdd SSH-1 password camouflage bug detection for version OSU_1.4alpha3 of the
jacob [Sat, 12 Jul 2003 13:45:21 +0000 (13:45 +0000)]
Add SSH-1 password camouflage bug detection for version OSU_1.4alpha3 of the
OSU VMS SSH server <http://kcgl1.eng.ohio-state.edu/~jonesd/ssh/>.

The changelog appears to indicate that the server was fixed for pwplain1 at
1.5alpha4, and for IGNORE and DEBUG messages at 1.5alpha6. However I'm going
to go on the reports we've had as I haven't tested this; and they indicate
only that 1.5alpha6 is known not to require any bug compatibility modes.

(I wasn't sure whether to add this at all, given that upgrading to version
OSU_1.5alpha6 is an easy way to fix the problem. However, there is precedent
for adding detection for old versions of servers which have since been fixed.)

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

20 years agoAdd section on "Access denied". This was mostly inspired by the password
jacob [Sat, 12 Jul 2003 13:25:43 +0000 (13:25 +0000)]
Add section on "Access denied". This was mostly inspired by the password
camouflage problems with SSH-1.5-OSU_1.4alpha3.

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

20 years agoMention Roald Ribe's success with OpenWatcom and Makefile.vc
jacob [Sun, 6 Jul 2003 09:34:03 +0000 (09:34 +0000)]
Mention Roald Ribe's success with OpenWatcom and Makefile.vc

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