comparison common-kex.c @ 1108:2ebf450edc2d

Turn sshsession's remoteident attribute into char *
author Gaël PORTAY <gael.portay@gmail.com>
date Sat, 02 May 2015 22:48:11 +0200
parents c45d65392c1a
children aaf576b27a10 d7b752525b91
comparison
equal deleted inserted replaced
1107:4f3335bba3d9 1108:2ebf450edc2d
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 */