mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 11:32:48 -05:00
Expose the rest of LoadedFile in headers.
This will allow it to be used more conveniently for things other than key files. For the moment, the implementation still lives in sshpubk.c. Moving it out into utils.c or misc.c would be nicer, but it has awkward dependencies on marshal.c and the per-platform f_open function. Perhaps another time.
This commit is contained in:
11
ssh.h
11
ssh.h
@ -1197,18 +1197,9 @@ int rsa1_loadpub_f(const Filename *filename, BinarySink *bs,
|
||||
const ssh_keyalg *find_pubkey_alg(const char *name);
|
||||
const ssh_keyalg *find_pubkey_alg_len(ptrlen name);
|
||||
|
||||
/*
|
||||
* A mechanism for loading a key file from disk into a memory buffer
|
||||
* where it can be picked apart as a BinarySource.
|
||||
*/
|
||||
struct LoadedFile {
|
||||
char *data;
|
||||
size_t len, max_size;
|
||||
BinarySource_IMPLEMENTATION;
|
||||
};
|
||||
/* 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);
|
||||
void lf_free(LoadedFile *lf);
|
||||
|
||||
enum {
|
||||
SSH_KEYTYPE_UNOPENABLE,
|
||||
|
Reference in New Issue
Block a user