comparison common-kex.c @ 179:161557a9dde8

* fix longstanding bug with connections being closed on failure to connect to auth socket (server) * differentiate between get_byte and get_bool * get rid of some // comments * general tidying
author Matt Johnston <matt@ucc.asn.au>
date Sun, 13 Mar 2005 13:58:14 +0000
parents 0cfba3034be5
children c9483550701b
comparison
equal deleted inserted replaced
178:058cc7892636 179:161557a9dde8
455 buf_free(ses.transkexinit); 455 buf_free(ses.transkexinit);
456 ses.transkexinit = NULL; 456 ses.transkexinit = NULL;
457 /* the rest of ses.kexhashbuf will be done after DH exchange */ 457 /* the rest of ses.kexhashbuf will be done after DH exchange */
458 458
459 ses.kexstate.recvkexinit = 1; 459 ses.kexstate.recvkexinit = 1;
460 // ses.expecting = 0; // client matt
461 460
462 TRACE(("leave recv_msg_kexinit")) 461 TRACE(("leave recv_msg_kexinit"))
463 } 462 }
464 463
465 /* Initialises and generate one side of the diffie-hellman key exchange values. 464 /* Initialises and generate one side of the diffie-hellman key exchange values.
681 680
682 /* languages_server_to_client */ 681 /* languages_server_to_client */
683 buf_eatstring(ses.payload); 682 buf_eatstring(ses.payload);
684 683
685 /* first_kex_packet_follows */ 684 /* first_kex_packet_follows */
686 if (buf_getbyte(ses.payload)) { 685 if (buf_getbool(ses.payload)) {
687 ses.kexstate.firstfollows = 1; 686 ses.kexstate.firstfollows = 1;
688 /* if the guess wasn't good, we ignore the packet sent */ 687 /* if the guess wasn't good, we ignore the packet sent */
689 if (!allgood) { 688 if (!allgood) {
690 ses.ignorenext = 1; 689 ses.ignorenext = 1;
691 } 690 }