[BACK]Return to ssh-agent.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/ssh-agent.c between version 1.44 and 1.45

version 1.44, 2000/12/19 22:43:45 version 1.45, 2000/12/19 23:17:58
Line 66 
Line 66 
         Buffer output;          Buffer output;
 } SocketEntry;  } SocketEntry;
   
 unsigned int sockets_alloc = 0;  u_int sockets_alloc = 0;
 SocketEntry *sockets = NULL;  SocketEntry *sockets = NULL;
   
 typedef struct {  typedef struct {
Line 147 
Line 147 
                         buffer_put_bignum(&msg, id->key->rsa->e);                          buffer_put_bignum(&msg, id->key->rsa->e);
                         buffer_put_bignum(&msg, id->key->rsa->n);                          buffer_put_bignum(&msg, id->key->rsa->n);
                 } else {                  } else {
                         unsigned char *blob;                          u_char *blob;
                         unsigned int blen;                          u_int blen;
                         key_to_blob(id->key, &blob, &blen);                          key_to_blob(id->key, &blob, &blen);
                         buffer_put_string(&msg, blob, blen);                          buffer_put_string(&msg, blob, blen);
                         xfree(blob);                          xfree(blob);
Line 169 
Line 169 
         int i, len;          int i, len;
         Buffer msg;          Buffer msg;
         MD5_CTX md;          MD5_CTX md;
         unsigned char buf[32], mdbuf[16], session_id[16];          u_char buf[32], mdbuf[16], session_id[16];
         unsigned int response_type;          u_int response_type;
   
         buffer_init(&msg);          buffer_init(&msg);
         key = key_new(KEY_RSA1);          key = key_new(KEY_RSA1);
Line 231 
Line 231 
 {  {
         extern int datafellows;          extern int datafellows;
         Key *key, *private;          Key *key, *private;
         unsigned char *blob, *data, *signature = NULL;          u_char *blob, *data, *signature = NULL;
         unsigned int blen, dlen, slen = 0;          u_int blen, dlen, slen = 0;
         int flags;          int flags;
         Buffer msg;          Buffer msg;
         int ok = -1;          int ok = -1;
Line 275 
Line 275 
 process_remove_identity(SocketEntry *e, int version)  process_remove_identity(SocketEntry *e, int version)
 {  {
         Key *key = NULL, *private;          Key *key = NULL, *private;
         unsigned char *blob;          u_char *blob;
         unsigned int blen;          u_int blen;
         unsigned int bits;          u_int bits;
         int success = 0;          int success = 0;
   
         switch(version){          switch(version){
Line 335 
Line 335 
 void  void
 process_remove_all_identities(SocketEntry *e, int version)  process_remove_all_identities(SocketEntry *e, int version)
 {  {
         unsigned int i;          u_int i;
         Idtab *tab = idtab_lookup(version);          Idtab *tab = idtab_lookup(version);
   
         /* Loop over all identities and clear the keys. */          /* Loop over all identities and clear the keys. */
Line 459 
Line 459 
 void  void
 process_message(SocketEntry *e)  process_message(SocketEntry *e)
 {  {
         unsigned int msg_len;          u_int msg_len;
         unsigned int type;          u_int type;
         unsigned char *cp;          u_char *cp;
         if (buffer_len(&e->input) < 5)          if (buffer_len(&e->input) < 5)
                 return;         /* Incomplete message. */                  return;         /* Incomplete message. */
         cp = (unsigned char *) buffer_ptr(&e->input);          cp = (u_char *) buffer_ptr(&e->input);
         msg_len = GET_32BIT(cp);          msg_len = GET_32BIT(cp);
         if (msg_len > 256 * 1024) {          if (msg_len > 256 * 1024) {
                 shutdown(e->fd, SHUT_RDWR);                  shutdown(e->fd, SHUT_RDWR);
Line 523 
Line 523 
 void  void
 new_socket(int type, int fd)  new_socket(int type, int fd)
 {  {
         unsigned int i, old_alloc;          u_int i, old_alloc;
         if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0)          if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0)
                 error("fcntl O_NONBLOCK: %s", strerror(errno));                  error("fcntl O_NONBLOCK: %s", strerror(errno));
   
Line 555 
Line 555 
 void  void
 prepare_select(fd_set *readset, fd_set *writeset)  prepare_select(fd_set *readset, fd_set *writeset)
 {  {
         unsigned int i;          u_int i;
         for (i = 0; i < sockets_alloc; i++)          for (i = 0; i < sockets_alloc; i++)
                 switch (sockets[i].type) {                  switch (sockets[i].type) {
                 case AUTH_SOCKET:                  case AUTH_SOCKET:
Line 575 
Line 575 
 void  void
 after_select(fd_set *readset, fd_set *writeset)  after_select(fd_set *readset, fd_set *writeset)
 {  {
         unsigned int i;          u_int i;
         int len, sock;          int len, sock;
         socklen_t slen;          socklen_t slen;
         char buf[1024];          char buf[1024];

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45