Lines Matching refs:kex
52 struct kex *kex = ssh->kex; in kexc25519_client() local
55 kexc25519_keygen(kex->c25519_client_key, kex->c25519_client_pubkey); in kexc25519_client()
57 dump_digest("client private key:", kex->c25519_client_key, in kexc25519_client()
58 sizeof(kex->c25519_client_key)); in kexc25519_client()
61 (r = sshpkt_put_string(ssh, kex->c25519_client_pubkey, in kexc25519_client()
62 sizeof(kex->c25519_client_pubkey))) != 0 || in kexc25519_client()
75 struct kex *kex = ssh->kex; in input_kex_c25519_reply() local
84 if (kex->verify_host_key == NULL) { in input_kex_c25519_reply()
95 if (server_host_key->type != kex->hostkey_type || in input_kex_c25519_reply()
96 (kex->hostkey_type == KEY_ECDSA && in input_kex_c25519_reply()
97 server_host_key->ecdsa_nid != kex->hostkey_nid)) { in input_kex_c25519_reply()
101 if (kex->verify_host_key(server_host_key, ssh) == -1) { in input_kex_c25519_reply()
125 if ((r = kexc25519_shared_key(kex->c25519_client_key, server_pubkey, in input_kex_c25519_reply()
132 kex->hash_alg, in input_kex_c25519_reply()
133 kex->client_version_string, in input_kex_c25519_reply()
134 kex->server_version_string, in input_kex_c25519_reply()
135 sshbuf_ptr(kex->my), sshbuf_len(kex->my), in input_kex_c25519_reply()
136 sshbuf_ptr(kex->peer), sshbuf_len(kex->peer), in input_kex_c25519_reply()
138 kex->c25519_client_pubkey, in input_kex_c25519_reply()
149 if (kex->session_id == NULL) { in input_kex_c25519_reply()
150 kex->session_id_len = hashlen; in input_kex_c25519_reply()
151 kex->session_id = malloc(kex->session_id_len); in input_kex_c25519_reply()
152 if (kex->session_id == NULL) { in input_kex_c25519_reply()
156 memcpy(kex->session_id, hash, kex->session_id_len); in input_kex_c25519_reply()
163 explicit_bzero(kex->c25519_client_key, sizeof(kex->c25519_client_key)); in input_kex_c25519_reply()