comparison cli-kex.c @ 775:2f1c199b6e4b

requirenext fixup for firstkexfollows
author Matt Johnston <matt@ucc.asn.au>
date Sun, 14 Apr 2013 23:16:16 +0800
parents a9f2a6ae4eb5
children 7dcb46da72d9
comparison
equal deleted inserted replaced
774:e8b2ca448928 775:2f1c199b6e4b
59 59
60 CHECKCLEARTOWRITE(); 60 CHECKCLEARTOWRITE();
61 buf_putbyte(ses.writepayload, SSH_MSG_KEXDH_INIT); 61 buf_putbyte(ses.writepayload, SSH_MSG_KEXDH_INIT);
62 buf_putmpint(ses.writepayload, cli_ses.dh_e); 62 buf_putmpint(ses.writepayload, cli_ses.dh_e);
63 encrypt_packet(); 63 encrypt_packet();
64 // XXX fixme 64 ses.requirenext[0] = SSH_MSG_KEXDH_REPLY;
65 //ses.requirenext = SSH_MSG_KEXDH_REPLY; 65 ses.requirenext[1] = SSH_MSG_KEXINIT;
66 } 66 }
67 67
68 /* Handle a diffie-hellman key exchange reply. */ 68 /* Handle a diffie-hellman key exchange reply. */
69 void recv_msg_kexdh_reply() { 69 void recv_msg_kexdh_reply() {
70 70
116 116
117 sign_key_free(hostkey); 117 sign_key_free(hostkey);
118 hostkey = NULL; 118 hostkey = NULL;
119 119
120 send_msg_newkeys(); 120 send_msg_newkeys();
121 ses.requirenext = SSH_MSG_NEWKEYS; 121 ses.requirenext[0] = SSH_MSG_NEWKEYS;
122 ses.requirenext[1] = 0;
122 TRACE(("leave recv_msg_kexdh_init")) 123 TRACE(("leave recv_msg_kexdh_init"))
123 } 124 }
124 125
125 static void ask_to_confirm(unsigned char* keyblob, unsigned int keybloblen) { 126 static void ask_to_confirm(unsigned char* keyblob, unsigned int keybloblen) {
126 127