1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00
putty-source/windows
Simon Tatham 0fc2d3b455 Invent a struct type for polymorphic SSH key data.
During last week's work, I made a mistake in which I got the arguments
backwards in one of the key-blob-generating functions - mistakenly
swapped the 'void *' key instance with the 'BinarySink *' output
destination - and I didn't spot the mistake until run time, because in
C you can implicitly convert both to and from void * and so there was
no compile-time failure of type checking.

Now that I've introduced the FROMFIELD macro that downcasts a pointer
to one field of a structure to retrieve a pointer to the whole
structure, I think I might start using that more widely to indicate
this kind of polymorphic subtyping. So now all the public-key
functions in the struct ssh_signkey vtable handle their data instance
in the form of a pointer to a subfield of a new zero-sized structure
type 'ssh_key', which outside the key implementations indicates 'this
is some kind of key instance but it could be of any type'; they
downcast that pointer internally using FROMFIELD in place of the
previous ordinary C cast, and return one by returning &foo->sshk for
whatever foo they've just made up.

The sshk member is not at the beginning of the structure, which means
all those FROMFIELDs and &key->sshk are actually adding and
subtracting an offset. Of course I could have put the member at the
start anyway, but I had the idea that it's actually a feature _not_ to
have the two types start at the same address, because it means you
should notice earlier rather than later if you absentmindedly cast
from one to the other directly rather than by the approved method (in
particular, if you accidentally assign one through a void * and back
without even _noticing_ you perpetrated a cast). In particular, this
enforces that you can't sfree() the thing even once without realising
you should instead of called the right freekey function. (I found
several bugs by this method during initial testing, so I think it's
already proved its worth!)

While I'm here, I've also renamed the vtable structure ssh_signkey to
ssh_keyalg, because it was a confusing name anyway - it describes the
_algorithm_ for handling all keys of that type, not a specific key. So
ssh_keyalg is the collection of code, and ssh_key is one instance of
the data it handles.
2018-05-27 15:28:54 +01:00
..
installer.wxs Use / in pathnames in the Wix installer source. 2017-05-25 08:22:22 +01:00
pageant.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
pageant.mft Make manifest files work with 64bit builds of PuTTY. 2015-08-15 13:54:44 +01:00
pageant.rc Pageant and PuTTYgen About boxes: add the website button. 2017-02-22 07:06:00 +00:00
pageants.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
plink.rc `win-versioninfo': all builds of all Windows binaries now contain 2005-10-04 14:13:28 +00:00
pscp.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
pscp.rc `win-versioninfo': all builds of all Windows binaries now contain 2005-10-04 14:13:28 +00:00
psftp.rc `win-versioninfo': all builds of all Windows binaries now contain 2005-10-04 14:13:28 +00:00
putty.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
putty.iss Update version number for 0.70 release. 2017-07-04 20:29:54 +01:00
putty.mft Make manifest files work with 64bit builds of PuTTY. 2015-08-15 13:54:44 +01:00
putty.rc `win-versioninfo': all builds of all Windows binaries now contain 2005-10-04 14:13:28 +00:00
puttycfg.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
puttygen.ico Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
puttygen.mft Make manifest files work with 64bit builds of PuTTY. 2015-08-15 13:54:44 +01:00
puttygen.rc Pageant and PuTTYgen About boxes: add the website button. 2017-02-22 07:06:00 +00:00
puttyins.ico `installer.ico' doesn't fit into 8.3, so gets truncated to INSTALLE.ICO in 2007-02-06 22:39:15 +00:00
puttytel.rc `win-versioninfo': all builds of all Windows binaries now contain 2005-10-04 14:13:28 +00:00
rcstuff.h Remove Makefile.bor. 2017-09-13 19:26:28 +01:00
README-msi.txt Switch chiark URLs to https. 2017-05-07 16:29:01 +01:00
README.txt Switch chiark URLs to https. 2017-05-07 16:29:01 +01:00
sizetip.c Sprinkle some header comments in various files in an attempt to explain what 2006-04-23 18:26:03 +00:00
version.rc2 Stop copying the licence text into C source code. 2016-02-29 19:59:35 +00:00
website.url Switch chiark URLs to https. 2017-05-07 16:29:01 +01:00
win_res.h Use readonly edit controls in some Windows dialogs. 2016-02-29 19:59:35 +00:00
win_res.rc2 Expand the About box. 2017-07-04 19:35:18 +01:00
wincapi.c Coverity build fixes. 2017-06-20 19:02:48 +01:00
wincapi.h Make our process's ACL more restrictive. 2016-02-29 19:59:34 +00:00
wincfg.c Document 'Permit control characters in pasted text' 2018-03-24 15:35:46 +00:00
wincons.c Remove vestiges of attempt at MS Crypto API support. 2018-05-26 09:19:38 +01:00
winctrls.c A small pile of Windows compiler-warning fixes. 2017-12-10 09:22:22 +00:00
windefs.c Turn 'Filename' into a dynamically allocated type with no arbitrary 2011-10-02 11:01:57 +00:00
windlg.c Add missing casts in dupcat(). 2018-02-13 19:45:54 +00:00
window.c Make lots of generic data parameters into 'void *'. 2018-05-26 09:22:43 +01:00
wingss.c Support GSS key exchange, for Kerberos 5 only. 2018-04-26 07:21:16 +01:00
winhandl.c Fix an EOF-testing goof in winhandl.c. 2017-02-03 19:33:50 +00:00
winhelp.c A small pile of Windows compiler-warning fixes. 2017-12-10 09:22:22 +00:00
winhelp.h Option to support VT100 line drawing in UTF-8 mode. 2018-05-12 08:48:20 +01:00
winhsock.c Make lots of generic data parameters into 'void *'. 2018-05-26 09:22:43 +01:00
winjump.c Add automatic type-checking to GET_WINDOWS_FUNCTION. 2017-04-11 18:56:55 +01:00
winmisc.c Use the BinarySink system for conf serialisation. 2018-05-25 14:36:16 +01:00
winnet.c Make lots of generic data parameters into 'void *'. 2018-05-26 09:22:43 +01:00
winnoise.c Been meaning to get round to this for a while: use CryptGenRandom to 2013-07-20 08:34:54 +00:00
winnojmp.c Fix up svn:eol-style and svn:keywords on new files. 2010-12-27 00:24:48 +00:00
winnpc.c Merge branch 'pre-0.67' 2016-02-29 19:59:59 +00:00
winnps.c In GUI PuTTY, log standard error from local proxy commands. 2015-11-22 15:11:00 +00:00
winpgen.c Invent a struct type for polymorphic SSH key data. 2018-05-27 15:28:54 +01:00
winpgnt.c Build SSH agent reply messages in a BinarySink. 2018-05-25 14:36:16 +01:00
winpgntc.c Build outgoing SSH agent requests in a strbuf. 2018-05-25 14:36:16 +01:00
winplink.c Make lots of generic data parameters into 'void *'. 2018-05-26 09:22:43 +01:00
winprint.c Seek all Windows print functions in winspool.drv. 2017-06-15 23:37:16 +01:00
winproxy.c Add an assortment of missing frees and closes. 2017-02-14 22:14:25 +00:00
winsecur.c clang-specific pragmas to suppress -Wmissing-braces. 2017-02-05 11:53:58 +00:00
winsecur.h Turn off Windows process ACL restriction by default. 2017-01-29 23:08:19 +00:00
winser.c Add an assortment of missing frees and closes. 2017-02-14 22:14:25 +00:00
winsftp.c Make {term,}get_userpass_input take a bufchain. 2018-05-18 07:22:57 +01:00
winshare.c Replace all uses of SHA*_Bytes / MD5Update. 2018-05-25 14:36:16 +01:00
winstore.c A bunch of further warning fixes in the Windows code. 2017-02-03 19:37:59 +00:00
winstuff.h New header file 'defs.h'. 2018-05-25 14:12:44 +01:00
wintime.c wintime: add a precautionary memset to zero. 2017-02-14 23:25:25 +00:00
winucs.c Reformat the composetbl[] array in winucs.c. 2017-04-08 15:10:57 +01:00
winutils.c Remove assorted dead code. 2017-02-14 22:18:01 +00:00
winx11.c Post-release destabilisation! Completely remove the struct type 2011-07-14 18:52:21 +00:00

PuTTY README
============

This is the README file for the PuTTY installer distribution. If
you're reading this, you've probably just run our installer and
installed PuTTY on your system.

What should I do next?
----------------------

If you want to use PuTTY to connect to other computers, or use PSFTP
to transfer files, you should just be able to run them from the
Start menu.

If you want to use the command-line-only file transfer utility PSCP,
you will probably want to put the PuTTY installation directory on
your PATH. On Windows 7 and similar versions, you can do this at
Control Panel > System and Security > System > Advanced system
settings > Environment Variables.

Some versions of Windows will refuse to run HTML Help files (.CHM)
if they are installed on a network drive. If you have installed
PuTTY on a network drive, you might want to check that the help file
works properly. If not, see http://support.microsoft.com/kb/896054
for information on how to solve this problem.

What do I do if it doesn't work?
--------------------------------

The PuTTY home web site is

    https://www.chiark.greenend.org.uk/~sgtatham/putty/

Here you will find our list of known bugs and pending feature
requests. If your problem is not listed in there, or in the FAQ, or
in the manuals, read the Feedback page to find out how to report
bugs to us. PLEASE read the Feedback page carefully: it is there to
save you time as well as us. Do not send us one-line bug reports
telling us `it doesn't work'.