simon-git: putty (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sun May 1 14:57:18 BST 2022
TL;DR:
77d15c46 New typedef 'dlgcontrol' wrapping 'union control'.
89883bf1 Restructure dlgcontrol as a struct with an anon union.
259e877b New command-line option: 'putty --host-ca'.
694d5184 Permit button-only file selectors.
4fcb3bbe Move host CA config box out into its own source file.
ddcd93ab CA config box: add a 'Read from file' button.
2a44b635 CA config: make the 'Done' button cancel and not default.
d06ae2f5 New utility function base64_valid().
6472b5de CA config: permit pasting a whole OpenSSH public key.
8d2c643f CA config: protect against saving a key with no wildcards.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2022-05-01 14:57:18
commit 77d15c46c308d262feca61698a74e59fe0c1f3f1
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=77d15c46c308d262feca61698a74e59fe0c1f3f1;hp=958304897d7bcb99438c4254c29dd18d0f20b61d
Author: Simon Tatham <anakin at pobox.com>
Date: Sun May 1 09:48:38 2022 +0100
New typedef 'dlgcontrol' wrapping 'union control'.
I'm about to change my mind about whether its top-level nature is
struct or union, and rather than change the key word 'union' to
'struct' at every point of use, it's nicer to just get rid of the
keyword completely. So it has a shiny new name.
config.c | 120 +++++++++++++++++++++----------------------
defs.h | 1 +
dialog.c | 110 +++++++++++++++++++--------------------
dialog.h | 148 ++++++++++++++++++++++++++---------------------------
putty.h | 13 +++--
test/fuzzterm.c | 56 ++++++++++----------
unix/config-gtk.c | 6 +--
unix/config-unix.c | 2 +-
unix/dialog.c | 80 ++++++++++++++---------------
windows/config.c | 12 ++---
windows/controls.c | 70 ++++++++++++-------------
windows/platform.h | 10 ++--
12 files changed, 313 insertions(+), 315 deletions(-)
commit 89883bf158a4615b13047869755a71abbf91e204
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=89883bf158a4615b13047869755a71abbf91e204;hp=77d15c46c308d262feca61698a74e59fe0c1f3f1
Author: Simon Tatham <anakin at pobox.com>
Date: Sun May 1 09:55:52 2022 +0100
Restructure dlgcontrol as a struct with an anon union.
This gets rid of that awkward STANDARD_PREFIX system in which every
branch of the old 'union control' had to repeat all the generic
fields, and then call sites had to make an arbitrary decision about
which branch to access them through.
That was the best we could do before accepting C99 features in this
code base. But now we have anonymous unions, so we don't need to put
up with that nonsense any more!
'dlgcontrol' is now a struct rather than a union, and the generic
fields common to all control types are ordinary members of the struct,
so you don't have to refer to them as ctrl->generic.foo at all, just
ctrl->foo, which saves verbiage at the point of use.
The extra per-control fields are still held in structures named after
the control type, so you'll still say ctrl->listbox.height or
whatever. But now those structures are themselves members of an
anonymous union field following the generic fields, so those
sub-structures don't have to reiterate all the standard stuff too.
While I'm here, I've promoted 'context2' from an editbox-specific
field to a generic one (it just seems silly _not_ to allow any control
to have two context fields if it needs it). Also, I had to rename the
boolean field 'tabdelay' to avoid it clashing with the subsidiary
structure field 'tabdelay', now that the former isn't generic.tabdelay
any more.
config.c | 180 ++++++++--------
defs.h | 2 +-
dialog.c | 46 ++---
dialog.h | 591 +++++++++++++++++++++++++----------------------------
unix/config-gtk.c | 8 +-
unix/config-unix.c | 8 +-
unix/dialog.c | 156 +++++++-------
windows/config.c | 30 +--
windows/controls.c | 142 ++++++-------
9 files changed, 569 insertions(+), 594 deletions(-)
commit 259e877b92ba81dec58aa4ce6a2bdbe8fc320e46
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=259e877b92ba81dec58aa4ce6a2bdbe8fc320e46;hp=89883bf158a4615b13047869755a71abbf91e204
Author: Simon Tatham <anakin at pobox.com>
Date: Sun May 1 08:22:44 2022 +0100
New command-line option: 'putty --host-ca'.
This causes PuTTY to bring up just the host CA configuration dialog
box, and shut down once that box is dismissed.
I can imagine it potentially being useful to users, but in the first
instance, I expect it to be useful to _me_, because it will greatly
streamline testing changes to the UI of that dialog!
unix/dialog.c | 21 ++++++++++++++++++---
unix/main-gtk-simple.c | 5 +++++
unix/platform.h | 1 +
windows/putty.c | 4 ++++
4 files changed, 28 insertions(+), 3 deletions(-)
commit 694d5184b72505a6e22f6c359db882789cb9ec7b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=694d5184b72505a6e22f6c359db882789cb9ec7b;hp=259e877b92ba81dec58aa4ce6a2bdbe8fc320e46
Author: Simon Tatham <anakin at pobox.com>
Date: Sun May 1 08:39:49 2022 +0100
Permit button-only file selectors.
Instead of an edit box together with a Browse button that pops up a
sub-dialog, this is _just_ the browse button, only now it has a
user-defined title. I'm about to want to use this for loading CA
public keys from files.
dialog.h | 31 +++++++++++++
unix/dialog.c | 127 ++++++++++++++++++++++++++++++++---------------------
windows/controls.c | 57 +++++++++++++++++-------
3 files changed, 150 insertions(+), 65 deletions(-)
commit 4fcb3bbe818b681edb49caa3264106238b889368
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=4fcb3bbe818b681edb49caa3264106238b889368;hp=694d5184b72505a6e22f6c359db882789cb9ec7b
Author: Simon Tatham <anakin at pobox.com>
Date: Sun May 1 09:16:46 2022 +0100
Move host CA config box out into its own source file.
In the course of polishing up this dialog box, I'm going to want it to
actually do cryptographic things (such as checking validity of a
public key blob and printing its fingerprint), which means it will
need to link against SSH utility functions.
So I've moved the dialog-box setup and handling code out of config.c
into a new file in the ssh subdirectory and in the ssh library, where
those facilities will be conveniently available.
This also means that dialog-box setup code _won't_ be linked into
PuTTYtel or pterm (on either platform), so I've added a stub source
file to provide its entry-point function in those tools. Also,
provided a const bool to indicate whether that dialog is available,
which we use to decide whether to recognise that command-line option.
config.c | 361 -----------------------------------------------
putty.h | 1 +
ssh/CMakeLists.txt | 1 +
ssh/ca-config.c | 372 +++++++++++++++++++++++++++++++++++++++++++++++++
stubs/no-ca-config.c | 14 ++
unix/CMakeLists.txt | 3 +
unix/main-gtk-simple.c | 5 +-
windows/CMakeLists.txt | 2 +
windows/putty.c | 5 +-
9 files changed, 399 insertions(+), 365 deletions(-)
commit ddcd93ab1230b2bf4b34f007e356b40780b50c8f
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=ddcd93ab1230b2bf4b34f007e356b40780b50c8f;hp=4fcb3bbe818b681edb49caa3264106238b889368
Author: Simon Tatham <anakin at pobox.com>
Date: Sun May 1 09:31:20 2022 +0100
CA config box: add a 'Read from file' button.
This allows you to load a CA public key from a disk file (in any
format acceptable to ppk_load_pub, which means OpenSSH one-line public
keys and also RFC4716 ones).
ssh/ca-config.c | 42 +++++++++++++++++++++++++++++++++++++++---
1 file changed, 39 insertions(+), 3 deletions(-)
commit 2a44b6354f5a251afe3dd3a1b835cea4517ee629
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=2a44b6354f5a251afe3dd3a1b835cea4517ee629;hp=ddcd93ab1230b2bf4b34f007e356b40780b50c8f
Author: Simon Tatham <anakin at pobox.com>
Date: Sun May 1 09:33:28 2022 +0100
CA config: make the 'Done' button cancel and not default.
This means that, on the one hand, an absentminded press of Return
doesn't dismiss the entire CA config box, which would be pretty
annoying if you were half way through entering a load of fiddly stuff.
And on the other hand, you _can_ press Escape to dismiss the box,
which is less likely to happen by accident.
ssh/ca-config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit d06ae2f5c345741192a0e3f9086765382690e37b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=d06ae2f5c345741192a0e3f9086765382690e37b;hp=2a44b6354f5a251afe3dd3a1b835cea4517ee629
Author: Simon Tatham <anakin at pobox.com>
Date: Sun May 1 11:19:10 2022 +0100
New utility function base64_valid().
For when you want to tell the difference between a base64-encoded
string and some other kind of string that might replace it.
misc.h | 1 +
utils/CMakeLists.txt | 1 +
utils/base64_valid.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 56 insertions(+)
commit 6472b5ded76c76ac388598b6998effc73861368b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=6472b5ded76c76ac388598b6998effc73861368b;hp=d06ae2f5c345741192a0e3f9086765382690e37b
Author: Simon Tatham <anakin at pobox.com>
Date: Sun May 1 11:27:46 2022 +0100
CA config: permit pasting a whole OpenSSH public key.
Now, we try putting the contents of the public-key edit box through
ppk_load_s if it isn't a plain base64-encoded string.
ssh/ca-config.c | 34 +++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
commit 8d2c643fcb3b475a1bb3c7540b9d634cf16b9f05
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=8d2c643fcb3b475a1bb3c7540b9d634cf16b9f05;hp=6472b5ded76c76ac388598b6998effc73861368b
Author: Simon Tatham <anakin at pobox.com>
Date: Sun May 1 11:29:54 2022 +0100
CA config: protect against saving a key with no wildcards.
ssh/ca-config.c | 5 +++++
1 file changed, 5 insertions(+)
More information about the tartarus-commits
mailing list