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

46 Коммитов

Автор SHA1 Сообщение Дата
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
Simon Tatham 8c138ebd41 Check whether key was actually saved, and warn if not
[originally from svn r720]
2000-10-20 09:43:58 +00:00
Simon Tatham 918c9ddfc5 Save Key now prompts before overwriting an existing file
[originally from svn r719]
2000-10-20 09:41:13 +00:00
Simon Tatham 76638e62be Add a second passphrase prompt to protect against typos
[originally from svn r717]
2000-10-20 09:31:16 +00:00
Simon Tatham 0210709520 We must InitCommonControls() or the progress bar doesn't work on 95
[originally from svn r716]
2000-10-20 09:24:44 +00:00
Simon Tatham 8d0bee8629 PuTTYgen initial version. Still to do are basic user-friendliness
features (prompt for passphrase twice, prompt before overwriting a
file, check the key file was actually saved OK), testing of the
generated keys to make sure I got the file format right, and support
for a variable key size. I think what's already here is basically
sound though.

[originally from svn r715]
2000-10-19 15:43:08 +00:00