Lines Matching refs:Kex
40 #include "kex.h"
51 kexdh_server(Kex *kex)
61 switch (kex->kex_type) {
69 fatal("%s: Unexpected KEX type %d", __func__, kex->kex_type);
71 dh_gen_key(dh, kex->we_need * 8);
76 if (kex->load_host_public_key == NULL ||
77 kex->load_host_private_key == NULL)
79 server_host_public = kex->load_host_public_key(kex->hostkey_type);
81 fatal("Unsupported hostkey type %d", kex->hostkey_type);
82 server_host_private = kex->load_host_private_key(kex->hostkey_type);
85 kex->hostkey_type);
127 kex->client_version_string,
128 kex->server_version_string,
129 buffer_ptr(&kex->peer), buffer_len(&kex->peer),
130 buffer_ptr(&kex->my), buffer_len(&kex->my),
140 if (kex->session_id == NULL) {
141 kex->session_id_len = hashlen;
142 kex->session_id = xmalloc(kex->session_id_len);
143 memcpy(kex->session_id, hash, kex->session_id_len);
165 kex_derive_keys(kex, hash, hashlen, shared_secret);
167 kex_finish(kex);