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

55 Коммитов

Автор SHA1 Сообщение Дата
Jacob Nevins fa0fa6d17d Fixed accelerator clash between "Conversions" menu and "key comment" control
(former is now "Con&versions").

Add shortcut to key fingerprint for ease of copy-and-paste.

[originally from svn r3215]
2003-05-24 18:02:49 +00:00
Simon Tatham 651b850514 Rene Post's other patch: PuTTYgen was generating double file dialogs
by mistake.

[originally from svn r3196]
2003-05-14 18:53:28 +00:00
Simon Tatham d36a4c3685 Introduced wrapper macros snew(), snewn() and sresize() for the
malloc functions, which automatically cast to the same type they're
allocating the size of. Should prevent any future errors involving
mallocing the size of the wrong structure type, and will also make
life easier if we ever need to turn the PuTTY core code from real C
into C++-friendly C. I haven't touched the Mac frontend in this
checkin because I couldn't compile or test it.

[originally from svn r3014]
2003-03-29 16:14:26 +00:00
Simon Tatham 196fc3ea8d Fixed the bug whereby PuTTYgen went into generation mode as soon as
it started up. The problem was that I was accepting _any_ event on
IDC_GENERATE to trigger this, not just the `clicked' event, and some
uninteresting event like `initialise' must have occurred. Quite why
this only showed up as a result of the config box revamp I can't
imagine.

[originally from svn r2972]
2003-03-22 09:22:52 +00:00
Jacob Nevins ae0a12c938 Set some parent windows on PuTTYgen and Pageant About/Licence dialog to
improve window management behaviour.

[originally from svn r2822]
2003-02-07 14:22:19 +00:00
Jacob Nevins 8c9ac4ac48 Give PuTTYgen an icon.
[originally from svn r2821]
2003-02-07 13:54:34 +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
Jacob Nevins 01b8739894 Further cosmetic tweaks to file-selection boxes per observed conventions
on Windows:
 - Change "AllFiles" to "All Files (*.*)"
 - Extensions in lower case

[originally from svn r2748]
2003-01-29 16:39:18 +00:00
Jacob Nevins 57610f8580 Steven Shockley points out that the .PPK extension is far from obvious to
users. Update the file selection dialogs to mention it per the usual Windows
convention, and also sprinkle references to it throughout the docs. I've
also scattered hints that most tools need PuTTY's native format; perhaps this
will reduce the frequency with which FAQ A.1.2 trips people up.

[originally from svn r2625]
2003-01-16 15:43:18 +00:00
Simon Tatham 7c95ea19c8 Robustness fixes for KEXINIT handling and others. In particular, I've
created a self-mallocing variant of sprintf, to obviate any future
need for paranoid %.100s type stuff in format strings.

[originally from svn r2199]
2002-11-07 19:49:03 +00:00
Simon Tatham 4756c15fc9 Yet more global-removal. The static variables in logging.c are now
absent, and also (I think) all the frontend request functions (such
as request_resize) take a context pointer, so that multiple windows
can be handled sensibly. I wouldn't swear to this, but I _think_
that only leaves the Unicode stuff as the last stubborn holdout.

[originally from svn r2147]
2002-10-26 12:58:13 +00:00
Simon Tatham 6d0e9b205d First phase of porting. pterm now compiles and runs under Linux+gtk.
The current pty.c backend is temporarily a loopback device for
terminal emulator testing, the display handling is only just enough
to show that terminal.c is functioning, the keyboard handling is
laughable, and most features are absent. Next step: bring output and
input up to a plausibly working state, and put a real pty on the
back to create a vaguely usable prototype. Oh, and a scrollbar would
be nice too.
In _theory_ the Windows builds should still work fine after this...

[originally from svn r2010]
2002-10-09 18:09:42 +00:00
Simon Tatham 437d740fb3 Pageant's command line handling now uses my new split_into_argv()
function, because it's silly to have two (and because the old one
was not the same as the new one, violating the Principle of Least
Surprise).

[originally from svn r1811]
2002-08-06 17:57:37 +00:00
Simon Tatham 5e49e3fe1c PuTTYgen will now start by loading a private key file if one is
provided on its command line.

[originally from svn r1810]
2002-08-06 17:48:14 +00:00
Simon Tatham 452adcc952 Oops. That is to say, only loading and saving of PuTTY private keys
should default to .PPK - loading and saving of public keys and of
foreign key formats still defaults to All Files. Ahem.

[originally from svn r1809]
2002-08-06 17:35:34 +00:00
Simon Tatham afbd7779e4 Now that we've decided on a file extension for private key files
(.PPK), make it the default in all the private-key file dialogs.

[originally from svn r1808]
2002-08-06 17:27:18 +00:00
Simon Tatham c92ea6c8ed UI changes for key imports. We now have a separate Load command and
Import command; the former warns you if you load a foreign key,
whereas the latter doesn't. So the user should always be aware, one
way or the other, that a format conversion is taking place.

[originally from svn r1687]
2002-05-18 09:20:41 +00:00
Simon Tatham de3b29f7e5 Final cleanups on key import/export work. Rationalised the UI (so
that menu options are greyed out helpfully) and added documentation.

[originally from svn r1683]
2002-05-15 20:07:11 +00:00
Simon Tatham ff5241c1ed Added export of ssh.com key files.
[originally from svn r1682]
2002-05-15 19:16:45 +00:00
Simon Tatham 030c75b7db Implemented export of OpenSSH keys.
[originally from svn r1677]
2002-05-14 18:11:15 +00:00
Simon Tatham ed29fdc91c Add some basic framework code preparatory to adding key export.
[originally from svn r1675]
2002-05-13 16:56:11 +00:00
Simon Tatham 9a8c58a64b Added a framework for importing foreign key formats, and implemented
importing of OpenSSH SSH2 private key files (both encrypted and
unencrypted). Seems to work fine.

[originally from svn r1668]
2002-05-11 16:45:29 +00:00
Simon Tatham 8c3a0eb50b Improved error messages if you use the wrong key type: you should
now be told that the key is the wrong type, _and_ what type it is,
rather than being given a blanket `unable to read key file' message.

[originally from svn r1662]
2002-05-11 12:13:42 +00:00
Simon Tatham dac0d45699 Ensure our network layer is properly cleaned up before PuTTY exits.
Specifically, we explicitly closesocket() all open sockets, which
appears to be necessary since otherwise Windows sends RST rather
than FIN. I'm _sure_ that's a Windows bug, but there we go.

[originally from svn r1574]
2002-03-06 20:13:22 +00:00
Simon Tatham f9cbbc3387 Updated the PuTTYgen section in pubkey.but so that it gives
individual documentation of the various PuTTYgen controls; also
implemented context help in PuTTYgen to go with it. Shame there
isn't space for a generic `Help' button in the PuTTYgen window.

[originally from svn r1478]
2001-12-12 18:45:56 +00:00
Simon Tatham 6608016fc2 INCOMPATIBLE CHANGE to the SSH2 private key file format. There is
now a passphrase-keyed MAC covering _all_ important data in the
file, including the public blob and the key comment. Should
conclusively scupper any attacks based on nobbling the key file in
an attempt to sucker the machine that decrypts it. MACing the
comment field also protects against a key-substitution attack (if
someone's worked out a way past our DSA protections and can extract
the private key from a signature, swapping key files and
substituting comments might just enable them to get the signature
they need to do this. Paranoid, but might as well).

[originally from svn r1413]
2001-11-25 14:31:46 +00:00
Simon Tatham 5f096142a7 Remember to initialise p->nphases to zero in progress report structure.
[originally from svn r1378]
2001-11-12 09:19:57 +00:00
Simon Tatham 58fb67ec18 Shrink the PuTTYgen window for 640x480 friendliness (thanks Jacob)
[originally from svn r1348]
2001-10-30 22:12:49 +00:00
Jacob Nevins d8fa043b22 Fix trivial UI buglets related to DSA key support.
[originally from svn r1338]
2001-10-28 15:32:33 +00:00
Simon Tatham d345ebc2a5 Add support for DSA authentication in SSH2, following clever ideas
on how to get round the problem of generating a good k.

[originally from svn r1284]
2001-09-22 20:52:21 +00:00
Simon Tatham 08c1ca1936 Oops - changing the prototype of statictext() affected puttygen.c too
[originally from svn r1256]
2001-09-09 10:35:56 +00:00
Simon Tatham 493d34c655 PuTTYgen: add an extra button to save a public key into a file
(as well as showing it for cut and paste). For SSH1, this feature is
largely cosmetic and added for orthogonality; it comes into its own
in SSH2, where it saves the Official One True Public Key Format as
specified in the draft spec, and more particularly as used by
ssh.com's product for authentication. Now that ssh-3.0.1 supports
RSA user keys, this is suddenly actually useful.

[originally from svn r1217]
2001-08-27 17:40:03 +00:00
Simon Tatham fb473cc16c Placate gcc's `-Wall' warnings.
[originally from svn r1121]
2001-05-13 14:02:28 +00:00
Simon Tatham 3730ada5ce Run entire source base through GNU indent to tidy up the varying
coding styles of the various contributors! Woohoo!

[originally from svn r1098]
2001-05-06 14:35:20 +00:00
Simon Tatham 713679a0fa Jacob's patch to make passphrase boxes work more sanely
[originally from svn r1084]
2001-04-28 11:41:33 +00:00
Simon Tatham 522f130391 Pageant interface changes. You can now do `pageant -c command' to
spawn another command after starting Pageant. Also, if Pageant is
already running, `pageant keyfile' and `pageant -c command' will do
the Right Thing, that is, add the key to the _first_ Pageant and/or
run a command and then exit. The only time you now get the `Pageant
is already running' error is if you try to start the second copy
with no arguments.
NB the affected files in this checkin are rather wide-ranging
because I renamed the not really SSH1-specific
`ssh1_bignum_bitcount' function to just `bignum_bitcount'.

[originally from svn r1044]
2001-04-16 11:16:58 +00:00
Simon Tatham a405770ec5 Fix a trivial compiler warning
[originally from svn r1002]
2001-03-15 12:14:09 +00:00
Simon Tatham eee0a20be6 Update the text format of the public key as the comment box is edited
[originally from svn r989]
2001-03-10 10:22:18 +00:00
Simon Tatham 146b5f5f6e Oops - fix silly segfault in new puttygen
[originally from svn r974]
2001-03-03 12:05:36 +00:00
Simon Tatham 28b1fc766c Preliminary support for RSA user authentication in SSH2! Most of the
error messages are currently wrong, and Pageant doesn't yet support
the new key type, and I haven't thoroughly tested that falling back
to password authentication and trying invalid keys etc all work. But
what I have here has successfully performed a public key
authentication, so it's working to at least some extent.

[originally from svn r973]
2001-03-03 11:54:34 +00:00
Simon Tatham f2b218078f Update puttygen GUI code to use Jeremy Sawicki's better group boxes
[originally from svn r887]
2001-01-22 17:25:20 +00:00
Simon Tatham d5240d4157 Make memory management uniform: _everything_ now goes through the
smalloc() macros and thence to the safemalloc() functions in misc.c.
This should allow me to plug in a debugging allocator and track
memory leaks and segfaults and things.

[originally from svn r818]
2000-12-12 10:33:13 +00:00
Simon Tatham 5f73cf092f Impose a lower limit of 256 on key lengths. This is mostly because
the primegen() function doesn't work well with <100 bits, so RSA
keys need to be >=200 to be generated correctly, and I thought 256
was a nice round number beyond that just to be sure. Perhaps I
should also have a security warning on any key less than 768; or
perhaps I should let people shoot themselves in the feet if they
really want to.

[originally from svn r767]
2000-10-25 14:29:28 +00:00
Simon Tatham 4aafc6e5c3 Be more sure that state->collecting_entropy can't be spuriously set
[originally from svn r765]
2000-10-25 10:25:10 +00:00
Simon Tatham 384eeb3f76 Fix miscellaneous compiler warnings. Thanks to Jacob Nevins
[originally from svn r755]
2000-10-24 10:47:49 +00:00
Simon Tatham 5d27e5775c Remove the NO_SECURITY define I accidentally copied from Pageant
[originally from svn r746]
2000-10-23 11:57:41 +00:00
Simon Tatham 26ff0d4e75 A couple of UI tweaks in puttygen
[originally from svn r725]
2000-10-20 10:47:46 +00:00
Simon Tatham 450905f02c Removed TODO comment after verifying that generated keys work
[originally from svn r724]
2000-10-20 10:44:17 +00:00
Simon Tatham 58cdc03c68 Entropy fix after better statistical analysis
[originally from svn r723]
2000-10-20 10:42:31 +00:00
Simon Tatham 92deca11dd Variable key size in PuTTYgen. Also required adding WM_VSCROLL to the
window style in bigeditctrl() in winctrls.c.

[originally from svn r722]
2000-10-20 10:07:53 +00:00