diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | atomicio.h | 4 | ||||
-rw-r--r-- | auth-options.h | 5 | ||||
-rw-r--r-- | auth.h | 56 | ||||
-rw-r--r-- | authfd.h | 34 | ||||
-rw-r--r-- | authfile.h | 15 | ||||
-rw-r--r-- | bufaux.h | 28 | ||||
-rw-r--r-- | buffer.h | 24 | ||||
-rw-r--r-- | canohost.h | 14 | ||||
-rw-r--r-- | channels.h | 103 | ||||
-rw-r--r-- | cipher.h | 23 | ||||
-rw-r--r-- | clientloop.h | 4 | ||||
-rw-r--r-- | compat.h | 8 | ||||
-rw-r--r-- | compress.h | 8 | ||||
-rw-r--r-- | crc32.h | 4 | ||||
-rw-r--r-- | deattack.h | 4 | ||||
-rw-r--r-- | dh.h | 8 | ||||
-rw-r--r-- | dispatch.h | 12 | ||||
-rw-r--r-- | groupaccess.h | 6 | ||||
-rw-r--r-- | hostfile.h | 9 | ||||
-rw-r--r-- | kex.h | 20 | ||||
-rw-r--r-- | key.h | 46 | ||||
-rw-r--r-- | log.h | 28 | ||||
-rw-r--r-- | mac.h | 8 | ||||
-rw-r--r-- | match.h | 12 | ||||
-rw-r--r-- | misc.h | 22 | ||||
-rw-r--r-- | mpaux.h | 7 | ||||
-rw-r--r-- | packet.h | 25 | ||||
-rw-r--r-- | radix.h | 6 | ||||
-rw-r--r-- | readconf.h | 19 | ||||
-rw-r--r-- | readpass.h | 4 | ||||
-rw-r--r-- | rsa.h | 8 |
32 files changed, 278 insertions, 307 deletions
@@ -38,6 +38,15 @@ | |||
38 | - markus@cvs.openbsd.org 2001/06/26 05:50:11 | 38 | - markus@cvs.openbsd.org 2001/06/26 05:50:11 |
39 | [auth2.c] | 39 | [auth2.c] |
40 | new interface for secure_filename() | 40 | new interface for secure_filename() |
41 | - itojun@cvs.openbsd.org 2001/06/26 06:32:58 | ||
42 | [atomicio.h authfd.h authfile.h auth.h auth-options.h bufaux.h | ||
43 | buffer.h canohost.h channels.h cipher.h clientloop.h compat.h | ||
44 | compress.h crc32.h deattack.h dh.h dispatch.h groupaccess.h | ||
45 | hostfile.h kex.h key.h log.h mac.h match.h misc.h mpaux.h packet.h | ||
46 | radix.h readconf.h readpass.h rsa.h] | ||
47 | prototype pedant. not very creative... | ||
48 | - () -> (void) | ||
49 | - no variable names | ||
41 | 50 | ||
42 | 20010629 | 51 | 20010629 |
43 | - (bal) Removed net_aton() since we don't use it any more | 52 | - (bal) Removed net_aton() since we don't use it any more |
@@ -5865,4 +5874,4 @@ | |||
5865 | - Wrote replacements for strlcpy and mkdtemp | 5874 | - Wrote replacements for strlcpy and mkdtemp |
5866 | - Released 1.0pre1 | 5875 | - Released 1.0pre1 |
5867 | 5876 | ||
5868 | $Id: ChangeLog,v 1.1355 2001/07/04 03:56:56 mouring Exp $ | 5877 | $Id: ChangeLog,v 1.1356 2001/07/04 04:02:36 mouring Exp $ |
diff --git a/atomicio.h b/atomicio.h index d878687d6..e569d38c6 100644 --- a/atomicio.h +++ b/atomicio.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: atomicio.h,v 1.3 2001/03/02 18:54:30 deraadt Exp $ */ | 1 | /* $OpenBSD: atomicio.h,v 1.4 2001/06/26 06:32:46 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. | 4 | * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. |
@@ -28,4 +28,4 @@ | |||
28 | /* | 28 | /* |
29 | * Ensure all of data on socket comes through. f==read || f==write | 29 | * Ensure all of data on socket comes through. f==read || f==write |
30 | */ | 30 | */ |
31 | ssize_t atomicio(ssize_t (*f)(), int fd, void *s, size_t n); | 31 | ssize_t atomicio(ssize_t (*)(), int, void *, size_t); |
diff --git a/auth-options.h b/auth-options.h index 8ee269491..db0e6e8fb 100644 --- a/auth-options.h +++ b/auth-options.h | |||
@@ -11,7 +11,7 @@ | |||
11 | * called by a name other than "ssh" or "Secure Shell". | 11 | * called by a name other than "ssh" or "Secure Shell". |
12 | */ | 12 | */ |
13 | 13 | ||
14 | /* $OpenBSD: auth-options.h,v 1.8 2001/01/21 19:05:42 markus Exp $ */ | 14 | /* $OpenBSD: auth-options.h,v 1.9 2001/06/26 06:32:47 itojun Exp $ */ |
15 | 15 | ||
16 | #ifndef AUTH_OPTIONS_H | 16 | #ifndef AUTH_OPTIONS_H |
17 | #define AUTH_OPTIONS_H | 17 | #define AUTH_OPTIONS_H |
@@ -35,8 +35,7 @@ extern struct envstring *custom_environment; | |||
35 | * side effect: sets key option flags | 35 | * side effect: sets key option flags |
36 | */ | 36 | */ |
37 | int | 37 | int |
38 | auth_parse_options(struct passwd *pw, char *options, char *file, | 38 | auth_parse_options(struct passwd *, char *, char *, u_long); |
39 | u_long linenum); | ||
40 | 39 | ||
41 | /* reset options flags */ | 40 | /* reset options flags */ |
42 | void auth_clear_options(void); | 41 | void auth_clear_options(void); |
@@ -21,7 +21,7 @@ | |||
21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 | * | 23 | * |
24 | * $OpenBSD: auth.h,v 1.19 2001/06/25 17:54:49 provos Exp $ | 24 | * $OpenBSD: auth.h,v 1.20 2001/06/26 06:32:47 itojun Exp $ |
25 | */ | 25 | */ |
26 | #ifndef AUTH_H | 26 | #ifndef AUTH_H |
27 | #define AUTH_H | 27 | #define AUTH_H |
@@ -79,45 +79,44 @@ struct KbdintDevice | |||
79 | * authentication succeeds. If ignore_rhosts is non-zero, this will not | 79 | * authentication succeeds. If ignore_rhosts is non-zero, this will not |
80 | * consider .rhosts and .shosts (/etc/hosts.equiv will still be used). | 80 | * consider .rhosts and .shosts (/etc/hosts.equiv will still be used). |
81 | */ | 81 | */ |
82 | int auth_rhosts(struct passwd * pw, const char *client_user); | 82 | int auth_rhosts(struct passwd *, const char *); |
83 | 83 | ||
84 | /* extended interface similar to auth_rhosts() */ | 84 | /* extended interface similar to auth_rhosts() */ |
85 | int | 85 | int |
86 | auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname, | 86 | auth_rhosts2(struct passwd *, const char *, const char *, const char *); |
87 | const char *ipaddr); | ||
88 | 87 | ||
89 | /* | 88 | /* |
90 | * Tries to authenticate the user using the .rhosts file and the host using | 89 | * Tries to authenticate the user using the .rhosts file and the host using |
91 | * its host key. Returns true if authentication succeeds. | 90 | * its host key. Returns true if authentication succeeds. |
92 | */ | 91 | */ |
93 | int | 92 | int |
94 | auth_rhosts_rsa(struct passwd * pw, const char *client_user, RSA* client_host_key); | 93 | auth_rhosts_rsa(struct passwd *, const char *, RSA *); |
95 | 94 | ||
96 | /* | 95 | /* |
97 | * Tries to authenticate the user using password. Returns true if | 96 | * Tries to authenticate the user using password. Returns true if |
98 | * authentication succeeds. | 97 | * authentication succeeds. |
99 | */ | 98 | */ |
100 | int auth_password(Authctxt *authctxt, const char *password); | 99 | int auth_password(Authctxt *, const char *); |
101 | 100 | ||
102 | /* | 101 | /* |
103 | * Performs the RSA authentication dialog with the client. This returns 0 if | 102 | * Performs the RSA authentication dialog with the client. This returns 0 if |
104 | * the client could not be authenticated, and 1 if authentication was | 103 | * the client could not be authenticated, and 1 if authentication was |
105 | * successful. This may exit if there is a serious protocol violation. | 104 | * successful. This may exit if there is a serious protocol violation. |
106 | */ | 105 | */ |
107 | int auth_rsa(struct passwd * pw, BIGNUM * client_n); | 106 | int auth_rsa(struct passwd *, BIGNUM *); |
108 | 107 | ||
109 | /* | 108 | /* |
110 | * Parses an RSA key (number of bits, e, n) from a string. Moves the pointer | 109 | * Parses an RSA key (number of bits, e, n) from a string. Moves the pointer |
111 | * over the key. Skips any whitespace at the beginning and at end. | 110 | * over the key. Skips any whitespace at the beginning and at end. |
112 | */ | 111 | */ |
113 | int auth_rsa_read_key(char **cpp, u_int *bitsp, BIGNUM * e, BIGNUM * n); | 112 | int auth_rsa_read_key(char **, u_int *, BIGNUM *, BIGNUM *); |
114 | 113 | ||
115 | /* | 114 | /* |
116 | * Performs the RSA authentication challenge-response dialog with the client, | 115 | * Performs the RSA authentication challenge-response dialog with the client, |
117 | * and returns true (non-zero) if the client gave the correct answer to our | 116 | * and returns true (non-zero) if the client gave the correct answer to our |
118 | * challenge; returns zero if the client gives a wrong answer. | 117 | * challenge; returns zero if the client gives a wrong answer. |
119 | */ | 118 | */ |
120 | int auth_rsa_challenge_dialog(RSA *pk); | 119 | int auth_rsa_challenge_dialog(RSA *); |
121 | 120 | ||
122 | #ifdef KRB4 | 121 | #ifdef KRB4 |
123 | #include <krb.h> | 122 | #include <krb.h> |
@@ -126,17 +125,17 @@ int auth_rsa_challenge_dialog(RSA *pk); | |||
126 | * if the client could not be authenticated, and 1 if authentication was | 125 | * if the client could not be authenticated, and 1 if authentication was |
127 | * successful. This may exit if there is a serious protocol violation. | 126 | * successful. This may exit if there is a serious protocol violation. |
128 | */ | 127 | */ |
129 | int auth_krb4(const char *server_user, KTEXT auth, char **client); | 128 | int auth_krb4(const char *, KTEXT, char **); |
130 | int krb4_init(uid_t uid); | 129 | int krb4_init(uid_t); |
131 | void krb4_cleanup_proc(void *ignore); | 130 | void krb4_cleanup_proc(void *); |
132 | int auth_krb4_password(struct passwd * pw, const char *password); | 131 | int auth_krb4_password(struct passwd *, const char *); |
133 | 132 | ||
134 | #ifdef AFS | 133 | #ifdef AFS |
135 | #include <kafs.h> | 134 | #include <kafs.h> |
136 | 135 | ||
137 | /* Accept passed Kerberos v4 ticket-granting ticket and AFS tokens. */ | 136 | /* Accept passed Kerberos v4 ticket-granting ticket and AFS tokens. */ |
138 | int auth_kerberos_tgt(struct passwd * pw, const char *string); | 137 | int auth_kerberos_tgt(struct passwd *, const char *); |
139 | int auth_afs_token(struct passwd * pw, const char *token_string); | 138 | int auth_afs_token(struct passwd *, const char *); |
140 | #endif /* AFS */ | 139 | #endif /* AFS */ |
141 | 140 | ||
142 | #endif /* KRB4 */ | 141 | #endif /* KRB4 */ |
@@ -148,33 +147,32 @@ void do_authentication(void); | |||
148 | void do_authentication2(void); | 147 | void do_authentication2(void); |
149 | 148 | ||
150 | Authctxt *authctxt_new(void); | 149 | Authctxt *authctxt_new(void); |
151 | void auth_log(Authctxt *authctxt, int authenticated, char *method, char *info); | 150 | void auth_log(Authctxt *, int, char *, char *); |
152 | void userauth_finish(Authctxt *authctxt, int authenticated, char *method); | 151 | void userauth_finish(Authctxt *, int, char *); |
153 | int auth_root_allowed(char *method); | 152 | int auth_root_allowed(char *); |
154 | 153 | ||
155 | int auth2_challenge(Authctxt *authctxt, char *devs); | 154 | int auth2_challenge(Authctxt *, char *); |
156 | 155 | ||
157 | int allowed_user(struct passwd * pw); | 156 | int allowed_user(struct passwd *); |
158 | 157 | ||
159 | char *get_challenge(Authctxt *authctxt); | 158 | char *get_challenge(Authctxt *); |
160 | int verify_response(Authctxt *authctxt, const char *response); | 159 | int verify_response(Authctxt *, const char *); |
161 | 160 | ||
162 | struct passwd * auth_get_user(void); | 161 | struct passwd * auth_get_user(void); |
163 | 162 | ||
164 | /* expand a filename - return buffer is allocated by xmalloc */ | 163 | /* expand a filename - return buffer is allocated by xmalloc */ |
165 | char *expand_filename(const char *template, struct passwd *pw); | 164 | char *expand_filename(const char *, struct passwd *); |
166 | char *authorized_keys_file(struct passwd *pw); | 165 | char *authorized_keys_file(struct passwd *); |
167 | char *authorized_keys_file2(struct passwd *pw); | 166 | char *authorized_keys_file2(struct passwd *); |
168 | 167 | ||
169 | /* check a file and the path to it */ | 168 | /* check a file and the path to it */ |
170 | int | 169 | int |
171 | secure_filename(FILE *f, const char *file, struct passwd *pw, | 170 | secure_filename(FILE *, const char *, struct passwd *, char *, size_t); |
172 | char *err, size_t errlen); | ||
173 | 171 | ||
174 | /* helper for hostbased auth */ | 172 | /* helper for hostbased auth */ |
175 | HostStatus | 173 | HostStatus |
176 | check_key_in_hostfiles(struct passwd *pw, Key *key, const char *host, | 174 | check_key_in_hostfiles(struct passwd *, Key *, const char *, |
177 | const char *sysfile, const char *userfile); | 175 | const char *, const char *); |
178 | 176 | ||
179 | #define AUTH_FAIL_MAX 6 | 177 | #define AUTH_FAIL_MAX 6 |
180 | #define AUTH_FAIL_LOG (AUTH_FAIL_MAX/2) | 178 | #define AUTH_FAIL_LOG (AUTH_FAIL_MAX/2) |
@@ -11,7 +11,7 @@ | |||
11 | * called by a name other than "ssh" or "Secure Shell". | 11 | * called by a name other than "ssh" or "Secure Shell". |
12 | */ | 12 | */ |
13 | 13 | ||
14 | /* RCSID("$OpenBSD: authfd.h,v 1.17 2001/06/26 04:59:59 markus Exp $"); */ | 14 | /* RCSID("$OpenBSD: authfd.h,v 1.18 2001/06/26 06:32:47 itojun Exp $"); */ |
15 | 15 | ||
16 | #ifndef AUTHFD_H | 16 | #ifndef AUTHFD_H |
17 | #define AUTHFD_H | 17 | #define AUTHFD_H |
@@ -62,7 +62,7 @@ int ssh_get_authentication_socket(void); | |||
62 | * ssh_get_authentication_socket(). Depending on the way the descriptor was | 62 | * ssh_get_authentication_socket(). Depending on the way the descriptor was |
63 | * obtained, this may close the descriptor. | 63 | * obtained, this may close the descriptor. |
64 | */ | 64 | */ |
65 | void ssh_close_authentication_socket(int authfd); | 65 | void ssh_close_authentication_socket(int); |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * Opens and connects a private socket for communication with the | 68 | * Opens and connects a private socket for communication with the |
@@ -76,19 +76,19 @@ AuthenticationConnection *ssh_get_authentication_connection(void); | |||
76 | * Closes the connection to the authentication agent and frees any associated | 76 | * Closes the connection to the authentication agent and frees any associated |
77 | * memory. | 77 | * memory. |
78 | */ | 78 | */ |
79 | void ssh_close_authentication_connection(AuthenticationConnection *auth); | 79 | void ssh_close_authentication_connection(AuthenticationConnection *); |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * Returns the number authentication identity held by the agent. | 82 | * Returns the number authentication identity held by the agent. |
83 | */ | 83 | */ |
84 | int ssh_get_num_identities(AuthenticationConnection *auth, int version); | 84 | int ssh_get_num_identities(AuthenticationConnection *, int); |
85 | 85 | ||
86 | /* | 86 | /* |
87 | * Returns the first authentication identity held by the agent or NULL if | 87 | * Returns the first authentication identity held by the agent or NULL if |
88 | * no identies are available. Caller must free comment and key. | 88 | * no identies are available. Caller must free comment and key. |
89 | * Note that you cannot mix calls with different versions. | 89 | * Note that you cannot mix calls with different versions. |
90 | */ | 90 | */ |
91 | Key *ssh_get_first_identity(AuthenticationConnection *auth, char **comment, int version); | 91 | Key *ssh_get_first_identity(AuthenticationConnection *, char **, int); |
92 | 92 | ||
93 | /* | 93 | /* |
94 | * Returns the next authentication identity for the agent. Other functions | 94 | * Returns the next authentication identity for the agent. Other functions |
@@ -96,25 +96,20 @@ Key *ssh_get_first_identity(AuthenticationConnection *auth, char **comment, int | |||
96 | * function. This returns NULL if there are no more identities. The caller | 96 | * function. This returns NULL if there are no more identities. The caller |
97 | * must free key and comment after a successful return. | 97 | * must free key and comment after a successful return. |
98 | */ | 98 | */ |
99 | Key *ssh_get_next_identity(AuthenticationConnection *auth, char **comment, int version); | 99 | Key *ssh_get_next_identity(AuthenticationConnection *, char **, int); |
100 | 100 | ||
101 | /* | 101 | /* |
102 | * Requests the agent to decrypt the given challenge. Returns true if the | 102 | * Requests the agent to decrypt the given challenge. Returns true if the |
103 | * agent claims it was able to decrypt it. | 103 | * agent claims it was able to decrypt it. |
104 | */ | 104 | */ |
105 | int | 105 | int |
106 | ssh_decrypt_challenge(AuthenticationConnection *auth, | 106 | ssh_decrypt_challenge(AuthenticationConnection *, Key *, BIGNUM *, u_char[16], |
107 | Key *key, BIGNUM * challenge, | 107 | u_int, u_char[16]); |
108 | u_char session_id[16], | ||
109 | u_int response_type, | ||
110 | u_char response[16]); | ||
111 | 108 | ||
112 | /* Requests the agent to sign data using key */ | 109 | /* Requests the agent to sign data using key */ |
113 | int | 110 | int |
114 | ssh_agent_sign(AuthenticationConnection *auth, | 111 | ssh_agent_sign(AuthenticationConnection *, Key *, u_char **, int *, |
115 | Key *key, | 112 | u_char *, int); |
116 | u_char **sigp, int *lenp, | ||
117 | u_char *data, int datalen); | ||
118 | 113 | ||
119 | /* | 114 | /* |
120 | * Adds an identity to the authentication server. This call is not meant to | 115 | * Adds an identity to the authentication server. This call is not meant to |
@@ -122,23 +117,22 @@ ssh_agent_sign(AuthenticationConnection *auth, | |||
122 | * successfully added. | 117 | * successfully added. |
123 | */ | 118 | */ |
124 | int | 119 | int |
125 | ssh_add_identity(AuthenticationConnection *auth, Key *key, | 120 | ssh_add_identity(AuthenticationConnection *, Key *, const char *); |
126 | const char *comment); | ||
127 | 121 | ||
128 | /* | 122 | /* |
129 | * Removes the identity from the authentication server. This call is not | 123 | * Removes the identity from the authentication server. This call is not |
130 | * meant to be used by normal applications. This returns true if the | 124 | * meant to be used by normal applications. This returns true if the |
131 | * identity was successfully added. | 125 | * identity was successfully added. |
132 | */ | 126 | */ |
133 | int ssh_remove_identity(AuthenticationConnection *auth, Key *key); | 127 | int ssh_remove_identity(AuthenticationConnection *, Key *); |
134 | 128 | ||
135 | /* | 129 | /* |
136 | * Removes all identities from the authentication agent. This call is not | 130 | * Removes all identities from the authentication agent. This call is not |
137 | * meant to be used by normal applications. This returns true if the | 131 | * meant to be used by normal applications. This returns true if the |
138 | * operation was successful. | 132 | * operation was successful. |
139 | */ | 133 | */ |
140 | int ssh_remove_all_identities(AuthenticationConnection *auth, int version); | 134 | int ssh_remove_all_identities(AuthenticationConnection *, int); |
141 | 135 | ||
142 | int ssh_update_card(AuthenticationConnection *auth, int add, int reader_id); | 136 | int ssh_update_card(AuthenticationConnection *, int, int); |
143 | 137 | ||
144 | #endif /* AUTHFD_H */ | 138 | #endif /* AUTHFD_H */ |
diff --git a/authfile.h b/authfile.h index da90cd913..982645d50 100644 --- a/authfile.h +++ b/authfile.h | |||
@@ -10,27 +10,24 @@ | |||
10 | * called by a name other than "ssh" or "Secure Shell". | 10 | * called by a name other than "ssh" or "Secure Shell". |
11 | */ | 11 | */ |
12 | 12 | ||
13 | /* $OpenBSD: authfile.h,v 1.6 2001/03/26 08:07:08 markus Exp $ */ | 13 | /* $OpenBSD: authfile.h,v 1.7 2001/06/26 06:32:48 itojun Exp $ */ |
14 | 14 | ||
15 | #ifndef AUTHFILE_H | 15 | #ifndef AUTHFILE_H |
16 | #define AUTHFILE_H | 16 | #define AUTHFILE_H |
17 | 17 | ||
18 | int | 18 | int |
19 | key_save_private(Key *key, const char *filename, const char *passphrase, | 19 | key_save_private(Key *, const char *, const char *, const char *); |
20 | const char *comment); | ||
21 | 20 | ||
22 | Key * | 21 | Key * |
23 | key_load_public(const char *filename, char **commentp); | 22 | key_load_public(const char *, char **); |
24 | 23 | ||
25 | Key * | 24 | Key * |
26 | key_load_public_type(int type, const char *filename, char **commentp); | 25 | key_load_public_type(int, const char *, char **); |
27 | 26 | ||
28 | Key * | 27 | Key * |
29 | key_load_private(const char *filename, const char *passphrase, | 28 | key_load_private(const char *, const char *, char **); |
30 | char **commentp); | ||
31 | 29 | ||
32 | Key * | 30 | Key * |
33 | key_load_private_type(int type, const char *filename, const char *passphrase, | 31 | key_load_private_type(int, const char *, const char *, char **); |
34 | char **commentp); | ||
35 | 32 | ||
36 | #endif | 33 | #endif |
@@ -10,7 +10,7 @@ | |||
10 | * called by a name other than "ssh" or "Secure Shell". | 10 | * called by a name other than "ssh" or "Secure Shell". |
11 | */ | 11 | */ |
12 | 12 | ||
13 | /* RCSID("$OpenBSD: bufaux.h,v 1.11 2001/01/21 19:05:45 markus Exp $"); */ | 13 | /* RCSID("$OpenBSD: bufaux.h,v 1.12 2001/06/26 06:32:48 itojun Exp $"); */ |
14 | 14 | ||
15 | #ifndef BUFAUX_H | 15 | #ifndef BUFAUX_H |
16 | #define BUFAUX_H | 16 | #define BUFAUX_H |
@@ -22,30 +22,30 @@ | |||
22 | * Stores an BIGNUM in the buffer with a 2-byte msb first bit count, followed | 22 | * Stores an BIGNUM in the buffer with a 2-byte msb first bit count, followed |
23 | * by (bits+7)/8 bytes of binary data, msb first. | 23 | * by (bits+7)/8 bytes of binary data, msb first. |
24 | */ | 24 | */ |
25 | void buffer_put_bignum(Buffer * buffer, BIGNUM * value); | 25 | void buffer_put_bignum(Buffer *, BIGNUM *); |
26 | void buffer_put_bignum2(Buffer * buffer, BIGNUM * value); | 26 | void buffer_put_bignum2(Buffer *, BIGNUM *); |
27 | 27 | ||
28 | /* Retrieves an BIGNUM from the buffer. */ | 28 | /* Retrieves an BIGNUM from the buffer. */ |
29 | int buffer_get_bignum(Buffer * buffer, BIGNUM * value); | 29 | int buffer_get_bignum(Buffer *, BIGNUM *); |
30 | int buffer_get_bignum2(Buffer *buffer, BIGNUM * value); | 30 | int buffer_get_bignum2(Buffer *, BIGNUM *); |
31 | 31 | ||
32 | /* Returns an integer from the buffer (4 bytes, msb first). */ | 32 | /* Returns an integer from the buffer (4 bytes, msb first). */ |
33 | u_int buffer_get_int(Buffer * buffer); | 33 | u_int buffer_get_int(Buffer *); |
34 | #ifdef HAVE_U_INT64_T | 34 | #ifdef HAVE_U_INT64_T |
35 | u_int64_t buffer_get_int64(Buffer *buffer); | 35 | u_int64_t buffer_get_int64(Buffer *); |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | /* Stores an integer in the buffer in 4 bytes, msb first. */ | 38 | /* Stores an integer in the buffer in 4 bytes, msb first. */ |
39 | void buffer_put_int(Buffer * buffer, u_int value); | 39 | void buffer_put_int(Buffer *, u_int); |
40 | #ifdef HAVE_U_INT64_T | 40 | #ifdef HAVE_U_INT64_T |
41 | void buffer_put_int64(Buffer *buffer, u_int64_t value); | 41 | void buffer_put_int64(Buffer *, u_int64_t); |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | /* Returns a character from the buffer (0 - 255). */ | 44 | /* Returns a character from the buffer (0 - 255). */ |
45 | int buffer_get_char(Buffer * buffer); | 45 | int buffer_get_char(Buffer *); |
46 | 46 | ||
47 | /* Stores a character in the buffer. */ | 47 | /* Stores a character in the buffer. */ |
48 | void buffer_put_char(Buffer * buffer, int value); | 48 | void buffer_put_char(Buffer *, int); |
49 | 49 | ||
50 | /* | 50 | /* |
51 | * Returns an arbitrary binary string from the buffer. The string cannot be | 51 | * Returns an arbitrary binary string from the buffer. The string cannot be |
@@ -55,10 +55,10 @@ void buffer_put_char(Buffer * buffer, int value); | |||
55 | * stored there. A null character will be automatically appended to the | 55 | * stored there. A null character will be automatically appended to the |
56 | * returned string, and is not counted in length. | 56 | * returned string, and is not counted in length. |
57 | */ | 57 | */ |
58 | char *buffer_get_string(Buffer * buffer, u_int *length_ptr); | 58 | char *buffer_get_string(Buffer *, u_int *); |
59 | 59 | ||
60 | /* Stores and arbitrary binary string in the buffer. */ | 60 | /* Stores and arbitrary binary string in the buffer. */ |
61 | void buffer_put_string(Buffer * buffer, const void *buf, u_int len); | 61 | void buffer_put_string(Buffer *, const void *, u_int); |
62 | void buffer_put_cstring(Buffer *buffer, const char *s); | 62 | void buffer_put_cstring(Buffer *, const char *); |
63 | 63 | ||
64 | #endif /* BUFAUX_H */ | 64 | #endif /* BUFAUX_H */ |
@@ -11,7 +11,7 @@ | |||
11 | * called by a name other than "ssh" or "Secure Shell". | 11 | * called by a name other than "ssh" or "Secure Shell". |
12 | */ | 12 | */ |
13 | 13 | ||
14 | /* RCSID("$OpenBSD: buffer.h,v 1.7 2000/12/19 23:17:55 markus Exp $"); */ | 14 | /* RCSID("$OpenBSD: buffer.h,v 1.8 2001/06/26 06:32:48 itojun Exp $"); */ |
15 | 15 | ||
16 | #ifndef BUFFER_H | 16 | #ifndef BUFFER_H |
17 | #define BUFFER_H | 17 | #define BUFFER_H |
@@ -23,44 +23,44 @@ typedef struct { | |||
23 | u_int end; /* Offset of last byte containing data. */ | 23 | u_int end; /* Offset of last byte containing data. */ |
24 | } Buffer; | 24 | } Buffer; |
25 | /* Initializes the buffer structure. */ | 25 | /* Initializes the buffer structure. */ |
26 | void buffer_init(Buffer * buffer); | 26 | void buffer_init(Buffer *); |
27 | 27 | ||
28 | /* Frees any memory used for the buffer. */ | 28 | /* Frees any memory used for the buffer. */ |
29 | void buffer_free(Buffer * buffer); | 29 | void buffer_free(Buffer *); |
30 | 30 | ||
31 | /* Clears any data from the buffer, making it empty. This does not actually | 31 | /* Clears any data from the buffer, making it empty. This does not actually |
32 | zero the memory. */ | 32 | zero the memory. */ |
33 | void buffer_clear(Buffer * buffer); | 33 | void buffer_clear(Buffer *); |
34 | 34 | ||
35 | /* Appends data to the buffer, expanding it if necessary. */ | 35 | /* Appends data to the buffer, expanding it if necessary. */ |
36 | void buffer_append(Buffer * buffer, const char *data, u_int len); | 36 | void buffer_append(Buffer *, const char *, u_int); |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * Appends space to the buffer, expanding the buffer if necessary. This does | 39 | * Appends space to the buffer, expanding the buffer if necessary. This does |
40 | * not actually copy the data into the buffer, but instead returns a pointer | 40 | * not actually copy the data into the buffer, but instead returns a pointer |
41 | * to the allocated region. | 41 | * to the allocated region. |
42 | */ | 42 | */ |
43 | void buffer_append_space(Buffer * buffer, char **datap, u_int len); | 43 | void buffer_append_space(Buffer *, char **, u_int); |
44 | 44 | ||
45 | /* Returns the number of bytes of data in the buffer. */ | 45 | /* Returns the number of bytes of data in the buffer. */ |
46 | u_int buffer_len(Buffer * buffer); | 46 | u_int buffer_len(Buffer *); |
47 | 47 | ||
48 | /* Gets data from the beginning of the buffer. */ | 48 | /* Gets data from the beginning of the buffer. */ |
49 | void buffer_get(Buffer * buffer, char *buf, u_int len); | 49 | void buffer_get(Buffer *, char *, u_int); |
50 | 50 | ||
51 | /* Consumes the given number of bytes from the beginning of the buffer. */ | 51 | /* Consumes the given number of bytes from the beginning of the buffer. */ |
52 | void buffer_consume(Buffer * buffer, u_int bytes); | 52 | void buffer_consume(Buffer *, u_int); |
53 | 53 | ||
54 | /* Consumes the given number of bytes from the end of the buffer. */ | 54 | /* Consumes the given number of bytes from the end of the buffer. */ |
55 | void buffer_consume_end(Buffer * buffer, u_int bytes); | 55 | void buffer_consume_end(Buffer *, u_int); |
56 | 56 | ||
57 | /* Returns a pointer to the first used byte in the buffer. */ | 57 | /* Returns a pointer to the first used byte in the buffer. */ |
58 | char *buffer_ptr(Buffer * buffer); | 58 | char *buffer_ptr(Buffer *); |
59 | 59 | ||
60 | /* | 60 | /* |
61 | * Dumps the contents of the buffer to stderr in hex. This intended for | 61 | * Dumps the contents of the buffer to stderr in hex. This intended for |
62 | * debugging purposes only. | 62 | * debugging purposes only. |
63 | */ | 63 | */ |
64 | void buffer_dump(Buffer * buffer); | 64 | void buffer_dump(Buffer *); |
65 | 65 | ||
66 | #endif /* BUFFER_H */ | 66 | #endif /* BUFFER_H */ |
diff --git a/canohost.h b/canohost.h index 36fb345a1..66e64d506 100644 --- a/canohost.h +++ b/canohost.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: canohost.h,v 1.6 2001/04/12 19:15:24 markus Exp $ */ | 1 | /* $OpenBSD: canohost.h,v 1.7 2001/06/26 06:32:49 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -17,7 +17,7 @@ | |||
17 | * connection (as returned by packet_get_connection). The host name is | 17 | * connection (as returned by packet_get_connection). The host name is |
18 | * cached, so it is efficient to call this several times. | 18 | * cached, so it is efficient to call this several times. |
19 | */ | 19 | */ |
20 | const char *get_canonical_hostname(int reverse_mapping_check); | 20 | const char *get_canonical_hostname(int); |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * Returns the IP-address of the remote host as a string. The returned | 23 | * Returns the IP-address of the remote host as a string. The returned |
@@ -25,13 +25,13 @@ const char *get_canonical_hostname(int reverse_mapping_check); | |||
25 | */ | 25 | */ |
26 | const char *get_remote_ipaddr(void); | 26 | const char *get_remote_ipaddr(void); |
27 | 27 | ||
28 | const char *get_remote_name_or_ip(u_int utmp_len, int reverse_mapping_check); | 28 | const char *get_remote_name_or_ip(u_int, int); |
29 | 29 | ||
30 | /* Returns the ipaddr/port number of the peer of the socket. */ | 30 | /* Returns the ipaddr/port number of the peer of the socket. */ |
31 | char * get_peer_ipaddr(int socket); | 31 | char * get_peer_ipaddr(int); |
32 | int get_peer_port(int sock); | 32 | int get_peer_port(int); |
33 | char * get_local_ipaddr(int socket); | 33 | char * get_local_ipaddr(int); |
34 | char * get_local_name(int socket); | 34 | char * get_local_name(int); |
35 | 35 | ||
36 | /* Returns the port number of the remote/local host. */ | 36 | /* Returns the port number of the remote/local host. */ |
37 | int get_remote_port(void); | 37 | int get_remote_port(void); |
diff --git a/channels.h b/channels.h index 0ce8372bd..3a114e070 100644 --- a/channels.h +++ b/channels.h | |||
@@ -32,7 +32,7 @@ | |||
32 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 32 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
33 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 33 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
34 | */ | 34 | */ |
35 | /* RCSID("$OpenBSD: channels.h,v 1.40 2001/06/25 08:25:36 markus Exp $"); */ | 35 | /* RCSID("$OpenBSD: channels.h,v 1.41 2001/06/26 06:32:49 itojun Exp $"); */ |
36 | 36 | ||
37 | #ifndef CHANNEL_H | 37 | #ifndef CHANNEL_H |
38 | #define CHANNEL_H | 38 | #define CHANNEL_H |
@@ -65,8 +65,8 @@ | |||
65 | struct Channel; | 65 | struct Channel; |
66 | typedef struct Channel Channel; | 66 | typedef struct Channel Channel; |
67 | 67 | ||
68 | typedef void channel_callback_fn(int id, void *arg); | 68 | typedef void channel_callback_fn(int, void *); |
69 | typedef int channel_filter_fn(struct Channel *c, char *buf, int len); | 69 | typedef int channel_filter_fn(struct Channel *, char *, int); |
70 | 70 | ||
71 | struct Channel { | 71 | struct Channel { |
72 | int type; /* channel type/state */ | 72 | int type; /* channel type/state */ |
@@ -142,44 +142,39 @@ struct Channel { | |||
142 | 142 | ||
143 | /* channel management */ | 143 | /* channel management */ |
144 | 144 | ||
145 | Channel *channel_lookup(int id); | 145 | Channel *channel_lookup(int); |
146 | Channel * | 146 | Channel *channel_new(char *, int, int, int, int, int, int, int, char *, int); |
147 | channel_new(char *ctype, int type, int rfd, int wfd, int efd, | 147 | void channel_set_fds(int, int, int, int, int, int); |
148 | int window, int maxpack, int extusage, char *remote_name, int nonblock); | 148 | void channel_free(Channel *); |
149 | void | ||
150 | channel_set_fds(int id, int rfd, int wfd, int efd, | ||
151 | int extusage, int nonblock); | ||
152 | void channel_free(Channel *c); | ||
153 | void channel_free_all(void); | 149 | void channel_free_all(void); |
154 | 150 | ||
155 | void channel_send_open(int id); | 151 | void channel_send_open(int); |
156 | void channel_request(int id, char *service, int wantconfirm); | 152 | void channel_request(int, char *, int); |
157 | void channel_request_start(int id, char *service, int wantconfirm); | 153 | void channel_request_start(int, char *, int); |
158 | void channel_register_callback(int id, int mtype, channel_callback_fn *fn, void *arg); | 154 | void channel_register_callback(int, int mtype, channel_callback_fn *, void *); |
159 | void channel_register_cleanup(int id, channel_callback_fn *fn); | 155 | void channel_register_cleanup(int, channel_callback_fn *); |
160 | void channel_register_filter(int id, channel_filter_fn *fn); | 156 | void channel_register_filter(int, channel_filter_fn *); |
161 | void channel_cancel_cleanup(int id); | 157 | void channel_cancel_cleanup(int); |
162 | 158 | ||
163 | /* protocol handler */ | 159 | /* protocol handler */ |
164 | 160 | ||
165 | void channel_input_channel_request(int type, int plen, void *ctxt); | 161 | void channel_input_channel_request(int, int, void *); |
166 | void channel_input_close(int type, int plen, void *ctxt); | 162 | void channel_input_close(int, int, void *); |
167 | void channel_input_close_confirmation(int type, int plen, void *ctxt); | 163 | void channel_input_close_confirmation(int, int, void *); |
168 | void channel_input_data(int type, int plen, void *ctxt); | 164 | void channel_input_data(int, int, void *); |
169 | void channel_input_extended_data(int type, int plen, void *ctxt); | 165 | void channel_input_extended_data(int, int, void *); |
170 | void channel_input_ieof(int type, int plen, void *ctxt); | 166 | void channel_input_ieof(int, int, void *); |
171 | void channel_input_oclose(int type, int plen, void *ctxt); | 167 | void channel_input_oclose(int, int, void *); |
172 | void channel_input_open_confirmation(int type, int plen, void *ctxt); | 168 | void channel_input_open_confirmation(int, int, void *); |
173 | void channel_input_open_failure(int type, int plen, void *ctxt); | 169 | void channel_input_open_failure(int, int, void *); |
174 | void channel_input_port_open(int type, int plen, void *ctxt); | 170 | void channel_input_port_open(int, int, void *); |
175 | void channel_input_window_adjust(int type, int plen, void *ctxt); | 171 | void channel_input_window_adjust(int, int, void *); |
176 | 172 | ||
177 | /* file descriptor handling (read/write) */ | 173 | /* file descriptor handling (read/write) */ |
178 | 174 | ||
179 | void | 175 | void |
180 | channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp, | 176 | channel_prepare_select(fd_set **, fd_set **, int *, int); |
181 | int rekeying); | 177 | void channel_after_select(fd_set *, fd_set *); |
182 | void channel_after_select(fd_set * readset, fd_set * writeset); | ||
183 | void channel_output_poll(void); | 178 | void channel_output_poll(void); |
184 | 179 | ||
185 | int channel_not_very_much_buffered_data(void); | 180 | int channel_not_very_much_buffered_data(void); |
@@ -191,45 +186,41 @@ int channel_find_open(void); | |||
191 | 186 | ||
192 | /* channel_tcpfwd.c */ | 187 | /* channel_tcpfwd.c */ |
193 | int | 188 | int |
194 | channel_request_local_forwarding(u_short listen_port, | 189 | channel_request_local_forwarding(u_short, const char *, u_short, int); |
195 | const char *host_to_connect, u_short port_to_connect, int gateway_ports); | ||
196 | int | 190 | int |
197 | channel_request_forwarding(const char *listen_address, u_short listen_port, | 191 | channel_request_forwarding(const char *, u_short, const char *, u_short, int, |
198 | const char *host_to_connect, u_short port_to_connect, int gateway_ports, | 192 | int); |
199 | int remote_fwd); | ||
200 | void | 193 | void |
201 | channel_request_remote_forwarding(u_short port, const char *host, | 194 | channel_request_remote_forwarding(u_short, const char *, u_short); |
202 | u_short remote_port); | ||
203 | void channel_permit_all_opens(void); | 195 | void channel_permit_all_opens(void); |
204 | void channel_add_permitted_opens(char *host, int port); | 196 | void channel_add_permitted_opens(char *, int); |
205 | void channel_clear_permitted_opens(void); | 197 | void channel_clear_permitted_opens(void); |
206 | void channel_input_port_forward_request(int is_root, int gateway_ports); | 198 | void channel_input_port_forward_request(int, int); |
207 | int channel_connect_to(const char *host, u_short host_port); | 199 | int channel_connect_to(const char *, u_short); |
208 | int channel_connect_by_listen_adress(u_short listen_port); | 200 | int channel_connect_by_listen_adress(u_short); |
209 | 201 | ||
210 | /* x11 forwarding */ | 202 | /* x11 forwarding */ |
211 | 203 | ||
212 | int x11_connect_display(void); | 204 | int x11_connect_display(void); |
213 | char *x11_create_display(int screen); | 205 | char *x11_create_display(int); |
214 | char *x11_create_display_inet(int screen, int x11_display_offset); | 206 | char *x11_create_display_inet(int, int); |
215 | void x11_input_open(int type, int plen, void *ctxt); | 207 | void x11_input_open(int, int, void *); |
216 | void x11_request_forwarding(void); | 208 | void x11_request_forwarding(void); |
217 | void | 209 | void |
218 | x11_request_forwarding_with_spoofing(int client_session_id, | 210 | x11_request_forwarding_with_spoofing(int, const char *, const char *); |
219 | const char *proto, const char *data); | 211 | void deny_input_open(int, int, void *); |
220 | void deny_input_open(int type, int plen, void *ctxt); | ||
221 | 212 | ||
222 | /* agent forwarding */ | 213 | /* agent forwarding */ |
223 | 214 | ||
224 | void auth_request_forwarding(void); | 215 | void auth_request_forwarding(void); |
225 | char *auth_get_socket_name(void); | 216 | char *auth_get_socket_name(void); |
226 | void auth_sock_cleanup_proc(void *pw); | 217 | void auth_sock_cleanup_proc(void *); |
227 | int auth_input_request_forwarding(struct passwd * pw); | 218 | int auth_input_request_forwarding(struct passwd *); |
228 | void auth_input_open_request(int type, int plen, void *ctxt); | 219 | void auth_input_open_request(int, int, void *); |
229 | 220 | ||
230 | /* channel close */ | 221 | /* channel close */ |
231 | 222 | ||
232 | typedef void chan_event_fn(Channel * c); | 223 | typedef void chan_event_fn(Channel *); |
233 | 224 | ||
234 | /* for the input state */ | 225 | /* for the input state */ |
235 | extern chan_event_fn *chan_rcvd_oclose; | 226 | extern chan_event_fn *chan_rcvd_oclose; |
@@ -241,9 +232,9 @@ extern chan_event_fn *chan_rcvd_ieof; | |||
241 | extern chan_event_fn *chan_write_failed; | 232 | extern chan_event_fn *chan_write_failed; |
242 | extern chan_event_fn *chan_obuf_empty; | 233 | extern chan_event_fn *chan_obuf_empty; |
243 | 234 | ||
244 | int chan_is_dead(Channel * c); | 235 | int chan_is_dead(Channel *); |
245 | void chan_mark_dead(Channel * c); | 236 | void chan_mark_dead(Channel *); |
246 | void chan_init_iostates(Channel * c); | 237 | void chan_init_iostates(Channel *); |
247 | void chan_init(void); | 238 | void chan_init(void); |
248 | 239 | ||
249 | #endif | 240 | #endif |
@@ -32,7 +32,7 @@ | |||
32 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 32 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | /* RCSID("$OpenBSD: cipher.h,v 1.26 2001/05/28 22:51:11 markus Exp $"); */ | 35 | /* RCSID("$OpenBSD: cipher.h,v 1.27 2001/06/26 06:32:49 itojun Exp $"); */ |
36 | 36 | ||
37 | #ifndef CIPHER_H | 37 | #ifndef CIPHER_H |
38 | #define CIPHER_H | 38 | #define CIPHER_H |
@@ -104,15 +104,16 @@ struct Cipher { | |||
104 | void (*decrypt)(CipherContext *, u_char *, const u_char *, u_int); | 104 | void (*decrypt)(CipherContext *, u_char *, const u_char *, u_int); |
105 | }; | 105 | }; |
106 | 106 | ||
107 | u_int cipher_mask_ssh1(int client); | 107 | u_int cipher_mask_ssh1(int); |
108 | Cipher *cipher_by_name(const char *name); | 108 | Cipher *cipher_by_name(const char *); |
109 | Cipher *cipher_by_number(int id); | 109 | Cipher *cipher_by_number(int); |
110 | int cipher_number(const char *name); | 110 | int cipher_number(const char *); |
111 | char *cipher_name(int id); | 111 | char *cipher_name(int); |
112 | int ciphers_valid(const char *names); | 112 | int ciphers_valid(const char *); |
113 | void cipher_init(CipherContext *, Cipher *, const u_char *, u_int, const u_char *, u_int); | 113 | void cipher_init(CipherContext *, Cipher *, const u_char *, u_int, |
114 | void cipher_encrypt(CipherContext *context, u_char *dest, const u_char *src, u_int len); | 114 | const u_char *, u_int); |
115 | void cipher_decrypt(CipherContext *context, u_char *dest, const u_char *src, u_int len); | 115 | void cipher_encrypt(CipherContext *, u_char *, const u_char *, u_int); |
116 | void cipher_set_key_string(CipherContext *context, Cipher *cipher, const char *passphrase); | 116 | void cipher_decrypt(CipherContext *, u_char *, const u_char *, u_int); |
117 | void cipher_set_key_string(CipherContext *, Cipher *, const char *); | ||
117 | 118 | ||
118 | #endif /* CIPHER_H */ | 119 | #endif /* CIPHER_H */ |
diff --git a/clientloop.h b/clientloop.h index ee40d87ea..b7f48aa86 100644 --- a/clientloop.h +++ b/clientloop.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: clientloop.h,v 1.4 2001/02/06 22:43:02 markus Exp $ */ | 1 | /* $OpenBSD: clientloop.h,v 1.5 2001/06/26 06:32:50 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -36,4 +36,4 @@ | |||
36 | */ | 36 | */ |
37 | 37 | ||
38 | /* Client side main loop for the interactive session. */ | 38 | /* Client side main loop for the interactive session. */ |
39 | int client_loop(int have_pty, int escape_char, int id); | 39 | int client_loop(int, int, int); |
@@ -21,7 +21,7 @@ | |||
21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 | */ | 23 | */ |
24 | /* RCSID("$OpenBSD: compat.h,v 1.26 2001/06/25 08:25:37 markus Exp $"); */ | 24 | /* RCSID("$OpenBSD: compat.h,v 1.27 2001/06/26 06:32:50 itojun Exp $"); */ |
25 | 25 | ||
26 | #ifndef COMPAT_H | 26 | #ifndef COMPAT_H |
27 | #define COMPAT_H | 27 | #define COMPAT_H |
@@ -53,9 +53,9 @@ | |||
53 | 53 | ||
54 | void enable_compat13(void); | 54 | void enable_compat13(void); |
55 | void enable_compat20(void); | 55 | void enable_compat20(void); |
56 | void compat_datafellows(const char *s); | 56 | void compat_datafellows(const char *); |
57 | int proto_spec(const char *spec); | 57 | int proto_spec(const char *); |
58 | char *compat_cipher_proposal(char *cipher_prop); | 58 | char *compat_cipher_proposal(char *); |
59 | extern int compat13; | 59 | extern int compat13; |
60 | extern int compat20; | 60 | extern int compat20; |
61 | extern int datafellows; | 61 | extern int datafellows; |
diff --git a/compress.h b/compress.h index f90932a6f..a9d06fc05 100644 --- a/compress.h +++ b/compress.h | |||
@@ -11,7 +11,7 @@ | |||
11 | * called by a name other than "ssh" or "Secure Shell". | 11 | * called by a name other than "ssh" or "Secure Shell". |
12 | */ | 12 | */ |
13 | 13 | ||
14 | /* RCSID("$OpenBSD: compress.h,v 1.8 2001/04/05 10:39:02 markus Exp $"); */ | 14 | /* RCSID("$OpenBSD: compress.h,v 1.9 2001/06/26 06:32:50 itojun Exp $"); */ |
15 | 15 | ||
16 | #ifndef COMPRESS_H | 16 | #ifndef COMPRESS_H |
17 | #define COMPRESS_H | 17 | #define COMPRESS_H |
@@ -20,7 +20,7 @@ | |||
20 | * Initializes compression; level is compression level from 1 to 9 (as in | 20 | * Initializes compression; level is compression level from 1 to 9 (as in |
21 | * gzip). | 21 | * gzip). |
22 | */ | 22 | */ |
23 | void buffer_compress_init_send(int level); | 23 | void buffer_compress_init_send(int); |
24 | void buffer_compress_init_recv(void); | 24 | void buffer_compress_init_recv(void); |
25 | 25 | ||
26 | /* Frees any data structures allocated by buffer_compress_init. */ | 26 | /* Frees any data structures allocated by buffer_compress_init. */ |
@@ -34,7 +34,7 @@ void buffer_compress_uninit(void); | |||
34 | * order since they together form a single compression stream) by the | 34 | * order since they together form a single compression stream) by the |
35 | * receiver. This appends the compressed data to the output buffer. | 35 | * receiver. This appends the compressed data to the output buffer. |
36 | */ | 36 | */ |
37 | void buffer_compress(Buffer * input_buffer, Buffer * output_buffer); | 37 | void buffer_compress(Buffer *, Buffer *); |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * Uncompresses the contents of input_buffer into output_buffer. All packets | 40 | * Uncompresses the contents of input_buffer into output_buffer. All packets |
@@ -44,6 +44,6 @@ void buffer_compress(Buffer * input_buffer, Buffer * output_buffer); | |||
44 | * buffer_compress was called, and in the same order that buffers compressed | 44 | * buffer_compress was called, and in the same order that buffers compressed |
45 | * with that. This appends the uncompressed data to the output buffer. | 45 | * with that. This appends the uncompressed data to the output buffer. |
46 | */ | 46 | */ |
47 | void buffer_uncompress(Buffer * input_buffer, Buffer * output_buffer); | 47 | void buffer_uncompress(Buffer *, Buffer *); |
48 | 48 | ||
49 | #endif /* COMPRESS_H */ | 49 | #endif /* COMPRESS_H */ |
@@ -11,7 +11,7 @@ | |||
11 | * called by a name other than "ssh" or "Secure Shell". | 11 | * called by a name other than "ssh" or "Secure Shell". |
12 | */ | 12 | */ |
13 | 13 | ||
14 | /* RCSID("$OpenBSD: crc32.h,v 1.10 2001/03/02 18:54:31 deraadt Exp $"); */ | 14 | /* RCSID("$OpenBSD: crc32.h,v 1.11 2001/06/26 06:32:51 itojun Exp $"); */ |
15 | 15 | ||
16 | #ifndef CRC32_H | 16 | #ifndef CRC32_H |
17 | #define CRC32_H | 17 | #define CRC32_H |
@@ -20,6 +20,6 @@ | |||
20 | * This computes a 32 bit CRC of the data in the buffer, and returns the CRC. | 20 | * This computes a 32 bit CRC of the data in the buffer, and returns the CRC. |
21 | * The polynomial used is 0xedb88320. | 21 | * The polynomial used is 0xedb88320. |
22 | */ | 22 | */ |
23 | u_int ssh_crc32(const u_char *buf, u_int len); | 23 | u_int ssh_crc32(const u_char *, u_int); |
24 | 24 | ||
25 | #endif /* CRC32_H */ | 25 | #endif /* CRC32_H */ |
diff --git a/deattack.h b/deattack.h index 3907159b4..24d3957a6 100644 --- a/deattack.h +++ b/deattack.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: deattack.h,v 1.5 2001/01/29 01:58:15 niklas Exp $ */ | 1 | /* $OpenBSD: deattack.h,v 1.6 2001/06/26 06:32:51 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Cryptographic attack detector for ssh - Header file | 4 | * Cryptographic attack detector for ssh - Header file |
@@ -26,5 +26,5 @@ | |||
26 | #define DEATTACK_OK 0 | 26 | #define DEATTACK_OK 0 |
27 | #define DEATTACK_DETECTED 1 | 27 | #define DEATTACK_DETECTED 1 |
28 | 28 | ||
29 | int detect_attack(u_char *buf, u_int32_t len, u_char IV[8]); | 29 | int detect_attack(u_char *, u_int32_t, u_char[8]); |
30 | #endif | 30 | #endif |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dh.h,v 1.5 2001/04/03 19:53:29 markus Exp $ */ | 1 | /* $OpenBSD: dh.h,v 1.6 2001/06/26 06:32:52 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2000 Niels Provos. All rights reserved. | 4 | * Copyright (c) 2000 Niels Provos. All rights reserved. |
@@ -32,15 +32,15 @@ struct dhgroup { | |||
32 | BIGNUM *p; | 32 | BIGNUM *p; |
33 | }; | 33 | }; |
34 | 34 | ||
35 | DH *choose_dh(int min, int nbits, int max); | 35 | DH *choose_dh(int, int, int); |
36 | DH *dh_new_group_asc(const char *, const char *); | 36 | DH *dh_new_group_asc(const char *, const char *); |
37 | DH *dh_new_group(BIGNUM *, BIGNUM *); | 37 | DH *dh_new_group(BIGNUM *, BIGNUM *); |
38 | DH *dh_new_group1(void); | 38 | DH *dh_new_group1(void); |
39 | 39 | ||
40 | void dh_gen_key(DH *, int); | 40 | void dh_gen_key(DH *, int); |
41 | int dh_pub_is_valid(DH *dh, BIGNUM *dh_pub); | 41 | int dh_pub_is_valid(DH *, BIGNUM *); |
42 | 42 | ||
43 | int dh_estimate(int bits); | 43 | int dh_estimate(int); |
44 | 44 | ||
45 | #define DH_GRP_MIN 1024 | 45 | #define DH_GRP_MIN 1024 |
46 | #define DH_GRP_MAX 8192 | 46 | #define DH_GRP_MAX 8192 |
diff --git a/dispatch.h b/dispatch.h index 0bee03b2b..f796705a2 100644 --- a/dispatch.h +++ b/dispatch.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dispatch.h,v 1.4 2001/01/29 01:58:15 niklas Exp $ */ | 1 | /* $OpenBSD: dispatch.h,v 1.5 2001/06/26 06:32:52 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
@@ -28,9 +28,9 @@ enum { | |||
28 | DISPATCH_NONBLOCK | 28 | DISPATCH_NONBLOCK |
29 | }; | 29 | }; |
30 | 30 | ||
31 | typedef void dispatch_fn(int type, int plen, void *ctxt); | 31 | typedef void dispatch_fn(int, int, void *); |
32 | 32 | ||
33 | void dispatch_init(dispatch_fn *dflt); | 33 | void dispatch_init(dispatch_fn *); |
34 | void dispatch_set(int type, dispatch_fn *fn); | 34 | void dispatch_set(int, dispatch_fn *); |
35 | void dispatch_run(int mode, int *done, void *ctxt); | 35 | void dispatch_run(int, int *, void *); |
36 | void dispatch_protocol_error(int type, int plen, void *ctxt); | 36 | void dispatch_protocol_error(int, int, void *); |
diff --git a/groupaccess.h b/groupaccess.h index b4e5e42fc..01e394f69 100644 --- a/groupaccess.h +++ b/groupaccess.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: groupaccess.h,v 1.2 2001/01/29 01:58:15 niklas Exp $ */ | 1 | /* $OpenBSD: groupaccess.h,v 1.3 2001/06/26 06:32:52 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2001 Kevin Steves. All rights reserved. | 4 | * Copyright (c) 2001 Kevin Steves. All rights reserved. |
@@ -33,13 +33,13 @@ | |||
33 | * Initialize group access list for user with primary (base) and | 33 | * Initialize group access list for user with primary (base) and |
34 | * supplementary groups. Return the number of groups in the list. | 34 | * supplementary groups. Return the number of groups in the list. |
35 | */ | 35 | */ |
36 | int ga_init(const char *user, gid_t base); | 36 | int ga_init(const char *, gid_t); |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * Return 1 if one of user's groups is contained in groups. | 39 | * Return 1 if one of user's groups is contained in groups. |
40 | * Return 0 otherwise. Use match_pattern() for string comparison. | 40 | * Return 0 otherwise. Use match_pattern() for string comparison. |
41 | */ | 41 | */ |
42 | int ga_match(char * const *groups, int ngroups); | 42 | int ga_match(char * const *, int); |
43 | 43 | ||
44 | /* | 44 | /* |
45 | * Free memory allocated for group access list. | 45 | * Free memory allocated for group access list. |
diff --git a/hostfile.h b/hostfile.h index 346bcd9ba..b83b77008 100644 --- a/hostfile.h +++ b/hostfile.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: hostfile.h,v 1.7 2001/02/08 19:30:51 itojun Exp $ */ | 1 | /* $OpenBSD: hostfile.h,v 1.8 2001/06/26 06:32:53 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -15,7 +15,7 @@ | |||
15 | #define HOSTFILE_H | 15 | #define HOSTFILE_H |
16 | 16 | ||
17 | int | 17 | int |
18 | auth_rsa_read_key(char **cpp, u_int *bitsp, BIGNUM * e, BIGNUM * n); | 18 | auth_rsa_read_key(char **, u_int *, BIGNUM *, BIGNUM *); |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * Checks whether the given host is already in the list of our known hosts. | 21 | * Checks whether the given host is already in the list of our known hosts. |
@@ -28,13 +28,12 @@ typedef enum { | |||
28 | } HostStatus; | 28 | } HostStatus; |
29 | 29 | ||
30 | HostStatus | 30 | HostStatus |
31 | check_host_in_hostfile(const char *filename, const char *host, Key *key, | 31 | check_host_in_hostfile(const char *, const char *, Key *, Key *, int *); |
32 | Key *found, int *line); | ||
33 | 32 | ||
34 | /* | 33 | /* |
35 | * Appends an entry to the host file. Returns false if the entry could not | 34 | * Appends an entry to the host file. Returns false if the entry could not |
36 | * be appended. | 35 | * be appended. |
37 | */ | 36 | */ |
38 | int add_host_to_hostfile(const char *filename, const char *host, Key *key); | 37 | int add_host_to_hostfile(const char *, const char *, Key *); |
39 | 38 | ||
40 | #endif | 39 | #endif |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kex.h,v 1.24 2001/06/25 08:25:37 markus Exp $ */ | 1 | /* $OpenBSD: kex.h,v 1.25 2001/06/26 06:32:53 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. |
@@ -107,24 +107,24 @@ struct Kex { | |||
107 | int flags; | 107 | int flags; |
108 | char *client_version_string; | 108 | char *client_version_string; |
109 | char *server_version_string; | 109 | char *server_version_string; |
110 | int (*verify_host_key)(Key *hostkey); | 110 | int (*verify_host_key)(Key *); |
111 | Key *(*load_host_key)(int type); | 111 | Key *(*load_host_key)(int); |
112 | }; | 112 | }; |
113 | 113 | ||
114 | Kex *kex_setup(char *proposal[PROPOSAL_MAX]); | 114 | Kex *kex_setup(char *[PROPOSAL_MAX]); |
115 | void kex_finish(Kex *kex); | 115 | void kex_finish(Kex *); |
116 | 116 | ||
117 | void kex_send_kexinit(Kex *kex); | 117 | void kex_send_kexinit(Kex *); |
118 | void kex_input_kexinit(int type, int plen, void *ctxt); | 118 | void kex_input_kexinit(int, int, void *); |
119 | void kex_derive_keys(Kex *k, u_char *hash, BIGNUM *shared_secret); | 119 | void kex_derive_keys(Kex *, u_char *, BIGNUM *); |
120 | 120 | ||
121 | void kexdh(Kex *); | 121 | void kexdh(Kex *); |
122 | void kexgex(Kex *); | 122 | void kexgex(Kex *); |
123 | 123 | ||
124 | Newkeys *kex_get_newkeys(int mode); | 124 | Newkeys *kex_get_newkeys(int); |
125 | 125 | ||
126 | #if defined(DEBUG_KEX) || defined(DEBUG_KEXDH) | 126 | #if defined(DEBUG_KEX) || defined(DEBUG_KEXDH) |
127 | void dump_digest(char *msg, u_char *digest, int len); | 127 | void dump_digest(char *, u_char *, int); |
128 | #endif | 128 | #endif |
129 | 129 | ||
130 | #endif | 130 | #endif |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: key.h,v 1.13 2001/06/25 08:25:38 markus Exp $ */ | 1 | /* $OpenBSD: key.h,v 1.14 2001/06/26 06:32:54 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. |
@@ -50,35 +50,27 @@ struct Key { | |||
50 | DSA *dsa; | 50 | DSA *dsa; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | Key *key_new(int type); | 53 | Key *key_new(int); |
54 | Key *key_new_private(int type); | 54 | Key *key_new_private(int); |
55 | void key_free(Key *k); | 55 | void key_free(Key *); |
56 | int key_equal(Key *a, Key *b); | 56 | int key_equal(Key *, Key *); |
57 | char *key_fingerprint(Key *k, enum fp_type dgst_type, enum fp_rep dgst_rep); | 57 | char *key_fingerprint(Key *, enum fp_type, enum fp_rep); |
58 | char *key_type(Key *k); | 58 | char *key_type(Key *); |
59 | int key_write(Key *key, FILE *f); | 59 | int key_write(Key *, FILE *); |
60 | int key_read(Key *key, char **cpp); | 60 | int key_read(Key *, char **); |
61 | u_int key_size(Key *k); | 61 | u_int key_size(Key *); |
62 | 62 | ||
63 | Key *key_generate(int type, u_int bits); | 63 | Key *key_generate(int, u_int); |
64 | Key *key_from_private(Key *k); | 64 | Key *key_from_private(Key *); |
65 | int key_type_from_name(char *name); | 65 | int key_type_from_name(char *); |
66 | 66 | ||
67 | Key *key_from_blob(char *blob, int blen); | 67 | Key *key_from_blob(char *, int); |
68 | int key_to_blob(Key *key, u_char **blobp, u_int *lenp); | 68 | int key_to_blob(Key *, u_char **, u_int *); |
69 | char *key_ssh_name(Key *k); | 69 | char *key_ssh_name(Key *); |
70 | int key_names_valid2(const char *names); | 70 | int key_names_valid2(const char *); |
71 | 71 | ||
72 | int | 72 | int key_sign(Key *, u_char **, int *, u_char *, int); |
73 | key_sign( | ||
74 | Key *key, | ||
75 | u_char **sigp, int *lenp, | ||
76 | u_char *data, int datalen); | ||
77 | 73 | ||
78 | int | 74 | int key_verify(Key *, u_char *, int, u_char *, int); |
79 | key_verify( | ||
80 | Key *key, | ||
81 | u_char *signature, int signaturelen, | ||
82 | u_char *data, int datalen); | ||
83 | 75 | ||
84 | #endif | 76 | #endif |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: log.h,v 1.2 2001/01/29 01:58:16 niklas Exp $ */ | 1 | /* $OpenBSD: log.h,v 1.3 2001/06/26 06:32:55 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -46,23 +46,23 @@ typedef enum { | |||
46 | SYSLOG_LEVEL_DEBUG3 | 46 | SYSLOG_LEVEL_DEBUG3 |
47 | } LogLevel; | 47 | } LogLevel; |
48 | /* Initializes logging. */ | 48 | /* Initializes logging. */ |
49 | void log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr); | 49 | void log_init(char *, LogLevel, SyslogFacility, int); |
50 | 50 | ||
51 | /* Logging implementation, depending on server or client */ | 51 | /* Logging implementation, depending on server or client */ |
52 | void do_log(LogLevel level, const char *fmt, va_list args); | 52 | void do_log(LogLevel, const char *, va_list); |
53 | 53 | ||
54 | /* name to facility/level */ | 54 | /* name to facility/level */ |
55 | SyslogFacility log_facility_number(char *name); | 55 | SyslogFacility log_facility_number(char *); |
56 | LogLevel log_level_number(char *name); | 56 | LogLevel log_level_number(char *); |
57 | 57 | ||
58 | /* Output a message to syslog or stderr */ | 58 | /* Output a message to syslog or stderr */ |
59 | void fatal(const char *fmt,...) __attribute__((format(printf, 1, 2))); | 59 | void fatal(const char *, ...) __attribute__((format(printf, 1, 2))); |
60 | void error(const char *fmt,...) __attribute__((format(printf, 1, 2))); | 60 | void error(const char *, ...) __attribute__((format(printf, 1, 2))); |
61 | void log(const char *fmt,...) __attribute__((format(printf, 1, 2))); | 61 | void log(const char *, ...) __attribute__((format(printf, 1, 2))); |
62 | void verbose(const char *fmt,...) __attribute__((format(printf, 1, 2))); | 62 | void verbose(const char *, ...) __attribute__((format(printf, 1, 2))); |
63 | void debug(const char *fmt,...) __attribute__((format(printf, 1, 2))); | 63 | void debug(const char *, ...) __attribute__((format(printf, 1, 2))); |
64 | void debug2(const char *fmt,...) __attribute__((format(printf, 1, 2))); | 64 | void debug2(const char *, ...) __attribute__((format(printf, 1, 2))); |
65 | void debug3(const char *fmt,...) __attribute__((format(printf, 1, 2))); | 65 | void debug3(const char *, ...) __attribute__((format(printf, 1, 2))); |
66 | 66 | ||
67 | /* same as fatal() but w/o logging */ | 67 | /* same as fatal() but w/o logging */ |
68 | void fatal_cleanup(void); | 68 | void fatal_cleanup(void); |
@@ -72,9 +72,9 @@ void fatal_cleanup(void); | |||
72 | * before exiting. It is permissible to call fatal_remove_cleanup for the | 72 | * before exiting. It is permissible to call fatal_remove_cleanup for the |
73 | * function itself from the function. | 73 | * function itself from the function. |
74 | */ | 74 | */ |
75 | void fatal_add_cleanup(void (*proc) (void *context), void *context); | 75 | void fatal_add_cleanup(void (*) (void *), void *); |
76 | 76 | ||
77 | /* Removes a cleanup function to be called at fatal(). */ | 77 | /* Removes a cleanup function to be called at fatal(). */ |
78 | void fatal_remove_cleanup(void (*proc) (void *context), void *context); | 78 | void fatal_remove_cleanup(void (*) (void *), void *); |
79 | 79 | ||
80 | #endif | 80 | #endif |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: mac.h,v 1.1 2001/02/11 12:59:24 markus Exp $ */ | 1 | /* $OpenBSD: mac.h,v 1.2 2001/06/26 06:32:55 itojun Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -23,6 +23,6 @@ | |||
23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | int mac_valid(const char *names); | 26 | int mac_valid(const char *); |
27 | int mac_init(Mac *mac, char *name); | 27 | int mac_init(Mac *, char *); |
28 | u_char *mac_compute(Mac *mac, u_int32_t seqno, u_char *data, int datalen); | 28 | u_char *mac_compute(Mac *, u_int32_t, u_char *, int); |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: match.h,v 1.8 2001/06/24 05:25:10 markus Exp $ */ | 1 | /* $OpenBSD: match.h,v 1.9 2001/06/26 06:32:56 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -14,10 +14,10 @@ | |||
14 | #ifndef MATCH_H | 14 | #ifndef MATCH_H |
15 | #define MATCH_H | 15 | #define MATCH_H |
16 | 16 | ||
17 | int match_pattern(const char *s, const char *pattern); | 17 | int match_pattern(const char *, const char *); |
18 | int match_hostname(const char *host, const char *pattern, u_int len); | 18 | int match_hostname(const char *, const char *, u_int); |
19 | int match_host_and_ip(const char *host, const char *ip, const char *p); | 19 | int match_host_and_ip(const char *, const char *, const char *); |
20 | int match_user(const char *u, const char *h, const char *i, const char *p); | 20 | int match_user(const char *, const char *, const char *, const char *); |
21 | char *match_list(const char *client, const char *server, u_int *next); | 21 | char *match_list(const char *, const char *, u_int *); |
22 | 22 | ||
23 | #endif | 23 | #endif |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: misc.h,v 1.8 2001/05/19 19:43:57 stevesk Exp $ */ | 1 | /* $OpenBSD: misc.h,v 1.9 2001/06/26 06:32:56 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -12,27 +12,27 @@ | |||
12 | * called by a name other than "ssh" or "Secure Shell". | 12 | * called by a name other than "ssh" or "Secure Shell". |
13 | */ | 13 | */ |
14 | /* remove newline at end of string */ | 14 | /* remove newline at end of string */ |
15 | char *chop(char *s); | 15 | char *chop(char *); |
16 | 16 | ||
17 | /* return next token in configuration line */ | 17 | /* return next token in configuration line */ |
18 | char *strdelim(char **s); | 18 | char *strdelim(char **); |
19 | 19 | ||
20 | /* set/unset filedescriptor to non-blocking */ | 20 | /* set/unset filedescriptor to non-blocking */ |
21 | void set_nonblock(int fd); | 21 | void set_nonblock(int); |
22 | void unset_nonblock(int fd); | 22 | void unset_nonblock(int); |
23 | 23 | ||
24 | struct passwd * pwcopy(struct passwd *pw); | 24 | struct passwd * pwcopy(struct passwd *); |
25 | 25 | ||
26 | /* | 26 | /* |
27 | * Convert ASCII string to TCP/IP port number. | 27 | * Convert ASCII string to TCP/IP port number. |
28 | * Port must be >0 and <=65535. | 28 | * Port must be >0 and <=65535. |
29 | * Return 0 if invalid. | 29 | * Return 0 if invalid. |
30 | */ | 30 | */ |
31 | int a2port(const char *s); | 31 | int a2port(const char *); |
32 | 32 | ||
33 | /* code from scp.c/rcp.c */ | 33 | /* code from scp.c/rcp.c */ |
34 | char *cleanhostname(char *host); | 34 | char *cleanhostname(char *); |
35 | char *colon(char *cp); | 35 | char *colon(char *); |
36 | 36 | ||
37 | /* | 37 | /* |
38 | * Convert a time string into seconds; format is | 38 | * Convert a time string into seconds; format is |
@@ -56,7 +56,7 @@ char *colon(char *cp); | |||
56 | * Return -1 if time string is invalid. | 56 | * Return -1 if time string is invalid. |
57 | */ | 57 | */ |
58 | 58 | ||
59 | long convtime(const char *s); | 59 | long convtime(const char *); |
60 | 60 | ||
61 | /* function to assist building execv() arguments */ | 61 | /* function to assist building execv() arguments */ |
62 | typedef struct arglist arglist; | 62 | typedef struct arglist arglist; |
@@ -66,7 +66,7 @@ struct arglist { | |||
66 | int nalloc; | 66 | int nalloc; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | void addargs(arglist *args, char *fmt, ...) __attribute__((format(printf, 2, 3))); | 69 | void addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3))); |
70 | 70 | ||
71 | /* wrapper for signal interface */ | 71 | /* wrapper for signal interface */ |
72 | typedef void (*mysig_t)(int); | 72 | typedef void (*mysig_t)(int); |
@@ -12,7 +12,7 @@ | |||
12 | * called by a name other than "ssh" or "Secure Shell". | 12 | * called by a name other than "ssh" or "Secure Shell". |
13 | */ | 13 | */ |
14 | 14 | ||
15 | /* RCSID("$OpenBSD: mpaux.h,v 1.9 2000/12/19 23:17:57 markus Exp $"); */ | 15 | /* RCSID("$OpenBSD: mpaux.h,v 1.10 2001/06/26 06:32:57 itojun Exp $"); */ |
16 | 16 | ||
17 | #ifndef MPAUX_H | 17 | #ifndef MPAUX_H |
18 | #define MPAUX_H | 18 | #define MPAUX_H |
@@ -23,9 +23,6 @@ | |||
23 | * representations of host_key_n, session_key_n, and the cookie. | 23 | * representations of host_key_n, session_key_n, and the cookie. |
24 | */ | 24 | */ |
25 | void | 25 | void |
26 | compute_session_id(u_char session_id[16], | 26 | compute_session_id(u_char[16], u_char[8], BIGNUM *, BIGNUM *); |
27 | u_char cookie[8], | ||
28 | BIGNUM * host_key_n, | ||
29 | BIGNUM * session_key_n); | ||
30 | 27 | ||
31 | #endif /* MPAUX_H */ | 28 | #endif /* MPAUX_H */ |
@@ -11,7 +11,7 @@ | |||
11 | * called by a name other than "ssh" or "Secure Shell". | 11 | * called by a name other than "ssh" or "Secure Shell". |
12 | */ | 12 | */ |
13 | 13 | ||
14 | /* RCSID("$OpenBSD: packet.h,v 1.23 2001/05/28 23:58:35 markus Exp $"); */ | 14 | /* RCSID("$OpenBSD: packet.h,v 1.24 2001/06/26 06:32:57 itojun Exp $"); */ |
15 | 15 | ||
16 | #ifndef PACKET_H | 16 | #ifndef PACKET_H |
17 | #define PACKET_H | 17 | #define PACKET_H |
@@ -23,7 +23,7 @@ | |||
23 | * packet_set_encryption_key is called. It is permissible that fd_in and | 23 | * packet_set_encryption_key is called. It is permissible that fd_in and |
24 | * fd_out are the same descriptor; in that case it is assumed to be a socket. | 24 | * fd_out are the same descriptor; in that case it is assumed to be a socket. |
25 | */ | 25 | */ |
26 | void packet_set_connection(int fd_in, int fd_out); | 26 | void packet_set_connection(int, int); |
27 | 27 | ||
28 | /* Puts the connection file descriptors into non-blocking mode. */ | 28 | /* Puts the connection file descriptors into non-blocking mode. */ |
29 | void packet_set_nonblocking(void); | 29 | void packet_set_nonblocking(void); |
@@ -46,32 +46,31 @@ void packet_close(void); | |||
46 | * encrypted independently of each other. Cipher types are defined in ssh.h. | 46 | * encrypted independently of each other. Cipher types are defined in ssh.h. |
47 | */ | 47 | */ |
48 | void | 48 | void |
49 | packet_set_encryption_key(const u_char *key, u_int keylen, | 49 | packet_set_encryption_key(const u_char *, u_int, int); |
50 | int cipher_type); | ||
51 | 50 | ||
52 | /* | 51 | /* |
53 | * Sets remote side protocol flags for the current connection. This can be | 52 | * Sets remote side protocol flags for the current connection. This can be |
54 | * called at any time. | 53 | * called at any time. |
55 | */ | 54 | */ |
56 | void packet_set_protocol_flags(u_int flags); | 55 | void packet_set_protocol_flags(u_int); |
57 | 56 | ||
58 | /* Returns the remote protocol flags set earlier by the above function. */ | 57 | /* Returns the remote protocol flags set earlier by the above function. */ |
59 | u_int packet_get_protocol_flags(void); | 58 | u_int packet_get_protocol_flags(void); |
60 | 59 | ||
61 | /* Enables compression in both directions starting from the next packet. */ | 60 | /* Enables compression in both directions starting from the next packet. */ |
62 | void packet_start_compression(int level); | 61 | void packet_start_compression(int); |
63 | 62 | ||
64 | /* | 63 | /* |
65 | * Informs that the current session is interactive. Sets IP flags for | 64 | * Informs that the current session is interactive. Sets IP flags for |
66 | * optimal performance in interactive use. | 65 | * optimal performance in interactive use. |
67 | */ | 66 | */ |
68 | void packet_set_interactive(int interactive); | 67 | void packet_set_interactive(int); |
69 | 68 | ||
70 | /* Returns true if the current connection is interactive. */ | 69 | /* Returns true if the current connection is interactive. */ |
71 | int packet_is_interactive(void); | 70 | int packet_is_interactive(void); |
72 | 71 | ||
73 | /* Starts constructing a packet to send. */ | 72 | /* Starts constructing a packet to send. */ |
74 | void packet_start(u_char type); | 73 | void packet_start(u_char); |
75 | 74 | ||
76 | /* Appends a character to the packet data. */ | 75 | /* Appends a character to the packet data. */ |
77 | void packet_put_char(int ch); | 76 | void packet_put_char(int ch); |
@@ -175,14 +174,14 @@ int packet_not_very_much_data_to_write(void); | |||
175 | 174 | ||
176 | /* maximum packet size, requested by client with SSH_CMSG_MAX_PACKET_SIZE */ | 175 | /* maximum packet size, requested by client with SSH_CMSG_MAX_PACKET_SIZE */ |
177 | extern int max_packet_size; | 176 | extern int max_packet_size; |
178 | int packet_set_maxsize(int s); | 177 | int packet_set_maxsize(int); |
179 | #define packet_get_maxsize() max_packet_size | 178 | #define packet_get_maxsize() max_packet_size |
180 | 179 | ||
181 | /* Stores tty modes from the fd or tiop into current packet. */ | 180 | /* Stores tty modes from the fd or tiop into current packet. */ |
182 | void tty_make_modes(int fd, struct termios *tiop); | 181 | void tty_make_modes(int, struct termios *); |
183 | 182 | ||
184 | /* Parses tty modes for the fd from the current packet. */ | 183 | /* Parses tty modes for the fd from the current packet. */ |
185 | void tty_parse_modes(int fd, int *n_bytes_ptr); | 184 | void tty_parse_modes(int, int *); |
186 | 185 | ||
187 | #define packet_integrity_check(payload_len, expected_len, type) \ | 186 | #define packet_integrity_check(payload_len, expected_len, type) \ |
188 | do { \ | 187 | do { \ |
@@ -212,9 +211,9 @@ int packet_connection_is_ipv4(void); | |||
212 | int packet_remaining(void); | 211 | int packet_remaining(void); |
213 | 212 | ||
214 | /* append an ignore message */ | 213 | /* append an ignore message */ |
215 | void packet_send_ignore(int nbytes); | 214 | void packet_send_ignore(int); |
216 | 215 | ||
217 | /* add an ignore message and make sure size (current+ignore) = n*sumlen */ | 216 | /* add an ignore message and make sure size (current+ignore) = n*sumlen */ |
218 | void packet_inject_ignore(int sumlen); | 217 | void packet_inject_ignore(int); |
219 | 218 | ||
220 | #endif /* PACKET_H */ | 219 | #endif /* PACKET_H */ |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: radix.h,v 1.2 2001/01/29 01:58:17 niklas Exp $ */ | 1 | /* $OpenBSD: radix.h,v 1.3 2001/06/26 06:32:57 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 1999 Dug Song. All rights reserved. | 4 | * Copyright (c) 1999 Dug Song. All rights reserved. |
@@ -24,5 +24,5 @@ | |||
24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | int creds_to_radix(CREDENTIALS * creds, u_char *buf, size_t buflen); | 27 | int creds_to_radix(CREDENTIALS *, u_char *, size_t); |
28 | int radix_to_creds(const char *buf, CREDENTIALS * creds); | 28 | int radix_to_creds(const char *, CREDENTIALS *); |
diff --git a/readconf.h b/readconf.h index 489ffc8c1..4b3be7615 100644 --- a/readconf.h +++ b/readconf.h | |||
@@ -11,7 +11,7 @@ | |||
11 | * called by a name other than "ssh" or "Secure Shell". | 11 | * called by a name other than "ssh" or "Secure Shell". |
12 | */ | 12 | */ |
13 | 13 | ||
14 | /* RCSID("$OpenBSD: readconf.h,v 1.32 2001/05/18 14:13:29 markus Exp $"); */ | 14 | /* RCSID("$OpenBSD: readconf.h,v 1.33 2001/06/26 06:32:58 itojun Exp $"); */ |
15 | 15 | ||
16 | #ifndef READCONF_H | 16 | #ifndef READCONF_H |
17 | #define READCONF_H | 17 | #define READCONF_H |
@@ -107,13 +107,13 @@ typedef struct { | |||
107 | * are processed in the following order: command line, user config file, | 107 | * are processed in the following order: command line, user config file, |
108 | * system config file. Last, fill_default_options is called. | 108 | * system config file. Last, fill_default_options is called. |
109 | */ | 109 | */ |
110 | void initialize_options(Options * options); | 110 | void initialize_options(Options *); |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * Called after processing other sources of option data, this fills those | 113 | * Called after processing other sources of option data, this fills those |
114 | * options for which no value has been specified with their default values. | 114 | * options for which no value has been specified with their default values. |
115 | */ | 115 | */ |
116 | void fill_default_options(Options * options); | 116 | void fill_default_options(Options *); |
117 | 117 | ||
118 | /* | 118 | /* |
119 | * Processes a single option line as used in the configuration files. This | 119 | * Processes a single option line as used in the configuration files. This |
@@ -121,9 +121,7 @@ void fill_default_options(Options * options); | |||
121 | * options | 121 | * options |
122 | */ | 122 | */ |
123 | int | 123 | int |
124 | process_config_line(Options * options, const char *host, | 124 | process_config_line(Options *, const char *, char *, const char *, int, int *); |
125 | char *line, const char *filename, int linenum, | ||
126 | int *activep); | ||
127 | 125 | ||
128 | /* | 126 | /* |
129 | * Reads the config file and modifies the options accordingly. Options | 127 | * Reads the config file and modifies the options accordingly. Options |
@@ -131,23 +129,20 @@ process_config_line(Options * options, const char *host, | |||
131 | * there is an error. If the file does not exist, this returns immediately. | 129 | * there is an error. If the file does not exist, this returns immediately. |
132 | */ | 130 | */ |
133 | void | 131 | void |
134 | read_config_file(const char *filename, const char *host, | 132 | read_config_file(const char *, const char *, Options *); |
135 | Options * options); | ||
136 | 133 | ||
137 | /* | 134 | /* |
138 | * Adds a local TCP/IP port forward to options. Never returns if there is an | 135 | * Adds a local TCP/IP port forward to options. Never returns if there is an |
139 | * error. | 136 | * error. |
140 | */ | 137 | */ |
141 | void | 138 | void |
142 | add_local_forward(Options * options, u_short port, const char *host, | 139 | add_local_forward(Options *, u_short, const char *, u_short); |
143 | u_short host_port); | ||
144 | 140 | ||
145 | /* | 141 | /* |
146 | * Adds a remote TCP/IP port forward to options. Never returns if there is | 142 | * Adds a remote TCP/IP port forward to options. Never returns if there is |
147 | * an error. | 143 | * an error. |
148 | */ | 144 | */ |
149 | void | 145 | void |
150 | add_remote_forward(Options * options, u_short port, const char *host, | 146 | add_remote_forward(Options *, u_short, const char *, u_short); |
151 | u_short host_port); | ||
152 | 147 | ||
153 | #endif /* READCONF_H */ | 148 | #endif /* READCONF_H */ |
diff --git a/readpass.h b/readpass.h index 37f85002b..da362ab41 100644 --- a/readpass.h +++ b/readpass.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: readpass.h,v 1.4 2001/06/24 05:35:33 markus Exp $ */ | 1 | /* $OpenBSD: readpass.h,v 1.5 2001/06/26 06:32:58 itojun Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -14,4 +14,4 @@ | |||
14 | 14 | ||
15 | #define RP_ECHO 0x0001 | 15 | #define RP_ECHO 0x0001 |
16 | #define RP_ALLOW_STDIN 0x0002 | 16 | #define RP_ALLOW_STDIN 0x0002 |
17 | char *read_passphrase(const char *prompt, int flags); | 17 | char *read_passphrase(const char *, int); |
@@ -11,7 +11,7 @@ | |||
11 | * called by a name other than "ssh" or "Secure Shell". | 11 | * called by a name other than "ssh" or "Secure Shell". |
12 | */ | 12 | */ |
13 | 13 | ||
14 | /* RCSID("$OpenBSD: rsa.h,v 1.11 2001/03/26 23:23:24 markus Exp $"); */ | 14 | /* RCSID("$OpenBSD: rsa.h,v 1.12 2001/06/26 06:32:58 itojun Exp $"); */ |
15 | 15 | ||
16 | #ifndef RSA_H | 16 | #ifndef RSA_H |
17 | #define RSA_H | 17 | #define RSA_H |
@@ -19,9 +19,9 @@ | |||
19 | #include <openssl/bn.h> | 19 | #include <openssl/bn.h> |
20 | #include <openssl/rsa.h> | 20 | #include <openssl/rsa.h> |
21 | 21 | ||
22 | void rsa_public_encrypt __P((BIGNUM * out, BIGNUM * in, RSA * prv)); | 22 | void rsa_public_encrypt __P((BIGNUM *, BIGNUM *, RSA *)); |
23 | int rsa_private_decrypt __P((BIGNUM * out, BIGNUM * in, RSA * prv)); | 23 | int rsa_private_decrypt __P((BIGNUM *, BIGNUM *, RSA *)); |
24 | 24 | ||
25 | void generate_additional_parameters __P((RSA *rsa)); | 25 | void generate_additional_parameters __P((RSA *)); |
26 | 26 | ||
27 | #endif /* RSA_H */ | 27 | #endif /* RSA_H */ |