mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
cf36b9215f
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.
14 lines
255 B
C
14 lines
255 B
C
#include "misc.h"
|
|
#include "ssh.h"
|
|
|
|
unsigned nullkey_supported_flags(const ssh_keyalg *self)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
const char *nullkey_alternate_ssh_id(const ssh_keyalg *self, unsigned flags)
|
|
{
|
|
/* There are no alternate ids */
|
|
return self->ssh_id;
|
|
}
|