1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/stubs/null-key.c
Simon Tatham 6a1b713e13 Reorganise the stubs collection.
I made a specific subdirectory 'stubs' to keep all the link-time stub
modules in, like notiming.c. And I put _one_ run-time stub in it,
namely nullplug.c. But the rest of the runtime stubs went into utils.

I think it's better to keep all the stubs together, so I've moved all
the null*.c in utils into stubs (with the exception of nullstrcmp.c,
which means the 'null' in a different sense). Also, fiddled with the
naming to be a bit more consistent, and stated in the new CMakeLists
the naming policy that distinguishes no-*.c from null-*.c.
2022-09-01 20:43:23 +01:00

23 lines
519 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;
}
ssh_key *nullkey_base_key(ssh_key *key)
{
/* When a key is not certified, it is its own base */
return key;
}
bool nullkey_variable_size_no(const ssh_keyalg *self) { return false; }
bool nullkey_variable_size_yes(const ssh_keyalg *self) { return true; }