• Home
  • Raw
  • Download

Lines Matching refs:kex

57 	struct kex *kex = ssh->kex;  in kexdh_server()  local
61 switch (kex->kex_type) { in kexdh_server()
63 kex->dh = dh_new_group1(); in kexdh_server()
67 kex->dh = dh_new_group14(); in kexdh_server()
70 kex->dh = dh_new_group16(); in kexdh_server()
73 kex->dh = dh_new_group18(); in kexdh_server()
79 if (kex->dh == NULL) { in kexdh_server()
83 if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0) in kexdh_server()
97 struct kex *kex = ssh->kex; in input_kex_dh_init() local
106 if (kex->load_host_public_key == NULL || in input_kex_dh_init()
107 kex->load_host_private_key == NULL) { in input_kex_dh_init()
111 server_host_public = kex->load_host_public_key(kex->hostkey_type, in input_kex_dh_init()
112 kex->hostkey_nid, ssh); in input_kex_dh_init()
113 server_host_private = kex->load_host_private_key(kex->hostkey_type, in input_kex_dh_init()
114 kex->hostkey_nid, ssh); in input_kex_dh_init()
137 DHparams_print_fp(stderr, kex->dh); in input_kex_dh_init()
139 BN_print_fp(stderr, kex->dh->pub_key); in input_kex_dh_init()
142 if (!dh_pub_is_valid(kex->dh, dh_client_pub)) { in input_kex_dh_init()
148 klen = DH_size(kex->dh); in input_kex_dh_init()
154 if ((kout = DH_compute_key(kbuf, dh_client_pub, kex->dh)) < 0 || in input_kex_dh_init()
168 kex->hash_alg, in input_kex_dh_init()
169 kex->client_version_string, in input_kex_dh_init()
170 kex->server_version_string, in input_kex_dh_init()
171 sshbuf_ptr(kex->peer), sshbuf_len(kex->peer), in input_kex_dh_init()
172 sshbuf_ptr(kex->my), sshbuf_len(kex->my), in input_kex_dh_init()
175 kex->dh->pub_key, in input_kex_dh_init()
181 if (kex->session_id == NULL) { in input_kex_dh_init()
182 kex->session_id_len = hashlen; in input_kex_dh_init()
183 kex->session_id = malloc(kex->session_id_len); in input_kex_dh_init()
184 if (kex->session_id == NULL) { in input_kex_dh_init()
188 memcpy(kex->session_id, hash, kex->session_id_len); in input_kex_dh_init()
192 if ((r = kex->sign(server_host_private, server_host_public, &signature, in input_kex_dh_init()
193 &slen, hash, hashlen, kex->hostkey_alg, ssh->compat)) < 0) in input_kex_dh_init()
201 (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || /* f */ in input_kex_dh_init()
210 DH_free(kex->dh); in input_kex_dh_init()
211 kex->dh = NULL; in input_kex_dh_init()