Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ssh.h
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2022-04-21 13:00:16 +0300
committerSimon Tatham <anakin@pobox.com>2022-04-24 10:38:27 +0300
commita5c0205b8715e99097fae3b4f754af1d8102e953 (patch)
tree747a0170eaa181e47cc556b50d2442098e0cc729 /ssh.h
parente7d51505c7b10640ccaf724da4266afe8a079c38 (diff)
Utility functions to get the algorithm from a public key.
Every time I've had to do this before, I've always done the three-line dance of initialising a BinarySource and calling get_string on it. It's long past time I wrapped that up into a convenient subroutine.
Diffstat (limited to 'ssh.h')
-rw-r--r--ssh.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/ssh.h b/ssh.h
index 690d55c7..6d808cc1 100644
--- a/ssh.h
+++ b/ssh.h
@@ -1331,6 +1331,9 @@ extern const size_t n_keyalgs;
const ssh_keyalg *find_pubkey_alg(const char *name);
const ssh_keyalg *find_pubkey_alg_len(ptrlen name);
+ptrlen pubkey_blob_to_alg_name(ptrlen blob);
+const ssh_keyalg *pubkey_blob_to_alg(ptrlen blob);
+
/* Convenient wrappers on the LoadedFile mechanism suitable for key files */
LoadedFile *lf_load_keyfile(const Filename *filename, const char **errptr);
LoadedFile *lf_load_keyfile_fp(FILE *fp, const char **errptr);