Lines Matching refs:kex
40 #include "kex.h"
64 struct kex *kex = ssh->kex;
78 if ((server_key = EC_KEY_new_by_curve_name(kex->ec_nid)) == NULL) {
93 if (kex->load_host_public_key == NULL ||
94 kex->load_host_private_key == NULL) {
98 server_host_public = kex->load_host_public_key(kex->hostkey_type,
99 kex->hostkey_nid, ssh);
100 server_host_private = kex->load_host_private_key(kex->hostkey_type,
101 kex->hostkey_nid, ssh);
147 kex->hash_alg,
149 kex->client_version_string,
150 kex->server_version_string,
151 sshbuf_ptr(kex->peer), sshbuf_len(kex->peer),
152 sshbuf_ptr(kex->my), sshbuf_len(kex->my),
161 if (kex->session_id == NULL) {
162 kex->session_id_len = hashlen;
163 kex->session_id = malloc(kex->session_id_len);
164 if (kex->session_id == NULL) {
168 memcpy(kex->session_id, hash, kex->session_id_len);
172 if ((r = kex->sign(server_host_private, server_host_public, &signature,
173 &slen, hash, hashlen, kex->hostkey_alg, ssh->compat)) < 0)
191 if (kex->ec_client_key) {
192 EC_KEY_free(kex->ec_client_key);
193 kex->ec_client_key = NULL;