1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-04 13:02:47 -05:00

Introduce OpenSSH-compatible SHA256 key fingerprinting.

There's a new enumeration of fingerprint types, and you tell
ssh2_fingerprint() or ssh2_fingerprint_blob() which of them to use.

So far, this is only implemented behind the scenes, and exposed for
testcrypt to test. All the call sites of ssh2_fingerprint pass a fixed
default fptype, which is still set to the old MD5. That will change
shortly.
This commit is contained in:
Simon Tatham
2021-03-13 09:52:56 +00:00
parent 0bc78dea68
commit 1da353e649
11 changed files with 133 additions and 45 deletions

View File

@ -178,7 +178,7 @@ def make_argword(arg, argtype, fnname, argindex, to_preserve):
if typename in {
"hashalg", "macalg", "keyalg", "cipheralg",
"dh_group", "ecdh_alg", "rsaorder", "primegenpolicy",
"argon2flavour"}:
"argon2flavour", "fptype"}:
arg = coerce_to_bytes(arg)
if isinstance(arg, bytes) and b" " not in arg:
return arg