Lines Matching refs:kex

62 	struct kex *kex = ssh->kex;  in kexgex_client()  local
66 nbits = dh_estimate(kex->dh_need * 8); in kexgex_client()
68 kex->min = DH_GRP_MIN; in kexgex_client()
69 kex->max = DH_GRP_MAX; in kexgex_client()
70 kex->nbits = nbits; in kexgex_client()
72 kex->nbits = MINIMUM(kex->nbits, 4096); in kexgex_client()
75 (r = sshpkt_put_u32(ssh, kex->min)) != 0 || in kexgex_client()
76 (r = sshpkt_put_u32(ssh, kex->nbits)) != 0 || in kexgex_client()
77 (r = sshpkt_put_u32(ssh, kex->max)) != 0 || in kexgex_client()
81 kex->min, kex->nbits, kex->max); in kexgex_client()
84 kex->min, kex->nbits, kex->max); in kexgex_client()
96 struct kex *kex = ssh->kex; in input_kex_dh_gex_group() local
108 (u_int)bits < kex->min || (u_int)bits > kex->max) { in input_kex_dh_gex_group()
112 if ((kex->dh = dh_new_group(g, p)) == NULL) { in input_kex_dh_gex_group()
119 if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0) in input_kex_dh_gex_group()
121 DH_get0_key(kex->dh, &pub_key, NULL); in input_kex_dh_gex_group()
128 DHparams_print_fp(stderr, kex->dh); in input_kex_dh_gex_group()
145 struct kex *kex = ssh->kex; in input_kex_dh_gex_reply() local
177 if ((r = kex_dh_compute_key(kex, dh_server_pub, shared_secret)) != 0) in input_kex_dh_gex_reply()
180 kex->min = kex->max = -1; in input_kex_dh_gex_reply()
183 DH_get0_key(kex->dh, &pub_key, NULL); in input_kex_dh_gex_reply()
184 DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g); in input_kex_dh_gex_reply()
187 kex->hash_alg, in input_kex_dh_gex_reply()
188 kex->client_version, in input_kex_dh_gex_reply()
189 kex->server_version, in input_kex_dh_gex_reply()
190 kex->my, in input_kex_dh_gex_reply()
191 kex->peer, in input_kex_dh_gex_reply()
193 kex->min, kex->nbits, kex->max, in input_kex_dh_gex_reply()
202 hashlen, kex->hostkey_alg, ssh->compat, NULL)) != 0) in input_kex_dh_gex_reply()
209 DH_free(kex->dh); in input_kex_dh_gex_reply()
210 kex->dh = NULL; in input_kex_dh_gex_reply()