1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Certificate-aware handling of key fingerprints.

OpenSSH, when called on to give the fingerprint of a certified public
key, will in many circumstances generate the hash of the public blob
of the _underlying_ key, rather than the hash of the full certificate.

I think the hash of the certificate is also potentially useful (if
nothing else, it provides a way to tell apart multiple certificates on
the same key). But I can also see that it's useful to be able to
recognise a key as the same one 'really' (since all certificates on
the same key share a private key, so they're unavoidably related).

So I've dealt with this by introducing an extra pair of fingerprint
types, giving the cross product of {MD5, SHA-256} x {base key only,
full certificate}. You can manually select which one you want to see
in some circumstances (notably PuTTYgen), and in others (such as
diagnostics) both fingerprints will be emitted side by side via the
new functions ssh2_double_fingerprint[_blob].

The default, following OpenSSH, is to just fingerprint the base key.
This commit is contained in:
Simon Tatham
2022-08-05 18:08:59 +01:00
parent e711a08daf
commit cd7f6c4407
11 changed files with 150 additions and 18 deletions

View File

@ -600,6 +600,8 @@ static INT_PTR CALLBACK KeyListProc(HWND hwnd, UINT msg,
} fptypes[] = {
{"SHA256", SSH_FPTYPE_SHA256},
{"MD5", SSH_FPTYPE_MD5},
{"SHA256 including certificate", SSH_FPTYPE_SHA256_CERT},
{"MD5 including certificate", SSH_FPTYPE_MD5_CERT},
};
switch (msg) {

View File

@ -60,7 +60,7 @@ BEGIN
PUSHBUTTON "&Help", IDC_KEYLIST_HELP, 10, 212, 50, 14
DEFPUSHBUTTON "&Close", IDOK, 390, 212, 50, 14
LTEXT "&Fingerprint type:", IDC_KEYLIST_FPTYPE_STATIC, 10, 172, 60, 8
COMBOBOX IDC_KEYLIST_FPTYPE, 70, 170, 60, 12, CBS_DROPDOWNLIST
COMBOBOX IDC_KEYLIST_FPTYPE, 70, 170, 100, 12, CBS_DROPDOWNLIST
END
/* Accelerators used: cl */