diff options
Diffstat (limited to 'ssh-agent.c')
-rw-r--r-- | ssh-agent.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/ssh-agent.c b/ssh-agent.c index 00e813218..9c0a583e8 100644 --- a/ssh-agent.c +++ b/ssh-agent.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-agent.c,v 1.44 2000/12/19 22:43:45 markus Exp $ */ | 1 | /* $OpenBSD: ssh-agent.c,v 1.45 2000/12/19 23:17:58 markus Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include "includes.h" | 39 | #include "includes.h" |
40 | RCSID("$OpenBSD: ssh-agent.c,v 1.44 2000/12/19 22:43:45 markus Exp $"); | 40 | RCSID("$OpenBSD: ssh-agent.c,v 1.45 2000/12/19 23:17:58 markus Exp $"); |
41 | 41 | ||
42 | #include "ssh.h" | 42 | #include "ssh.h" |
43 | #include "rsa.h" | 43 | #include "rsa.h" |
@@ -66,7 +66,7 @@ typedef struct { | |||
66 | Buffer output; | 66 | Buffer output; |
67 | } SocketEntry; | 67 | } SocketEntry; |
68 | 68 | ||
69 | unsigned int sockets_alloc = 0; | 69 | u_int sockets_alloc = 0; |
70 | SocketEntry *sockets = NULL; | 70 | SocketEntry *sockets = NULL; |
71 | 71 | ||
72 | typedef struct { | 72 | typedef struct { |
@@ -151,8 +151,8 @@ process_request_identities(SocketEntry *e, int version) | |||
151 | buffer_put_bignum(&msg, id->key->rsa->e); | 151 | buffer_put_bignum(&msg, id->key->rsa->e); |
152 | buffer_put_bignum(&msg, id->key->rsa->n); | 152 | buffer_put_bignum(&msg, id->key->rsa->n); |
153 | } else { | 153 | } else { |
154 | unsigned char *blob; | 154 | u_char *blob; |
155 | unsigned int blen; | 155 | u_int blen; |
156 | key_to_blob(id->key, &blob, &blen); | 156 | key_to_blob(id->key, &blob, &blen); |
157 | buffer_put_string(&msg, blob, blen); | 157 | buffer_put_string(&msg, blob, blen); |
158 | xfree(blob); | 158 | xfree(blob); |
@@ -173,8 +173,8 @@ process_authentication_challenge1(SocketEntry *e) | |||
173 | int i, len; | 173 | int i, len; |
174 | Buffer msg; | 174 | Buffer msg; |
175 | MD5_CTX md; | 175 | MD5_CTX md; |
176 | unsigned char buf[32], mdbuf[16], session_id[16]; | 176 | u_char buf[32], mdbuf[16], session_id[16]; |
177 | unsigned int response_type; | 177 | u_int response_type; |
178 | 178 | ||
179 | buffer_init(&msg); | 179 | buffer_init(&msg); |
180 | key = key_new(KEY_RSA1); | 180 | key = key_new(KEY_RSA1); |
@@ -235,8 +235,8 @@ process_sign_request2(SocketEntry *e) | |||
235 | { | 235 | { |
236 | extern int datafellows; | 236 | extern int datafellows; |
237 | Key *key, *private; | 237 | Key *key, *private; |
238 | unsigned char *blob, *data, *signature = NULL; | 238 | u_char *blob, *data, *signature = NULL; |
239 | unsigned int blen, dlen, slen = 0; | 239 | u_int blen, dlen, slen = 0; |
240 | int flags; | 240 | int flags; |
241 | Buffer msg; | 241 | Buffer msg; |
242 | int ok = -1; | 242 | int ok = -1; |
@@ -279,9 +279,9 @@ void | |||
279 | process_remove_identity(SocketEntry *e, int version) | 279 | process_remove_identity(SocketEntry *e, int version) |
280 | { | 280 | { |
281 | Key *key = NULL, *private; | 281 | Key *key = NULL, *private; |
282 | unsigned char *blob; | 282 | u_char *blob; |
283 | unsigned int blen; | 283 | u_int blen; |
284 | unsigned int bits; | 284 | u_int bits; |
285 | int success = 0; | 285 | int success = 0; |
286 | 286 | ||
287 | switch(version){ | 287 | switch(version){ |
@@ -339,7 +339,7 @@ process_remove_identity(SocketEntry *e, int version) | |||
339 | void | 339 | void |
340 | process_remove_all_identities(SocketEntry *e, int version) | 340 | process_remove_all_identities(SocketEntry *e, int version) |
341 | { | 341 | { |
342 | unsigned int i; | 342 | u_int i; |
343 | Idtab *tab = idtab_lookup(version); | 343 | Idtab *tab = idtab_lookup(version); |
344 | 344 | ||
345 | /* Loop over all identities and clear the keys. */ | 345 | /* Loop over all identities and clear the keys. */ |
@@ -463,12 +463,12 @@ send: | |||
463 | void | 463 | void |
464 | process_message(SocketEntry *e) | 464 | process_message(SocketEntry *e) |
465 | { | 465 | { |
466 | unsigned int msg_len; | 466 | u_int msg_len; |
467 | unsigned int type; | 467 | u_int type; |
468 | unsigned char *cp; | 468 | u_char *cp; |
469 | if (buffer_len(&e->input) < 5) | 469 | if (buffer_len(&e->input) < 5) |
470 | return; /* Incomplete message. */ | 470 | return; /* Incomplete message. */ |
471 | cp = (unsigned char *) buffer_ptr(&e->input); | 471 | cp = (u_char *) buffer_ptr(&e->input); |
472 | msg_len = GET_32BIT(cp); | 472 | msg_len = GET_32BIT(cp); |
473 | if (msg_len > 256 * 1024) { | 473 | if (msg_len > 256 * 1024) { |
474 | shutdown(e->fd, SHUT_RDWR); | 474 | shutdown(e->fd, SHUT_RDWR); |
@@ -527,7 +527,7 @@ process_message(SocketEntry *e) | |||
527 | void | 527 | void |
528 | new_socket(int type, int fd) | 528 | new_socket(int type, int fd) |
529 | { | 529 | { |
530 | unsigned int i, old_alloc; | 530 | u_int i, old_alloc; |
531 | if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) | 531 | if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) |
532 | error("fcntl O_NONBLOCK: %s", strerror(errno)); | 532 | error("fcntl O_NONBLOCK: %s", strerror(errno)); |
533 | 533 | ||
@@ -559,7 +559,7 @@ new_socket(int type, int fd) | |||
559 | void | 559 | void |
560 | prepare_select(fd_set *readset, fd_set *writeset) | 560 | prepare_select(fd_set *readset, fd_set *writeset) |
561 | { | 561 | { |
562 | unsigned int i; | 562 | u_int i; |
563 | for (i = 0; i < sockets_alloc; i++) | 563 | for (i = 0; i < sockets_alloc; i++) |
564 | switch (sockets[i].type) { | 564 | switch (sockets[i].type) { |
565 | case AUTH_SOCKET: | 565 | case AUTH_SOCKET: |
@@ -579,7 +579,7 @@ prepare_select(fd_set *readset, fd_set *writeset) | |||
579 | void | 579 | void |
580 | after_select(fd_set *readset, fd_set *writeset) | 580 | after_select(fd_set *readset, fd_set *writeset) |
581 | { | 581 | { |
582 | unsigned int i; | 582 | u_int i; |
583 | int len, sock; | 583 | int len, sock; |
584 | socklen_t slen; | 584 | socklen_t slen; |
585 | char buf[1024]; | 585 | char buf[1024]; |