1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 18:07:59 +00:00
Commit Graph

60 Commits

Author SHA1 Message Date
Jacob Nevins
3c98d6e60d Add a preference list for SSH-2 key exchange algorithms, on a new "Kex" panel
(which will gain more content anon).

Retire BUG_SSH2_DH_GEX and add a backwards-compatibility wart, since we never
did find a way of automatically detecting this alleged server bug, and in any
case there was only ever one report (<3D91F3B5.7030309@inwind.it>, FWIW).

Also generalise askcipher() to a new askalg() (thus touching all the
front-ends).

I've made some attempt to document what SSH key exchange is and why you care,
but it could use some review for clarity (and outright lies).

[originally from svn r5022]
2004-12-23 02:24:07 +00:00
Ben Harris
25ff4e0ed9 I believe that verify_ssh_host_key() should now be passed a real front-end
handle, which removes one of its many flaws.

[originally from svn r3181]
2003-05-10 12:27:38 +00:00
Ben Harris
ccc9ec2bce Update signature of agent_query() to match the rest of the world.
[originally from svn r3178]
2003-05-10 11:40:18 +00:00
Ben Harris
000edf3233 Implement update_special_menu(), which calls mac_adjustmenus() as appropriate.
Eventually, mac_adjustmenus() will handle populating the Specials menu.

[originally from svn r3058]
2003-04-05 14:34:06 +00:00
Ben Harris
fe590b2f51 Add support for editbox controls on Mac OS 8, and for per-control private data.
[originally from svn r2995]
2003-03-25 23:18:59 +00:00
Ben Harris
93198194fb When running on a system with Aqua menu layout, delete the separator line
above "Quit" as well as "Quit" itself.

[originally from svn r2951]
2003-03-17 19:00:36 +00:00
Ben Harris
33e7ee09ab Slightly better than null verify_ssh_host_key(). It's broken in more ways
than I can comfortably enumerate (see the comments in the code), but it's
better than always assuming everything's OK.

[originally from svn r2919]
2003-03-06 23:44:47 +00:00
Ben Harris
614c5a3b92 Improve scheduling on the Mac:
1: Only update the screen when there's nothing else to do.  This means that
it's a lot harder for a fast typist to outrun PuTTY.
2: Only sleep for at most 100ms at a time.  This is a kludge to work around
the WakeUpProcess caused by incoming data can happen before the
WaitNextEvent it's meant to interrupt, leading to PuTTY sleeping forever
because it doesn't know there's network data pending.

[originally from svn r2901]
2003-03-01 15:12:03 +00:00
Ben Harris
000acf446c Handle the Aqua menu layout, in which the system provides a "quit" option
for us, correctly.

[originally from svn r2899]
2003-02-27 23:34:59 +00:00
Ben Harris
eec4b9d08d Add handling for suspend and resume events, and set the flags in our 'SIZE'
resource that say we can handle them.  This seems to avoid a crash when PuTTY's
switched away from, and is necessary for Carbon anyway.

[originally from svn r2878]
2003-02-23 11:58:59 +00:00
Ben Harris
f53c998569 Be careful not to try to get information from windows we don't own, or that
don't exist at all.  Also a small PuTTYgen change that I can't be bothered
to filter out of this commit.

[originally from svn r2874]
2003-02-20 22:31:52 +00:00
Ben Harris
4f59bac798 Rather than increasing the size of my switch statements yet further, have
a bunch of function pointers associated with each window to do things like
updates and click handling.  This is all looking disturbingly object-oriented.
.
While I'm here, separate out the about box into its own file, shared by PuTTY
and PuTTYgen.

[originally from svn r2850]
2003-02-15 16:22:15 +00:00
Ben Harris
8dcbb16ec2 Minimal shell of PuTTYgen for Mac. No actual PuTTYgen-specific code there
yet, but an absence of PuTTY-specific code.

[originally from svn r2842]
2003-02-12 23:53:15 +00:00
Ben Harris
2c10ece60d Crude Event Log implementation for the Mac. I'm fairly convinced now that
using the List Manager was entirely the wrong decision on my part, so I'll
probably rewrite this to use TextEdit at some point, but it's better than
stderr even so.

[originally from svn r2811]
2003-02-07 01:38:12 +00:00
Ben Harris
60c9d7bae3 Clean up Carbon build procedures somewhat. I still don't have anything that
actually works, but I think I'm getting closer.

[originally from svn r2810]
2003-02-07 01:33:24 +00:00
Ben Harris
a1e2199dc1 Add a level of indirection to make it rather easier to work out which of a
session's windows we're dealing with.

[originally from svn r2804]
2003-02-04 23:39:26 +00:00
Ben Harris
45ab39dd19 Slightly improve Carbon handling: we still have to deal with the "About..."
menu entry, even if the rest of the Apple Menu is done for us.

[originally from svn r2788]
2003-02-04 00:33:11 +00:00
Ben Harris
60b6419de5 Add support for using Navigation Services to open saved sessions.
Support for saving sessions using Navigation Services will come later.

[originally from svn r2779]
2003-02-02 15:59:00 +00:00
Ben Harris
ac8177763e Make this compile in a Carbon world (while still supporting everything else).
[originally from svn r2773]
2003-02-01 23:42:30 +00:00
Ben Harris
61711b9594 Rather more natural (if much more complex) Mac Filename implementation.
Filenames are represented as a FSSpec, which is converted to and from an
alias record ('alis' resource) when saving and loading sessions.
.
It might be an idea to allow in-core Filenames to contain alias records too,
so that they can refer to directories that don't exist on the current system,
but that requires Filenames to be dynamically allocated, which is likely to be
a pain.

[originally from svn r2771]
2003-02-01 21:44:05 +00:00
Simon Tatham
bd16b29a7a Oops, Ben is quite right about the rather appalling design of
filename_from_str. Here's a better fix, with some const
repercussions too.

[originally from svn r2768]
2003-02-01 17:24:27 +00:00
Ben Harris
947b70006e Tidy up Simon's FontSpec abstraction.
Also, make fontspec_to_str not return the address of an automatic variable.
It now has a memory leak instead.

[originally from svn r2767]
2003-02-01 15:44:08 +00:00
Simon Tatham
f26b7aa0d3 Created new data types Filename' and FontSpec', intended to be
opaque to all platform-independent modules and only handled within
per-platform code. `Filename' is there because the Mac has a magic
way to store filenames (though currently this checkin doesn't
support it!); `FontSpec' is there so that all the auxiliary stuff
such as font height and charset and so on which is needed under
Windows but not Unix can be kept where it belongs, and so that I can
have a hope in hell of dealing with a font chooser in the forthcoming
cross-platform config box code, and best of all it gets the horrid
font height wart out of settings.c and into the Windows code where
it should be.
The Mac part of this checkin is a bunch of random guesses which will
probably not quite compile, but which look roughly right to me.
Sorry if I screwed it up, Ben :-)

[originally from svn r2765]
2003-02-01 12:54:40 +00:00
Ben Harris
9812db5f1f Add support for "Duplicate Session", moving back-end selection into
mac_startsession() in the process.

[originally from svn r2718]
2003-01-25 15:15:40 +00:00
Ben Harris
6993486b43 Redesign the macnet.c infrastructure, largely so as to avoid using Gestalt(),
which didn't detect the MacTCP emulation in Owen's Open Transport.

[originally from svn r2703]
2003-01-24 00:25:33 +00:00
Ben Harris
596f6e9787 Add Apple Event handlers for 'aevt'/'oapp', 'aevt'/'odoc' and 'aevt'/'pdoc'.
None of them does anything useful yet (though the odoc one tries to).

[originally from svn r2700]
2003-01-23 22:57:43 +00:00
Ben Harris
85334a8317 Add minimal Apple Event support -- we handle the 'aevt'/'quit' event.
[originally from svn r2668]
2003-01-20 22:55:08 +00:00
Ben Harris
99c1029649 Support for saving sessions on the Mac. This is slightly useful even in the
absence of a config dialogue, since it allows me to get Default Settings out.

[originally from svn r2646]
2003-01-18 20:09:21 +00:00
Ben Harris
694aafa071 Add the ability to close sessions. This adds *_free() functions to most
areas of the code.  Not all back-ends have been tested, but Telnet and SSH
behave reasonably.

Incidentally, almost all of this patch was written through Mac PuTTY,
admittedly over a Telnet connection.

[originally from svn r2615]
2003-01-15 23:30:21 +00:00
Ben Harris
7a9c7f3d68 Make this compile again.
[originally from svn r2614]
2003-01-15 22:37:58 +00:00
Jacob Nevins
e8ebb4c879 Implement Simon's suggestion of moving DEFAULT_PROTOCOL into a per-backend-
link-module const variable `be_default_protocol' which suggests a sensible
default to the front end (which can ignore it). (DEFAULT_PORT is replaced by a
lookup in the backend[] table.)
Still not pretty, but it does mean that the recent fix for `ssh-default'
doesn't break PuTTYtel.

[originally from svn r2613]
2003-01-15 20:47:50 +00:00
Ben Harris
1d92c2b783 Update for Unicode deglobalisations.
[originally from svn r2600]
2003-01-14 19:42:00 +00:00
Ben Harris
34b400a131 const fallout.
[originally from svn r2597]
2003-01-14 19:09:24 +00:00
Ben Harris
b4d37df579 Consequences of Simon's recent deglobalisation changes.
[originally from svn r2573]
2003-01-12 16:11:27 +00:00
Ben Harris
cf2bcad348 Call ot_poll as appropriate.
Also use cleanup_exit() in preference to exit() so that MacTCP gets shut down
even on unclean exits.

[originally from svn r2560]
2003-01-12 14:45:33 +00:00
Ben Harris
f9300b0011 Initial import of Owen's OpenTransport interface. It doesn't work yet, but
it does compile and link.

[originally from svn r2547]
2003-01-11 23:33:57 +00:00
Ben Harris
4818639014 Add an indirection layer between mtcpnet.c and the rest of PuTTY so that
we can have runtime switching between MacTCP and OpenTransport, and so
that we can cope if there's no TCP/IP stack available at all (albeit with
very little functionality at present).

[originally from svn r2546]
2003-01-11 19:43:59 +00:00
Simon Tatham
86977efa81 Introduce framework for authenticating with the local X server.
Windows and Mac backends have acquired auth-finding functions which
do nothing; Unix backend has acquired one which actually works, so
Plink can now do X forwarding believably.
(This checkin stretches into some unlikely parts of the code because
there have been one or two knock-on effects involving `const'. Bah.)

[originally from svn r2536]
2003-01-10 18:33:35 +00:00
Ben Harris
79cbd905e7 Take advantage of having control over the default font to do the job properly:
ask the system script what it's preferred monospaced font is, and use that
if possible.  Failing, that, try the Roman script system, and if that fails,
fall back to Monaco 9.

[originally from svn r2521]
2003-01-09 22:39:47 +00:00
Simon Tatham
4d86f5979d I'm sick of all those #ifdefs in settings.c, and in any case plink
and pterm need at least one default setting to be _different_ (pterm
needs the default term type to be `xterm', while plink needs it to
be taken from $TERM). So here's a completely new alternative
mechanism for platform- and app-specific default settings. Ben will
probably want to check the integrity of the Mac port, since I've
fiddled with it without testing that it still compiles.

[originally from svn r2513]
2003-01-09 18:06:29 +00:00
Ben Harris
697794abbf Fairly major hackery to get SSH going on the Mac. Half the support
functions are only dummy stubs, but it's still minimally usable.  At
least, as long as you don't want to do anything complex like logging out.

[originally from svn r2500]
2003-01-08 22:46:12 +00:00
Ben Harris
30bff47c89 Add reception support for MacTCP. Now I can log in over TELNET, just about.
There are still lots of things to fix, like urgent data or the fact that
everything seems to happen one keypress too late, but this is an important
milestone.

[originally from svn r2458]
2003-01-05 12:53:38 +00:00
Ben Harris
ac85d9b8c9 Second work-in-progress MacTCP commit. We can now open a connection, but
not transfer any data across it.

[originally from svn r2456]
2003-01-05 10:52:56 +00:00
Ben Harris
e82053be5c <MacTypes.h> says we should use NULL rather than nil in C, so do that.
[originally from svn r2444]
2003-01-04 12:45:11 +00:00
Ben Harris
7c40e3434d Small simplification in mac_init().
[originally from svn r2442]
2003-01-04 00:31:04 +00:00
Ben Harris
561029bfdf Correct handling of Mac OS 8.5 Window Manager and Control Manager. The new
functions turn out to be available only to PowerPC applications, through
WindowsLib and ControlsLib respectively, so we weak-link against those in
the obvious way.

[originally from svn r2441]
2003-01-04 00:13:18 +00:00
Ben Harris
0416b77c7f If for some reason do_text() fails to translate from Unicode to the font
encoding, have it go through the rest of its motions with an empty string
anyway, so as to at least give a sensible empty box of the right colour.

If SetFallbackUnicodeToText() fails, switch over to using the charset
library, hence avoiding problems in do_text().

If the version of the Unicode Converter we're using doesn't understand about
interrupt-safe fallback functions, don't try to tell it we've got one.  This
prevents SetFallbackUnicodeToText() from failing on systems with old Unicode
Converters.

[originally from svn r2414]
2003-01-02 00:33:40 +00:00
Ben Harris
d8413715a9 Remove a couple of unnecessary casts that my compiler seems to have taken
exception to.

[originally from svn r2402]
2003-01-01 11:45:43 +00:00
Ben Harris
6c1c86f23d Add a minimalist settings dialogue, which contains a single button
marked "open".  Still, it seems to work.

[originally from svn r2392]
2002-12-31 01:40:14 +00:00
Ben Harris
14432c234a Set the default directory to somewhere useful (the PuTTY saved sessions
folder) when we start up.

[originally from svn r2388]
2002-12-30 19:01:44 +00:00