1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00
putty-source/utils/nullkey.c
Simon Tatham cf36b9215f 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.
2022-04-24 08:39:04 +01:00

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;
}