diff options
author | Damien Miller <djm@mindrot.org> | 1999-11-25 11:54:57 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-11-25 11:54:57 +1100 |
commit | 5428f646ad32da88ddd04a8c287d595524674fbf (patch) | |
tree | cc1f1e5d7852e1f44d41077f776abf7dab7ac06d /authfd.h | |
parent | 9072e1889648988da38b7b81bce95291c1dc3a23 (diff) |
- More reformatting merged from OpenBSD CVS
- Merged OpenBSD CVS changes:
- [channels.c]
report from mrwizard@psu.edu via djm@ibs.com.au
- [channels.c]
set SO_REUSEADDR and SO_LINGER for forwarded ports.
chip@valinux.com via damien@ibs.com.au
- [nchan.c]
it's not an error() if shutdown_write failes in nchan.
- [readconf.c]
remove dead #ifdef-0-code
- [readconf.c servconf.c]
strcasecmp instead of tolower
- [scp.c]
progress meter overflow fix from damien@ibs.com.au
- [ssh-add.1 ssh-add.c]
SSH_ASKPASS support
- [ssh.1 ssh.c]
postpone fork_after_authentication until command execution,
request/patch from jahakala@cc.jyu.fi via damien@ibs.com.au
plus: use daemon() for backgrounding
Diffstat (limited to 'authfd.h')
-rw-r--r-- | authfd.h | 82 |
1 files changed, 49 insertions, 33 deletions
@@ -13,7 +13,7 @@ | |||
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | 15 | ||
16 | /* RCSID("$Id: authfd.h,v 1.3 1999/11/24 13:26:22 damien Exp $"); */ | 16 | /* RCSID("$Id: authfd.h,v 1.4 1999/11/25 00:54:58 damien Exp $"); */ |
17 | 17 | ||
18 | #ifndef AUTHFD_H | 18 | #ifndef AUTHFD_H |
19 | #define AUTHFD_H | 19 | #define AUTHFD_H |
@@ -40,33 +40,43 @@ typedef struct { | |||
40 | /* Returns the number of the authentication fd, or -1 if there is none. */ | 40 | /* Returns the number of the authentication fd, or -1 if there is none. */ |
41 | int ssh_get_authentication_socket(); | 41 | int ssh_get_authentication_socket(); |
42 | 42 | ||
43 | /* This should be called for any descriptor returned by | 43 | /* |
44 | ssh_get_authentication_socket(). Depending on the way the descriptor was | 44 | * This should be called for any descriptor returned by |
45 | obtained, this may close the descriptor. */ | 45 | * ssh_get_authentication_socket(). Depending on the way the descriptor was |
46 | * obtained, this may close the descriptor. | ||
47 | */ | ||
46 | void ssh_close_authentication_socket(int authfd); | 48 | void ssh_close_authentication_socket(int authfd); |
47 | 49 | ||
48 | /* Opens and connects a private socket for communication with the | 50 | /* |
49 | authentication agent. Returns NULL if an error occurred and the | 51 | * Opens and connects a private socket for communication with the |
50 | connection could not be opened. The connection should be closed by | 52 | * authentication agent. Returns NULL if an error occurred and the |
51 | the caller by calling ssh_close_authentication_connection(). */ | 53 | * connection could not be opened. The connection should be closed by the |
54 | * caller by calling ssh_close_authentication_connection(). | ||
55 | */ | ||
52 | AuthenticationConnection *ssh_get_authentication_connection(); | 56 | AuthenticationConnection *ssh_get_authentication_connection(); |
53 | 57 | ||
54 | /* Closes the connection to the authentication agent and frees any associated | 58 | /* |
55 | memory. */ | 59 | * Closes the connection to the authentication agent and frees any associated |
60 | * memory. | ||
61 | */ | ||
56 | void ssh_close_authentication_connection(AuthenticationConnection * ac); | 62 | void ssh_close_authentication_connection(AuthenticationConnection * ac); |
57 | 63 | ||
58 | /* Returns the first authentication identity held by the agent. | 64 | /* |
59 | Returns true if an identity is available, 0 otherwise. | 65 | * Returns the first authentication identity held by the agent. Returns true |
60 | The caller must initialize the integers before the call, and free the | 66 | * if an identity is available, 0 otherwise. The caller must initialize the |
61 | comment after a successful call (before calling ssh_get_next_identity). */ | 67 | * integers before the call, and free the comment after a successful call |
68 | * (before calling ssh_get_next_identity). | ||
69 | */ | ||
62 | int | 70 | int |
63 | ssh_get_first_identity(AuthenticationConnection * connection, | 71 | ssh_get_first_identity(AuthenticationConnection * connection, |
64 | BIGNUM * e, BIGNUM * n, char **comment); | 72 | BIGNUM * e, BIGNUM * n, char **comment); |
65 | 73 | ||
66 | /* Returns the next authentication identity for the agent. Other functions | 74 | /* |
67 | can be called between this and ssh_get_first_identity or two calls of this | 75 | * Returns the next authentication identity for the agent. Other functions |
68 | function. This returns 0 if there are no more identities. The caller | 76 | * can be called between this and ssh_get_first_identity or two calls of this |
69 | must free comment after a successful return. */ | 77 | * function. This returns 0 if there are no more identities. The caller |
78 | * must free comment after a successful return. | ||
79 | */ | ||
70 | int | 80 | int |
71 | ssh_get_next_identity(AuthenticationConnection * connection, | 81 | ssh_get_next_identity(AuthenticationConnection * connection, |
72 | BIGNUM * e, BIGNUM * n, char **comment); | 82 | BIGNUM * e, BIGNUM * n, char **comment); |
@@ -80,24 +90,30 @@ ssh_decrypt_challenge(AuthenticationConnection * auth, | |||
80 | unsigned int response_type, | 90 | unsigned int response_type, |
81 | unsigned char response[16]); | 91 | unsigned char response[16]); |
82 | 92 | ||
83 | /* Adds an identity to the authentication server. This call is not meant to | 93 | /* |
84 | be used by normal applications. This returns true if the identity | 94 | * Adds an identity to the authentication server. This call is not meant to |
85 | was successfully added. */ | 95 | * be used by normal applications. This returns true if the identity was |
86 | int ssh_add_identity(AuthenticationConnection * connection, | 96 | * successfully added. |
87 | RSA * key, const char *comment); | 97 | */ |
98 | int | ||
99 | ssh_add_identity(AuthenticationConnection * connection, RSA * key, | ||
100 | const char *comment); | ||
88 | 101 | ||
89 | /* Removes the identity from the authentication server. This call is | 102 | /* |
90 | not meant to be used by normal applications. This returns true if the | 103 | * Removes the identity from the authentication server. This call is not |
91 | identity was successfully added. */ | 104 | * meant to be used by normal applications. This returns true if the |
92 | int ssh_remove_identity(AuthenticationConnection * connection, | 105 | * identity was successfully added. |
93 | RSA * key); | 106 | */ |
107 | int ssh_remove_identity(AuthenticationConnection * connection, RSA * key); | ||
94 | 108 | ||
95 | /* Removes all identities from the authentication agent. This call is not | 109 | /* |
96 | meant to be used by normal applications. This returns true if the | 110 | * Removes all identities from the authentication agent. This call is not |
97 | operation was successful. */ | 111 | * meant to be used by normal applications. This returns true if the |
98 | int ssh_remove_all_identities(AuthenticationConnection * connection); | 112 | * operation was successful. |
113 | */ | ||
114 | int ssh_remove_all_identities(AuthenticationConnection * connection); | ||
99 | 115 | ||
100 | /* Closes the connection to the authentication agent. */ | 116 | /* Closes the connection to the authentication agent. */ |
101 | void ssh_close_authentication(AuthenticationConnection * connection); | 117 | void ssh_close_authentication(AuthenticationConnection * connection); |
102 | 118 | ||
103 | #endif /* AUTHFD_H */ | 119 | #endif /* AUTHFD_H */ |