summaryrefslogtreecommitdiff
path: root/other/openssh-reverse/authfile.h
diff options
context:
space:
mode:
authorSkyperTHC2026-03-03 06:28:55 +0000
committerSkyperTHC2026-03-03 06:28:55 +0000
commit5d3573ef7a109ee70416fe94db098fe6a769a798 (patch)
treedc2d5b294c9db8ab2db7433511f94e1c4bb8b698 /other/openssh-reverse/authfile.h
parentc6c59dc73cc4586357f93ab38ecf459e98675cc5 (diff)
packetstorm sync
Diffstat (limited to 'other/openssh-reverse/authfile.h')
-rw-r--r--other/openssh-reverse/authfile.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/other/openssh-reverse/authfile.h b/other/openssh-reverse/authfile.h
new file mode 100644
index 0000000..afec27d
--- /dev/null
+++ b/other/openssh-reverse/authfile.h
@@ -0,0 +1,36 @@
1#ifndef AUTHFILE_H
2#define AUTHFILE_H
3
4/*
5 * Saves the authentication (private) key in a file, encrypting it with
6 * passphrase.
7 * For RSA keys: The identification of the file (lowest 64 bits of n)
8 * will precede the key to provide identification of the key without
9 * needing a passphrase.
10 */
11int
12save_private_key(const char *filename, const char *passphrase,
13 Key * private_key, const char *comment);
14
15/*
16 * Loads the public part of the key file (public key and comment). Returns 0
17 * if an error occurred; zero if the public key was successfully read. The
18 * comment of the key is returned in comment_return if it is non-NULL; the
19 * caller must free the value with xfree.
20 */
21int
22load_public_key(const char *filename, Key * pub,
23 char **comment_return);
24
25/*
26 * Loads the private key from the file. Returns 0 if an error is encountered
27 * (file does not exist or is not readable, or passphrase is bad). This
28 * initializes the private key. The comment of the key is returned in
29 * comment_return if it is non-NULL; the caller must free the value with
30 * xfree.
31 */
32int
33load_private_key(const char *filename, const char *passphrase,
34 Key * private_key, char **comment_return);
35
36#endif