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

Diff for /src/usr.bin/ssh/sshconnect2.c between version 1.31 and 1.32

version 1.31, 2000/12/15 17:30:14 version 1.32, 2000/12/19 23:17:58
Line 63 
Line 63 
  * SSH2 key exchange   * SSH2 key exchange
  */   */
   
 unsigned char *session_id2 = NULL;  u_char *session_id2 = NULL;
 int session_id2_len = 0;  int session_id2_len = 0;
   
 void  void
Line 151 
Line 151 
         int i;          int i;
 #endif  #endif
         int plen, dlen;          int plen, dlen;
         unsigned int klen, kout;          u_int klen, kout;
         char *signature = NULL;          char *signature = NULL;
         unsigned int slen;          u_int slen;
         char *server_host_key_blob = NULL;          char *server_host_key_blob = NULL;
         Key *server_host_key;          Key *server_host_key;
         unsigned int sbloblen;          u_int sbloblen;
         DH *dh;          DH *dh;
         BIGNUM *dh_server_pub = 0;          BIGNUM *dh_server_pub = 0;
         BIGNUM *shared_secret = 0;          BIGNUM *shared_secret = 0;
         unsigned char *kbuf;          u_char *kbuf;
         unsigned char *hash;          u_char *hash;
   
         debug("Sending SSH2_MSG_KEXDH_INIT.");          debug("Sending SSH2_MSG_KEXDH_INIT.");
         /* generate and send 'e', client DH public key */          /* generate and send 'e', client DH public key */
Line 253 
Line 253 
                 fprintf(stderr, "%02x", (hash[i])&0xff);                  fprintf(stderr, "%02x", (hash[i])&0xff);
         fprintf(stderr, "\n");          fprintf(stderr, "\n");
 #endif  #endif
         if (key_verify(server_host_key, (unsigned char *)signature, slen, hash, 20) != 1)          if (key_verify(server_host_key, (u_char *)signature, slen, hash, 20) != 1)
                 fatal("key_verify failed for server_host_key");                  fatal("key_verify failed for server_host_key");
         key_free(server_host_key);          key_free(server_host_key);
   
Line 295 
Line 295 
         int i;          int i;
 #endif  #endif
         int plen, dlen;          int plen, dlen;
         unsigned int klen, kout;          u_int klen, kout;
         char *signature = NULL;          char *signature = NULL;
         unsigned int slen, nbits;          u_int slen, nbits;
         char *server_host_key_blob = NULL;          char *server_host_key_blob = NULL;
         Key *server_host_key;          Key *server_host_key;
         unsigned int sbloblen;          u_int sbloblen;
         DH *dh;          DH *dh;
         BIGNUM *dh_server_pub = 0;          BIGNUM *dh_server_pub = 0;
         BIGNUM *shared_secret = 0;          BIGNUM *shared_secret = 0;
         BIGNUM *p = 0, *g = 0;          BIGNUM *p = 0, *g = 0;
         unsigned char *kbuf;          u_char *kbuf;
         unsigned char *hash;          u_char *hash;
   
         nbits = dh_estimate(kex->enc[MODE_OUT].cipher->key_len * 8);          nbits = dh_estimate(kex->enc[MODE_OUT].cipher->key_len * 8);
   
Line 426 
Line 426 
                 fprintf(stderr, "%02x", (hash[i])&0xff);                  fprintf(stderr, "%02x", (hash[i])&0xff);
         fprintf(stderr, "\n");          fprintf(stderr, "\n");
 #endif  #endif
         if (key_verify(server_host_key, (unsigned char *)signature, slen, hash, 20) != 1)          if (key_verify(server_host_key, (u_char *)signature, slen, hash, 20) != 1)
                 fatal("key_verify failed for server_host_key");                  fatal("key_verify failed for server_host_key");
         key_free(server_host_key);          key_free(server_host_key);
   
Line 448 
Line 448 
   
 typedef int sign_cb_fn(  typedef int sign_cb_fn(
     Authctxt *authctxt, Key *key,      Authctxt *authctxt, Key *key,
     unsigned char **sigp, int *lenp, unsigned char *data, int datalen);      u_char **sigp, int *lenp, u_char *data, int datalen);
   
 struct Authctxt {  struct Authctxt {
         const char *server_user;          const char *server_user;
Line 644 
Line 644 
 sign_and_send_pubkey(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback)  sign_and_send_pubkey(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback)
 {  {
         Buffer b;          Buffer b;
         unsigned char *blob, *signature;          u_char *blob, *signature;
         int bloblen, slen;          int bloblen, slen;
         int skip = 0;          int skip = 0;
         int ret = -1;          int ret = -1;
Line 725 
Line 725 
 }  }
   
 /* sign callback */  /* sign callback */
 int key_sign_cb(Authctxt *authctxt, Key *key, unsigned char **sigp, int *lenp,  int key_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp,
     unsigned char *data, int datalen)      u_char *data, int datalen)
 {  {
         return key_sign(key, sigp, lenp, data, datalen);          return key_sign(key, sigp, lenp, data, datalen);
 }  }
Line 777 
Line 777 
 }  }
   
 /* sign callback */  /* sign callback */
 int agent_sign_cb(Authctxt *authctxt, Key *key, unsigned char **sigp, int *lenp,  int agent_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp,
     unsigned char *data, int datalen)      u_char *data, int datalen)
 {  {
         return ssh_agent_sign(authctxt->agent, key, sigp, lenp, data, datalen);          return ssh_agent_sign(authctxt->agent, key, sigp, lenp, data, datalen);
 }  }
Line 869 
Line 869 
         char *lang = NULL;          char *lang = NULL;
         char *prompt = NULL;          char *prompt = NULL;
         char *response = NULL;          char *response = NULL;
         unsigned int num_prompts, i;          u_int num_prompts, i;
         int echo = 0;          int echo = 0;
   
         debug2("input_userauth_info_req");          debug2("input_userauth_info_req");

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32