comparison common-kex.c @ 1121:bb3a03feb31f

Merge pull request #13 from gazoo74/fix-warnings Fix warnings
author Matt Johnston <matt@ucc.asn.au>
date Thu, 04 Jun 2015 22:25:28 +0800
parents 2ebf450edc2d
children aaf576b27a10 d7b752525b91
comparison
equal deleted inserted replaced
1087:1e486f368ec3 1121:bb3a03feb31f
126 126
127 /* compression_algorithms_server_to_client */ 127 /* compression_algorithms_server_to_client */
128 buf_put_algolist(ses.writepayload, ses.compress_algos); 128 buf_put_algolist(ses.writepayload, ses.compress_algos);
129 129
130 /* languages_client_to_server */ 130 /* languages_client_to_server */
131 buf_putstring(ses.writepayload, "", 0); 131 buf_putstring(ses.writepayload, (const unsigned char *) "", 0);
132 132
133 /* languages_server_to_client */ 133 /* languages_server_to_client */
134 buf_putstring(ses.writepayload, "", 0); 134 buf_putstring(ses.writepayload, (const unsigned char *) "", 0);
135 135
136 /* first_kex_packet_follows */ 136 /* first_kex_packet_follows */
137 buf_putbyte(ses.writepayload, (ses.send_kex_first_guess != NULL)); 137 buf_putbyte(ses.writepayload, (ses.send_kex_first_guess != NULL));
138 138
139 /* reserved unit32 */ 139 /* reserved unit32 */
509 TRACE(("continue recv_msg_kexinit: sent kexinit")) 509 TRACE(("continue recv_msg_kexinit: sent kexinit"))
510 } 510 }
511 511
512 /* start the kex hash */ 512 /* start the kex hash */
513 local_ident_len = strlen(LOCAL_IDENT); 513 local_ident_len = strlen(LOCAL_IDENT);
514 remote_ident_len = strlen((char*)ses.remoteident); 514 remote_ident_len = strlen(ses.remoteident);
515 515
516 kexhashbuf_len = local_ident_len + remote_ident_len 516 kexhashbuf_len = local_ident_len + remote_ident_len
517 + ses.transkexinit->len + ses.payload->len 517 + ses.transkexinit->len + ses.payload->len
518 + KEXHASHBUF_MAX_INTS; 518 + KEXHASHBUF_MAX_INTS;
519 519
526 526
527 /* V_C, the client's version string (CR and NL excluded) */ 527 /* V_C, the client's version string (CR and NL excluded) */
528 buf_putstring(ses.kexhashbuf, 528 buf_putstring(ses.kexhashbuf,
529 (unsigned char*)LOCAL_IDENT, local_ident_len); 529 (unsigned char*)LOCAL_IDENT, local_ident_len);
530 /* V_S, the server's version string (CR and NL excluded) */ 530 /* V_S, the server's version string (CR and NL excluded) */
531 buf_putstring(ses.kexhashbuf, ses.remoteident, remote_ident_len); 531 buf_putstring(ses.kexhashbuf, (unsigned char*)ses.remoteident, remote_ident_len);
532 532
533 /* I_C, the payload of the client's SSH_MSG_KEXINIT */ 533 /* I_C, the payload of the client's SSH_MSG_KEXINIT */
534 buf_putstring(ses.kexhashbuf, 534 buf_putstring(ses.kexhashbuf,
535 ses.transkexinit->data, ses.transkexinit->len); 535 ses.transkexinit->data, ses.transkexinit->len);
536 /* I_S, the payload of the server's SSH_MSG_KEXINIT */ 536 /* I_S, the payload of the server's SSH_MSG_KEXINIT */
543 /* SERVER */ 543 /* SERVER */
544 544
545 /* read the peer's choice of algos */ 545 /* read the peer's choice of algos */
546 read_kex_algos(); 546 read_kex_algos();
547 /* V_C, the client's version string (CR and NL excluded) */ 547 /* V_C, the client's version string (CR and NL excluded) */
548 buf_putstring(ses.kexhashbuf, ses.remoteident, remote_ident_len); 548 buf_putstring(ses.kexhashbuf, (unsigned char*)ses.remoteident, remote_ident_len);
549 /* V_S, the server's version string (CR and NL excluded) */ 549 /* V_S, the server's version string (CR and NL excluded) */
550 buf_putstring(ses.kexhashbuf, 550 buf_putstring(ses.kexhashbuf,
551 (unsigned char*)LOCAL_IDENT, local_ident_len); 551 (unsigned char*)LOCAL_IDENT, local_ident_len);
552 552
553 /* I_C, the payload of the client's SSH_MSG_KEXINIT */ 553 /* I_C, the payload of the client's SSH_MSG_KEXINIT */