Граф коммитов

116 Коммитов

Автор SHA1 Сообщение Дата
Ben Harris 580103fca2 Add a new COMPAT option for environments lacking SecureZeroMemory(),
rather than explicitly checking for Winelib.  It seems that w32api is
lacking it as well.

[originally from svn r9669]
2012-09-18 23:05:29 +00:00
Ben Harris d63ce7d30a Tweak comment in Recipe that had become separated from its code.
[originally from svn r9664]
2012-09-13 22:34:53 +00:00
Ben Harris e7324f7934 Define SECURITY_WIN32 for Winelib/Cygwin builds as well as for VC.
This should perhaps go into winmisc.c: it's caused problems for
other people too:

<http://stackoverflow.com/questions/8530159/vs2010-build-error-at-putty-source>

[originally from svn r9662]
2012-09-13 22:33:27 +00:00
Simon Tatham b53c04b43a Remove empty.h from CLEANFILES, so that after mkfiles.pl has
constructed it it won't be deleted again by 'make clean'. The effect
is that not only does this work (as r9288 arranged),

  ./configure; make plink

but these work too:

  ./configure; make; make clean; make plink
  ./configure; make; make distclean; ./configure; make plink

[originally from svn r9290]
[r9288 == a4424bfd85]
2011-09-16 09:01:41 +00:00
Simon Tatham a4424bfd85 Create empty.h (used to force rebuilds of version.o by the automake
makefile) as a side effect of running mkfiles.pl.

The automake docs observe that the BUILT_SOURCES list is only
automatically built by plain 'make' or 'make all' or a couple of other
targets, so the sequence './configure && make plink' from a freshly
unpacked tar file would previously fail for lack of empty.h.

If empty.h had important _content_ that needed to be built at compile
time, of course, I wouldn't be able to fix it like this; but since the
only important thing is the timestamp, I can just make sure it already
exists at the time of first build.

[originally from svn r9288]
2011-09-14 15:54:26 +00:00
Simon Tatham f14953d9e9 Fix bug in which the SSH-only tools (pscp, psftp) did not honour a
nonstandard port number when loading a saved session.

Occurs because those tools include be_none.c which defines no entries
in backends[] at all, as a result of which settings.c doesn't
recognise the word 'ssh' in the saved session's protocol field and
instead sets the protocol to something idiotic - which _then_ means
that when pscp.c forces the protocol to PROT_SSH, it also resets the
port number as it would when overriding a saved session specifying a
protocol other than SSH.

The immediate solution is to define a new be_ssh.c citing only
ssh_backend, and include that in the SSH-only tools. However, I wonder
if a better approach (perhaps when I redesign session loading and
saving) would be not to be so clever, and just have all the tools
contain a complete list of known protocol names for purposes of
understanding what's in the saved session data, and complain if you
try to use one they don't know how to actually speak.

[originally from svn r9254]
2011-07-27 18:43:16 +00:00
Simon Tatham 64150a5ef2 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.

[originally from svn r9239]
2011-07-23 11:33:29 +00:00
Simon Tatham a1f3b7a358 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.

[originally from svn r9214]
2011-07-14 18:52:21 +00:00
Simon Tatham 1a03fa9292 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...

[originally from svn r9046]
2010-12-23 17:32:28 +00:00
Simon Tatham ffe40202a4 Oops: r9004 should have removed various pieces from the Makefile and
header file setup too.

[originally from svn r9005]
[r9004 == 7ac1f17aab]
2010-09-25 08:37:30 +00:00
Simon Tatham 99fffd6ed3 Patch from Alejandro Sedeno, somewhat modified by me, which
reorganises the GSSAPI support so that it handles alternative
implementations of the GSS-API. In particular, this means PuTTY can
now talk to MIT Kerberos for Windows instead of being limited to
SSPI. I don't know for sure whether further tweaking will be needed
(to the UI, most likely, or to automatic selection of credentials),
but testing reports suggest it's now at least worth committing to
trunk to get it more widely tested.

[originally from svn r8952]
2010-05-19 18:22:17 +00:00
Jacob Nevins a626074b26 r8909 broke the Visual Studio build.
[originally from svn r8910]
[r8909 == c18b150623]
2010-03-25 18:41:27 +00:00
Simon Tatham f8a260d59f Add a 'unix' Makefile type, for building the non-GUI parts of the
PuTTY suite on non-GTK-enabled build platforms.

[originally from svn r8577]
2009-05-11 18:48:43 +00:00
Simon Tatham ca6fc3a4da Revamp of the local X11 connection code. We now parse X display
strings more rigorously, and then we look up the local X authority
data in .Xauthority _ourself_ rather than delegating to an external
xauth program. This is (negligibly) more efficient on Unix, assuming
I haven't got it wrong in some subtle way, but its major benefit is
that we can now support X authority lookups on Windows as well
provided the user points us at an appropriate X authority file in
the standard format. A new Windows-specific config option has been
added for this purpose.

[originally from svn r8305]
2008-11-17 18:38:09 +00:00
Owen Dunn de5dd9d65c Initial commit of GSSAPI Kerberos support.
[originally from svn r8138]
2008-08-10 13:10:31 +00:00
Simon Tatham 71d802bdb6 Refactor the font handling code: I've moved all the code that
explicitly deals with GdkFont out into a new module, behind a
polymorphic interface (done by ad-hoc explicit vtable management in
C). This should allow me to drop in a Pango font handling module in
parallel with the existing one, meaning that GTK2 PuTTY will be able
to seamlessly switch between X11 server-side fonts and Pango client-
side ones as the user chooses, or even use a mixture of the two
(e.g. an X11 font for narrow characters and a Pango one for wide
characters, or vice versa).

In the process, incidentally, I got to the bottom of the `weird bug'
mentioned in the old do_text_internal(). It's not a bug in
gdk_draw_text_wc() as I had thought: it's simply that GdkWChar is a
32-bit type rather than a 16-bit one, so no wonder you have to
specify twice the length to find all the characters in the string!
However, there _is_ a bug in GTK2's gdk_draw_text_wc(), which causes
it to strip off everything above the low byte of each GdkWChar,
sigh. Solution to both problems is to use an array of the underlying
Xlib type XChar2b instead, and pass it to gdk_draw_text() cast to
gchar *. Grotty, but it works. (And it'll become significantly less
grotty if and when we have to stop using the GDK font handling
wrappers in favour of going direct to Xlib.)

[originally from svn r7933]
2008-03-22 11:40:23 +00:00
Jacob Nevins f2f717bb47 Since r7496, Pageant needs sshsh256 to build (although it doesn't need
SHA-256 to actually do its job).

[originally from svn r7500]
[r7496 == dad558a1e5]
2007-05-01 13:14:23 +00:00
Ben Harris dad558a1e5 Add support for RFC 4432 RSA key exchange, the patch for which has been
lying around in my home directory for _years_.

[originally from svn r7496]
2007-04-30 22:09:26 +00:00
Ben Harris 9f7f5157fe Create installations directories before installing into them, like GNU
packages do.

Problem reported by Manfred Pausch.

[originally from svn r7494]
2007-04-30 20:09:58 +00:00
Jacob Nevins c8ac23705d Note that htmlhelp.h from HTML Help Workshop works perfectly well with Cygwin.
[originally from svn r7273]
2007-02-11 20:27:05 +00:00
Jacob Nevins 1c081c99be At least, I have the technology to fix `beepind-win2k'.
Tested on Win98, Win2K, and WinXP.

[originally from svn r7119]
[this svn revision also touched putty-wishlist]
2007-01-16 20:54:58 +00:00
Jacob Nevins 097fc8b43d MinGW needs an extra symbol _WIN32_IE defined to a particular value before
it'll let you see an identifier (SHGFP_TYPE_CURRENT) referenced since r7082.
(Actually, you need a pretty recent w32api before it's there at all.)

Morally, this should be defined for all toolchains, not just MinGW/Cygwin, but  I'll leave that to people who have those toolchains.
<http://msdn2.microsoft.com/en-us/library/aa383745.aspx>

Also add some other comments on our use of this API (since it's a horrible one
that I suspect will come back and haunt us...)

[originally from svn r7087]
[r7082 == dbbd6eb5ec]
[this svn revision also touched putty-wishlist]
2007-01-09 23:47:15 +00:00
Jacob Nevins 53fa67eb18 I think this change to Recipe was accidentally omitted from r7064.
[originally from svn r7065]
[r7064 == 334ef0824c]
2007-01-06 20:01:30 +00:00
Simon Tatham 9cea4aaf06 Colin Watson points out that there was no need for me to write the
custom Panels container widget for the PuTTY config box, since the
perfectly standard GtkNotebook does the same job. Hence, let's
remove Panels completely in favour of doing it the proper way.

[originally from svn r7034]
2006-12-29 14:35:34 +00:00
Jacob Nevins 89f7c2c8ce Add a NO_HTMLHELP option, and enable it by default in the Cygwin Makefile,
since even the latest version of w32api (3.6) shows no sign of HTMLHelp
support.

(This touches mkfiles.pl because that's where the details of what Cygwin
doesn't support are kept currently. This may be deliberate, so I haven't
changed it.)

[originally from svn r7032]
2006-12-28 20:56:01 +00:00
Simon Tatham 82b3b2fdb7 I'm not sure why I added htmlhelp.lib to the PuTTY link lines in
r7000. I was probably half asleep. Actually, it's completely
unnecessary to bind to it at link time, because we load it at run
time in order to continue working as before on Win95. So I'm
removing it again.

[originally from svn r7030]
[r7000 == 1dac1bc911]
2006-12-28 15:47:53 +00:00
Simon Tatham 1dac1bc911 Initial support for HTML Help. All the ad-hoc help-file finding code
and various calls to WinHelp() have been centralised into a new file
winhelp.c, which in turn has been modified to detect a .CHM file as
well as .HLP and select between them as appropriate. It explicitly
tries to load HHCTRL.OCX and use GetProcAddress, meaning that it
_should_ still work correctly on pre-HTML-Help platforms, falling
gracefully back to WinHelp, but although I tested this by
temporarily renaming my own HHCTRL.OCX I haven't yet been able to
test it on a real HTML-Help-free platform.

Also in this checkin: a new .but file and docs makefile changes to
make it convenient to build the sources for a .CHM. As yet, owing to
limitations of Halibut's CHM support, I'm not able to write a .CHM
directly, more's the pity.

[originally from svn r7000]
2006-12-17 11:16:07 +00:00
Simon Tatham 8c26b44ce6 Serial back end for Unix. Due to hardware limitations (no Linux box
I own has both an X display and a working serial port) I have been
unable to give this the full testing it deserves; I've managed to
demonstrate the basic functionality of Unix Plink talking to a
serial port, but I haven't been able to test the GTK front end. I
have no reason to think it will fail, but I'll be more comfortable
once somebody has actually tested it.

[originally from svn r6822]
2006-08-28 14:29:02 +00:00
Simon Tatham 34f747421d Support for Windows PuTTY connecting straight to a local serial port
in place of making a network connection. This has involved a couple
of minor infrastructure changes:
 - New dlg_label_change() function in the dialog.h interface, which
   alters the label on a control. Only used, at present, to switch
   the Host Name and Port boxes into Serial Line and Speed, which
   means that any platform not implementing serial connections (i.e.
   currently all but Windows) does not need to actually do anything
   in this function. Yet.
 - New small piece of infrastructure: cfg_launchable() determines
   whether a Config structure describes a session ready to be
   launched. This was previously determined by seeing if it had a
   non-empty host name, but it has to check the serial line as well
   so there's a centralised function for it. I haven't gone through
   all front ends and arranged for this function to be used
   everywhere it needs to be; so far I've only checked Windows.
 - Similarly, cfg_dest() returns the destination of a connection
   (host name or serial line) in a text format suitable for putting
   into messages such as `Unable to connect to %s'.

[originally from svn r6815]
2006-08-28 10:35:12 +00:00
Simon Tatham 8a3c123bd7 ProxyCommand support for Windows, using the new winhandl.c API.
Seems a bit clunky when I actually try to use it - not sure why -
but I think all the actual functionality is there.

[originally from svn r6806]
2006-08-26 10:20:16 +00:00
Simon Tatham 291533d3f9 New piece of Windows infrastructure: winhandl.c takes Plink's
thread-based approach to stdin and stdout, wraps it in a halfway
sensible API, and makes it a globally available service across all
network tools.

There is no direct functionality enhancement from this checkin:
winplink.c now talks to the new API instead of doing it all
internally, but does nothing different as a result.

However, this should lay the groundwork for several diverse pieces
of work in future: pipe-based ProxyCommand on Windows, a serial port
back end, and (hopefully) a pipe-based means of communicating with
Pageant, which should have sensible blocking behaviour and hence
permit asynchronous agent requests and decrypt-on-demand.

[originally from svn r6797]
2006-08-25 22:10:16 +00:00
Jacob Nevins 4d48ba62e8 `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.

[originally from svn r6374]
[r6367 == f86ad059db]
[this svn revision also touched putty-wishlist]
2005-10-04 14:13:28 +00:00
Ben Harris 9131914278 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.

[originally from svn r6272]
2005-09-04 14:53:39 +00:00
Ben Harris 27fc5e518f Don't bother compiling SHA-256 for now -- I need to think a bit before I use
it.

[originally from svn r6253]
2005-08-31 22:32:05 +00:00
Ben Harris 8d0c333946 SHA-256 implementation, for use in future KEX algorithms, in particular
diffie-hellman-group-exchange-sha256, which the last DHGEX draft defined.
Code lifted from Simon's "crypto" directory, with changes to make it look
more like sshsh512.c.

[originally from svn r6252]
2005-08-31 21:48:22 +00:00
Ben Harris c1c27e9fb8 Add support for generating project files for use with Dev-C++, contributed
by Florian Gaab.

[originally from svn r6201]
2005-08-22 20:37:13 +00:00
Jacob Nevins 3f20ec26a0 Fix documentation of NO_MANIFESTS (oops).
[originally from svn r5821]
2005-05-21 15:09:36 +00:00
Jacob Nevins 2ba272c262 Add NO_MANIFESTS option to Windows build, as the manifests apparently cause
trouble for 64-bit Windows builds.
Also flag the build flags that only apply to Windows.

[originally from svn r5820]
2005-05-21 14:35:21 +00:00
Ben Harris 0227bfdbc7 Add a mechanism for using autoconf to detect the quirks of Unix systems
rather than relying on the user to edit the Makefile.  Makefile.gtk
still works as well as it ever did, but now we get a Makefile.in alongside
it.  mkunxarc.sh now relies on autoconf and friends to build the configure
script for the Unix source distribution.

[originally from svn r5673]
2005-04-25 15:55:06 +00:00
Ben Harris 09951c6078 Implement my experimental arcfour modes. The 256-bit version is disabled
until I can test it against someone else's implementation.

[originally from svn r5633]
2005-04-14 22:58:29 +00:00
Simon Tatham a1f0e69fe4 Thanks to D H Becker for sending in an icon. I'd have liked to have
written a script which would generate the various graphical
components of the PuTTY icon suite at any given resolution and then
used that to generate the OS X icon as well as all the others, but I
can always do that later; this'll do for now.

[originally from svn r5487]
2005-03-10 20:11:27 +00:00
Jacob Nevins c81aca2126 PSFTP now needs wildcard.o, and was only getting it by luck. Make it explicit.
[originally from svn r5411]
2005-02-28 00:17:09 +00:00
Jacob Nevins 1b3b065afc Allow mkfiles.pl to put multiple verbatim sections in a Makefile, and use
one of these for the MacOSX CFLAGS tweak.

[originally from svn r5404]
2005-02-26 17:30:41 +00:00
Jacob Nevins d94e865cf9 Makefile.lcc mentions version.o instead of .obj (not that it matters, probably)
[originally from svn r5397]
2005-02-25 21:26:30 +00:00
Simon Tatham 46bfde32e8 Initial checkin of a native Mac OS X port, sharing most of its code
with the Unix port and layering a Cocoa GUI on top. The basics all
work: there's a configuration panel and a terminal window, the
timing interface works and the select interface functions. The same
application can run both SSH (or other network) connections and
local pty sessions, and multiple sessions in the same process are
fully supported.

However, it's horribly unfinished in a wide variety of other ways;
anyone interested is invited to read README.OSX and wince at the
length and content of its `unfinished' list.

[originally from svn r5308]
2005-02-15 21:45:50 +00:00
Simon Tatham b75856edfa Saw uxcfg.c in half down the middle, to separate out config changes
that apply to all Unix-like systems from those which apply
specifically to the GTK front end.

[originally from svn r5292]
2005-02-14 07:41:41 +00:00
Simon Tatham 471624882b Reinstate the broken -e option in pterm. Also I've just worked out a
much better way of handling pty_argv which doesn't require uxpty.c
to be linked in to Unix PuTTY and PuTTYtel.

[originally from svn r5262]
2005-02-06 15:52:00 +00:00
Owen Dunn 76c2183709 Add minibidi to Mac PuTTY objects
[originally from svn r5116]
2005-01-16 13:40:36 +00:00
Ben Harris 6b1afc2a68 FWHACK has been dead for years. Remove it from the Makefiles.
[originally from svn r5113]
2005-01-15 18:30:05 +00:00
Simon Tatham a29dea954c The Unix `make install' target now allows you to define UTMP_GROUP,
in which case pterm will be installed setgid that, or to define
UTMP_USER in which case it will be installed setuid that. If you
define neither, it will be installed without any set-id bits as
before.

[originally from svn r5093]
2005-01-11 10:45:43 +00:00