Lines Matching refs:server2
83 struct ssh *client = NULL, *server = NULL, *server2 = NULL; in do_kex_with_key() local
138 server2 = NULL; in do_kex_with_key()
139 ASSERT_INT_EQ(ssh_init(&server2, 1, NULL), 0); in do_kex_with_key()
140 ASSERT_PTR_NE(server2, NULL); in do_kex_with_key()
141 ASSERT_INT_EQ(ssh_add_hostkey(server2, private), 0); in do_kex_with_key()
142 kex_free(server2->kex); /* XXX or should ssh_packet_set_state()? */ in do_kex_with_key()
143 ASSERT_INT_EQ(ssh_packet_set_state(server2, state), 0); in do_kex_with_key()
146 ASSERT_PTR_NE(server2->kex, NULL); in do_kex_with_key()
148 server2->kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; in do_kex_with_key()
149 server2->kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; in do_kex_with_key()
150 server2->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; in do_kex_with_key()
151 server2->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; in do_kex_with_key()
153 server2->kex->kex[KEX_ECDH_SHA2] = kexecdh_server; in do_kex_with_key()
155 server2->kex->kex[KEX_C25519_SHA256] = kexc25519_server; in do_kex_with_key()
156 server2->kex->load_host_public_key = server->kex->load_host_public_key; in do_kex_with_key()
157 server2->kex->load_host_private_key = server->kex->load_host_private_key; in do_kex_with_key()
158 server2->kex->sign = server->kex->sign; in do_kex_with_key()
162 ASSERT_INT_EQ(kex_send_kexinit(server2), 0); in do_kex_with_key()
163 run_kex(client, server2); in do_kex_with_key()
165 run_kex(client, server2); in do_kex_with_key()
173 ssh_free(server2); in do_kex_with_key()