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

19 Коммитов

Автор SHA1 Сообщение Дата
Simon Tatham 1f04a58f8d Jacob's last-minute testing found a couple of trivial bugs in
import.c, and my attempts to reproduce them in cmdgen found another
one there :-)

[originally from svn r3847]
2004-02-11 13:58:27 +00:00
Simon Tatham 7b140b2fe7 Placate some gcc warnings.
[originally from svn r3761]
2004-01-22 18:52:49 +00:00
Simon Tatham 72c53fcb75 My ASN.1 decoder returned wrong IDs for anything above 0x1E! Good
job it's never had to yet. Ahem.

[originally from svn r3479]
2003-10-03 21:21:23 +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
Ben Harris e572c48a4a Make various internal functions static.
[originally from svn r2847]
2003-02-15 13:29:26 +00:00
Ben Harris a0e773df86 Convert implicit (char *) and (unsigned char *) casts to explicit ones.
[originally from svn r2840]
2003-02-12 23:06:40 +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
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 a6c994ca94 Move prototypes for base64_decode_atom(), base64_lines(), and base64_encode()
from import.c to ssh.h, so that the implementation can see them.  This
necessitates ssh.h's including <stdio.h>.
Also remove a spare prototype for base64_encode_atom() from import.c.

[originally from svn r2481]
2003-01-05 23:28:02 +00:00
Simon Tatham 2317fe7e53 Fix some compiler warnings.
[originally from svn r2134]
2002-10-25 13:00:45 +00:00
Simon Tatham 802aeb2d5e Failure to initialise a local variable was leading to free(garbage)
on loading an OpenSSH key and getting the wrong passphrase.

[originally from svn r1737]
2002-06-17 16:45:41 +00:00
Simon Tatham 729512abc2 Padding on the end of the encrypted data in OpenSSH key format was
broken: the OpenSSL EVP layer specifies a very particular form of
padding, which I wasn't generating because it hadn't occurred to me
that it might be mandatory. Irritatingly this was causing our
exported OpenSSH keys to load perfectly happily back in through our
OpenSSH import routines, but to be rejected by OpenSSH proper. Sigh.

[originally from svn r1733]
2002-06-15 16:31:22 +00:00
Simon Tatham ab1d4f5dce Small memory allocation bug in openssh_encrypted() fixed.
[originally from svn r1732]
2002-06-15 15:37:15 +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 286f1f5b1f Be more careful about destroying sensitive data after private key
load/store/import operations.

[originally from svn r1673]
2002-05-13 16:37:11 +00:00
Simon Tatham 3b20d71a7e Add import of ssh.com private keys.
[originally from svn r1672]
2002-05-13 16:32:42 +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