simon-git: putty (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Tue Aug 2 18:43:31 BST 2022
TL;DR:
fea08bb2 Windows Pageant: use nicer key-type strings.
ff2ffa53 Windows Pageant: display RSA/DSA cert bit counts.
b6d7c81d Windows Pageant: dynamically size list box columns.
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-08-02 18:43:31
commit fea08bb24499dc76e3fb58895ca0f015714a1d53
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=fea08bb24499dc76e3fb58895ca0f015714a1d53;hp=3e7274fdad91069022994c1a3aa43c4aef6ef713
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Aug 2 17:54:47 2022 +0100
Windows Pageant: use nicer key-type strings.
If you load a certified key into Windows Pageant, the official SSH id
for the key type is so long that it overflows its space in the list
box and overlaps the key fingerprint hash.
This commit introduces yet another footling little ssh_keyalg method
which returns a shorter human-readable description of the key type,
and uses that in the Windows Pageant list box only.
(Not in the Unix Pageant list, though, because being output to stdout,
that seems like something people are more likely to want to
machine-read, which firstly means we shouldn't change it lightly, and
secondly, if we did change it we'd want to avoid having a variable
number of spaces in the replacement key type text.)
crypto/dsa.c | 3 +++
crypto/ecc-ssh.c | 25 ++++++++++++++++++++-----
crypto/openssh-certs.c | 10 ++++++++++
crypto/rsa.c | 3 +++
ssh.h | 3 +++
windows/pageant.c | 20 ++++++++++++++++----
6 files changed, 55 insertions(+), 9 deletions(-)
commit ff2ffa539c4ce6051fc9010abacb05510bded46f
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=ff2ffa539c4ce6051fc9010abacb05510bded46f;hp=fea08bb24499dc76e3fb58895ca0f015714a1d53
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Aug 2 18:14:06 2022 +0100
Windows Pageant: display RSA/DSA cert bit counts.
The test in the Pageant list box code for whether we should display
the bit count of a key was done by checking specifically for ssh_rsa
or ssh_dsa, which of course meant that it didn't catch the certified
versions of those keys.
Now there's yet another footling ssh_keyalg method that asks the
question 'is it worth displaying the bit count?', to which RSA and DSA
answer yes, and the opensshcert family delegates to its base key type,
so that RSA and DSA certified keys also answer yes.
(This isn't the same as ssh_key_public_bits(alg, blob) >= 0. All
supported public key algorithms _can_ display a bit count if called
on. But only in RSA and DSA is it configurable, and therefore worth
bothering to print in the list box.)
Also in this commit, I've fixed a bug in the certificate
implementation of public_bits, which was passing a wrongly formatted
public blob to the underlying key. (Done by factoring out the code
from opensshcert_new_shared which constructed the _correct_ public
blob, and reusing it in public_bits to do the same job.)
crypto/dsa.c | 1 +
crypto/ecc-ssh.c | 5 +++++
crypto/openssh-certs.c | 50 +++++++++++++++++++++++++++++++++-----------------
crypto/rsa.c | 1 +
ssh.h | 5 +++++
utils/nullkey.c | 3 +++
windows/pageant.c | 15 ++++-----------
7 files changed, 52 insertions(+), 28 deletions(-)
commit b6d7c81d43a7d54cbdd4dcee75099248227627f9
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=b6d7c81d43a7d54cbdd4dcee75099248227627f9;hp=ff2ffa539c4ce6051fc9010abacb05510bded46f
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Aug 2 18:34:18 2022 +0100
Windows Pageant: dynamically size list box columns.
The fixed tab stops that we used to use in the old LBS_HASSTRINGS list
box, and that I carefully replicated in the new owner-drawn version,
are no more! Now, every time we refresh the key list, we actually
_measure_ the maximum size of string that needs to fit into each
column, and size the columns based on that.
Now I don't have to worry any more about whether the set of algorithm
names might one day overflow the fixed column width, or whether a
particularly unlucky choice of key with lots of wide letters like M
and W in its base64-encoded SHA256 hash might do the same.
Also, the previous column sizes were pessimistic (for reason of
exactly that worry), so this change generally moves things over
towards the left of the list box - which means there's now room for
longer key comments, and more chance of the suffixes '(encrypted)' or
'(re-encryptable)' being visible on the right.
windows/pageant.c | 58 +++++++++++++++++++++++++++++++++++++++----------------
1 file changed, 41 insertions(+), 17 deletions(-)
More information about the tartarus-commits
mailing list