myproposal[PROPOSAL_ENC_ALGS_STOC] = compat_cipher_proposal(myproposal[PROPOSAL_ENC_ALGS_STOC]);
ssh_kex2(char *host, struct sockaddr *hostaddr){	int i, plen;	Kex *kex;	Buffer *client_kexinit, *server_kexinit;	char *sprop[PROPOSAL_MAX];	if (options.ciphers == (char *)-1) {		log("No valid ciphers for protocol version 2 given, using defaults.");		options.ciphers = NULL;	}	if (options.ciphers != NULL) {		myproposal[PROPOSAL_ENC_ALGS_CTOS] =		myproposal[PROPOSAL_ENC_ALGS_STOC] = options.ciphers;	}	if (options.compression) {		myproposal[PROPOSAL_COMP_ALGS_CTOS] =		myproposal[PROPOSAL_COMP_ALGS_STOC] = "zlib";	} else {		myproposal[PROPOSAL_COMP_ALGS_CTOS] =		myproposal[PROPOSAL_COMP_ALGS_STOC] = "none";	}	if (options.macs != NULL) {		myproposal[PROPOSAL_MAC_ALGS_CTOS] =		myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs;	}	myproposal[PROPOSAL_ENC_ALGS_STOC] =	    compat_cipher_proposal(myproposal[PROPOSAL_ENC_ALGS_STOC]);	/* buffers with raw kexinit messages */	server_kexinit = xmalloc(sizeof(*server_kexinit));	buffer_init(server_kexinit);	client_kexinit = kex_init(myproposal);	/* algorithm negotiation */	kex_exchange_kexinit(client_kexinit, server_kexinit, sprop);	kex = kex_choose_conf(myproposal, sprop, 0);	for (i = 0; i < PROPOSAL_MAX; i++)		xfree(sprop[i]);	/* server authentication and session key agreement */	switch(kex->kex_type) {	case DH_GRP1_SHA1:		ssh_dh1_client(kex, host, hostaddr,			       client_kexinit, server_kexinit);		break;	case DH_GEX_SHA1:		ssh_dhgex_client(kex, host, hostaddr, client_kexinit,				 server_kexinit);		break;	default:		fatal("Unsupported key exchange %d", kex->kex_type);	}	buffer_free(client_kexinit);	buffer_free(server_kexinit);	xfree(client_kexinit);	xfree(server_kexinit);	debug("Wait SSH2_MSG_NEWKEYS.");	packet_read_expect(&plen, SSH2_MSG_NEWKEYS);	packet_done();	debug("GOT SSH2_MSG_NEWKEYS.");	debug("send SSH2_MSG_NEWKEYS.");	packet_start(SSH2_MSG_NEWKEYS);	packet_send();	packet_write_wait();	debug("done: send SSH2_MSG_NEWKEYS.");#ifdef DEBUG_KEXDH	/* send 1st encrypted/maced/compressed message */	packet_start(SSH2_MSG_IGNORE);	packet_put_cstring("markus");	packet_send();	packet_write_wait();#endif	debug("done: KEX2.");}