1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 11:32:48 -05:00

Expose a global list of known host key algorithms.

The information was already centralised in find_pubkey_alg, but that
had a query-based API that couldn't enumerate the key types. Now I
expose an underlying array so that it's possible to iterate over them.

Also, I'd forgotten to add the two new rsa-sha2-* algorithms to
find_pubkey_alg. That's also done as part of this commit.
This commit is contained in:
Simon Tatham
2020-11-22 08:40:38 +00:00
parent e105908661
commit 24444eb396
2 changed files with 20 additions and 16 deletions

2
ssh.h
View File

@ -1230,6 +1230,8 @@ int rsa1_loadpub_s(BinarySource *src, BinarySink *bs,
int rsa1_loadpub_f(const Filename *filename, BinarySink *bs,
char **commentptr, const char **errorstr);
extern const ssh_keyalg *const all_keyalgs[];
extern const size_t n_keyalgs;
const ssh_keyalg *find_pubkey_alg(const char *name);
const ssh_keyalg *find_pubkey_alg_len(ptrlen name);