mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-13 00:57:33 -05:00
ssh_keyalg: new method 'alternate_ssh_id'.
Previously, the fact that "ssh-rsa" sometimes comes with two subtypes "rsa-sha2-256" and "rsa-sha2-512" was known to three different parts of the code - two in userauth and one in transport. Now the knowledge of what those ids are, which one goes with which signing flags, and which key types have subtypes at all, is centralised into a method of the key algorithm, and all those locations just query it. This will enable the introduction of further key algorithms that have a parallel upgrade system.
This commit is contained in:
@ -1258,6 +1258,7 @@ const ssh_keyalg ssh_ecdsa_ed25519 = {
|
||||
.components = eddsa_components,
|
||||
.pubkey_bits = ec_shared_pubkey_bits,
|
||||
.supported_flags = nullkey_supported_flags,
|
||||
.alternate_ssh_id = nullkey_alternate_ssh_id,
|
||||
.ssh_id = "ssh-ed25519",
|
||||
.cache_id = "ssh-ed25519",
|
||||
.extra = &sign_extra_ed25519,
|
||||
@ -1282,6 +1283,7 @@ const ssh_keyalg ssh_ecdsa_ed448 = {
|
||||
.components = eddsa_components,
|
||||
.pubkey_bits = ec_shared_pubkey_bits,
|
||||
.supported_flags = nullkey_supported_flags,
|
||||
.alternate_ssh_id = nullkey_alternate_ssh_id,
|
||||
.ssh_id = "ssh-ed448",
|
||||
.cache_id = "ssh-ed448",
|
||||
.extra = &sign_extra_ed448,
|
||||
@ -1310,6 +1312,7 @@ const ssh_keyalg ssh_ecdsa_nistp256 = {
|
||||
.components = ecdsa_components,
|
||||
.pubkey_bits = ec_shared_pubkey_bits,
|
||||
.supported_flags = nullkey_supported_flags,
|
||||
.alternate_ssh_id = nullkey_alternate_ssh_id,
|
||||
.ssh_id = "ecdsa-sha2-nistp256",
|
||||
.cache_id = "ecdsa-sha2-nistp256",
|
||||
.extra = &sign_extra_nistp256,
|
||||
@ -1338,6 +1341,7 @@ const ssh_keyalg ssh_ecdsa_nistp384 = {
|
||||
.components = ecdsa_components,
|
||||
.pubkey_bits = ec_shared_pubkey_bits,
|
||||
.supported_flags = nullkey_supported_flags,
|
||||
.alternate_ssh_id = nullkey_alternate_ssh_id,
|
||||
.ssh_id = "ecdsa-sha2-nistp384",
|
||||
.cache_id = "ecdsa-sha2-nistp384",
|
||||
.extra = &sign_extra_nistp384,
|
||||
@ -1366,6 +1370,7 @@ const ssh_keyalg ssh_ecdsa_nistp521 = {
|
||||
.components = ecdsa_components,
|
||||
.pubkey_bits = ec_shared_pubkey_bits,
|
||||
.supported_flags = nullkey_supported_flags,
|
||||
.alternate_ssh_id = nullkey_alternate_ssh_id,
|
||||
.ssh_id = "ecdsa-sha2-nistp521",
|
||||
.cache_id = "ecdsa-sha2-nistp521",
|
||||
.extra = &sign_extra_nistp521,
|
||||
|
Reference in New Issue
Block a user