summaryrefslogtreecommitdiff
path: root/authfile.h
diff options
context:
space:
mode:
Diffstat (limited to 'authfile.h')
-rw-r--r--authfile.h45
1 files changed, 15 insertions, 30 deletions
diff --git a/authfile.h b/authfile.h
index 525b4aa5b..da90cd913 100644
--- a/authfile.h
+++ b/authfile.h
@@ -2,7 +2,6 @@
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
5 * Functions to interface with the SSH_AUTHENTICATION_FD socket.
6 * 5 *
7 * As far as I am concerned, the code I have written for this software 6 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this 7 * can be used freely for any purpose. Any derived versions of this
@@ -11,41 +10,27 @@
11 * called by a name other than "ssh" or "Secure Shell". 10 * called by a name other than "ssh" or "Secure Shell".
12 */ 11 */
13 12
14/* $OpenBSD: authfile.h,v 1.5 2000/10/16 09:38:44 djm Exp $ */ 13/* $OpenBSD: authfile.h,v 1.6 2001/03/26 08:07:08 markus Exp $ */
15 14
16#ifndef AUTHFILE_H 15#ifndef AUTHFILE_H
17#define AUTHFILE_H 16#define AUTHFILE_H
18 17
19
20/*
21 * Saves the authentication (private) key in a file, encrypting it with
22 * passphrase.
23 * For RSA keys: The identification of the file (lowest 64 bits of n)
24 * will precede the key to provide identification of the key without
25 * needing a passphrase.
26 */
27int 18int
28save_private_key(const char *filename, const char *passphrase, 19key_save_private(Key *key, const char *filename, const char *passphrase,
29 Key * private_key, const char *comment); 20 const char *comment);
30 21
31/* 22Key *
32 * Loads the public part of the key file (public key and comment). Returns 0 23key_load_public(const char *filename, char **commentp);
33 * if an error occurred; zero if the public key was successfully read. The
34 * comment of the key is returned in comment_return if it is non-NULL; the
35 * caller must free the value with xfree.
36 */
37int load_public_key(const char *filename, Key * pub, char **comment_return);
38int try_load_public_key(const char *filename, Key * pub, char **comment_return);
39 24
40/* 25Key *
41 * Loads the private key from the file. Returns 0 if an error is encountered 26key_load_public_type(int type, const char *filename, char **commentp);
42 * (file does not exist or is not readable, or passphrase is bad). This 27
43 * initializes the private key. The comment of the key is returned in 28Key *
44 * comment_return if it is non-NULL; the caller must free the value with 29key_load_private(const char *filename, const char *passphrase,
45 * xfree. 30 char **commentp);
46 */ 31
47int 32Key *
48load_private_key(const char *filename, const char *passphrase, 33key_load_private_type(int type, const char *filename, const char *passphrase,
49 Key * private_key, char **comment_return); 34 char **commentp);
50 35
51#endif 36#endif