Lines Matching refs:server2
81 struct ssh *client = NULL, *server = NULL, *server2 = NULL; in do_kex_with_key() local
136 server2 = NULL; in do_kex_with_key()
137 ASSERT_INT_EQ(ssh_init(&server2, 1, NULL), 0); in do_kex_with_key()
138 ASSERT_PTR_NE(server2, NULL); in do_kex_with_key()
139 ASSERT_INT_EQ(ssh_add_hostkey(server2, private), 0); in do_kex_with_key()
140 ASSERT_INT_EQ(ssh_packet_set_state(server2, state), 0); in do_kex_with_key()
143 ASSERT_PTR_NE(server2->kex, NULL); in do_kex_with_key()
146 server2->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server; in do_kex_with_key()
147 server2->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server; in do_kex_with_key()
148 server2->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; in do_kex_with_key()
149 server2->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; in do_kex_with_key()
151 server2->kex->kex[KEX_ECDH_SHA2] = kex_gen_server; in do_kex_with_key()
154 server2->kex->kex[KEX_C25519_SHA256] = kex_gen_server; in do_kex_with_key()
155 server2->kex->load_host_public_key = server->kex->load_host_public_key; in do_kex_with_key()
156 server2->kex->load_host_private_key = server->kex->load_host_private_key; in do_kex_with_key()
157 server2->kex->sign = server->kex->sign; in do_kex_with_key()
161 ASSERT_INT_EQ(kex_send_kexinit(server2), 0); in do_kex_with_key()
162 run_kex(client, server2); in do_kex_with_key()
164 run_kex(client, server2); in do_kex_with_key()
172 ssh_free(server2); in do_kex_with_key()