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

Diff for /src/usr.bin/ssh/packet.c between version 1.210 and 1.211

version 1.210, 2015/03/24 20:10:08 version 1.211, 2015/04/27 01:52:30
Line 778 
Line 778 
  * encrypted independently of each other.   * encrypted independently of each other.
  */   */
   
 #ifdef WITH_OPENSSL  
 void  void
 ssh_packet_set_encryption_key(struct ssh *ssh, const u_char *key, u_int keylen, int number)  ssh_packet_set_encryption_key(struct ssh *ssh, const u_char *key, u_int keylen, int number)
 {  {
   #ifndef WITH_SSH1
           fatal("no SSH protocol 1 support");
   #else /* WITH_SSH1 */
         struct session_state *state = ssh->state;          struct session_state *state = ssh->state;
         const struct sshcipher *cipher = cipher_by_number(number);          const struct sshcipher *cipher = cipher_by_number(number);
         int r;          int r;
Line 806 
Line 808 
                 error("Warning: %s", wmsg);                  error("Warning: %s", wmsg);
                 state->cipher_warning_done = 1;                  state->cipher_warning_done = 1;
         }          }
   #endif /* WITH_SSH1 */
 }  }
 #endif  
   
 /*  /*
  * Finalizes and sends the packet.  If the encryption key has been set,   * Finalizes and sends the packet.  If the encryption key has been set,
Line 2713 
Line 2715 
         return sshbuf_put_stringb(ssh->state->outgoing_packet, v);          return sshbuf_put_stringb(ssh->state->outgoing_packet, v);
 }  }
   
   #ifdef WITH_OPENSSL
 int  int
 sshpkt_put_ec(struct ssh *ssh, const EC_POINT *v, const EC_GROUP *g)  sshpkt_put_ec(struct ssh *ssh, const EC_POINT *v, const EC_GROUP *g)
 {  {
         return sshbuf_put_ec(ssh->state->outgoing_packet, v, g);          return sshbuf_put_ec(ssh->state->outgoing_packet, v, g);
 }  }
   
   #ifdef WITH_SSH1
 int  int
 sshpkt_put_bignum1(struct ssh *ssh, const BIGNUM *v)  sshpkt_put_bignum1(struct ssh *ssh, const BIGNUM *v)
 {  {
         return sshbuf_put_bignum1(ssh->state->outgoing_packet, v);          return sshbuf_put_bignum1(ssh->state->outgoing_packet, v);
 }  }
   #endif /* WITH_SSH1 */
   
 int  int
 sshpkt_put_bignum2(struct ssh *ssh, const BIGNUM *v)  sshpkt_put_bignum2(struct ssh *ssh, const BIGNUM *v)
 {  {
         return sshbuf_put_bignum2(ssh->state->outgoing_packet, v);          return sshbuf_put_bignum2(ssh->state->outgoing_packet, v);
 }  }
   #endif /* WITH_OPENSSL */
   
 /* fetch data from the incoming packet */  /* fetch data from the incoming packet */
   
Line 2775 
Line 2781 
         return sshbuf_get_cstring(ssh->state->incoming_packet, valp, lenp);          return sshbuf_get_cstring(ssh->state->incoming_packet, valp, lenp);
 }  }
   
   #ifdef WITH_OPENSSL
 int  int
 sshpkt_get_ec(struct ssh *ssh, EC_POINT *v, const EC_GROUP *g)  sshpkt_get_ec(struct ssh *ssh, EC_POINT *v, const EC_GROUP *g)
 {  {
         return sshbuf_get_ec(ssh->state->incoming_packet, v, g);          return sshbuf_get_ec(ssh->state->incoming_packet, v, g);
 }  }
   
   #ifdef WITH_SSH1
 int  int
 sshpkt_get_bignum1(struct ssh *ssh, BIGNUM *v)  sshpkt_get_bignum1(struct ssh *ssh, BIGNUM *v)
 {  {
         return sshbuf_get_bignum1(ssh->state->incoming_packet, v);          return sshbuf_get_bignum1(ssh->state->incoming_packet, v);
 }  }
   #endif /* WITH_SSH1 */
   
 int  int
 sshpkt_get_bignum2(struct ssh *ssh, BIGNUM *v)  sshpkt_get_bignum2(struct ssh *ssh, BIGNUM *v)
 {  {
         return sshbuf_get_bignum2(ssh->state->incoming_packet, v);          return sshbuf_get_bignum2(ssh->state->incoming_packet, v);
 }  }
   #endif /* WITH_OPENSSL */
   
 int  int
 sshpkt_get_end(struct ssh *ssh)  sshpkt_get_end(struct ssh *ssh)

Legend:
Removed from v.1.210  
changed lines
  Added in v.1.211