Lines Matching refs:kex

110 	ssh->kex->server = is_server;  in ssh_init()
113 ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server; in ssh_init()
114 ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server; in ssh_init()
115 ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_server; in ssh_init()
116 ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_server; in ssh_init()
117 ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_server; in ssh_init()
118 ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; in ssh_init()
119 ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; in ssh_init()
121 ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_server; in ssh_init()
124 ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_server; in ssh_init()
125 ssh->kex->kex[KEX_KEM_SNTRUP4591761X25519_SHA512] = kex_gen_server; in ssh_init()
126 ssh->kex->load_host_public_key=&_ssh_host_public_key; in ssh_init()
127 ssh->kex->load_host_private_key=&_ssh_host_private_key; in ssh_init()
128 ssh->kex->sign=&_ssh_host_key_sign; in ssh_init()
131 ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_client; in ssh_init()
132 ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_client; in ssh_init()
133 ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_client; in ssh_init()
134 ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_client; in ssh_init()
135 ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_client; in ssh_init()
136 ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; in ssh_init()
137 ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_client; in ssh_init()
139 ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_client; in ssh_init()
142 ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_client; in ssh_init()
143 ssh->kex->kex[KEX_KEM_SNTRUP4591761X25519_SHA512] = kex_gen_client; in ssh_init()
144 ssh->kex->verify_host_key =&_ssh_verify_host_key; in ssh_init()
162 if (ssh->kex && ssh->kex->server) in ssh_free()
170 if (ssh->kex) in ssh_free()
171 kex_free(ssh->kex); in ssh_free()
195 if (ssh->kex->server) { in ssh_add_hostkey()
226 if (cb == NULL || ssh->kex == NULL) in ssh_set_verify_host_key_callback()
229 ssh->kex->verify_host_key = cb; in ssh_set_verify_host_key_callback()
252 if (sshbuf_len(ssh->kex->client_version) == 0 || in ssh_packet_next()
253 sshbuf_len(ssh->kex->server_version) == 0) in ssh_packet_next()
364 if (ssh->kex->server || ++n > SSH_MAX_PRE_BANNER_LINES) { in _ssh_read_banner()
433 struct kex *kex = ssh->kex; in _ssh_exchange_banner() local
442 if (kex->server) { in _ssh_exchange_banner()
443 if (sshbuf_len(ssh->kex->server_version) == 0) in _ssh_exchange_banner()
444 r = _ssh_send_banner(ssh, ssh->kex->server_version); in _ssh_exchange_banner()
446 sshbuf_len(ssh->kex->server_version) != 0 && in _ssh_exchange_banner()
447 sshbuf_len(ssh->kex->client_version) == 0) in _ssh_exchange_banner()
448 r = _ssh_read_banner(ssh, ssh->kex->client_version); in _ssh_exchange_banner()
450 if (sshbuf_len(ssh->kex->server_version) == 0) in _ssh_exchange_banner()
451 r = _ssh_read_banner(ssh, ssh->kex->server_version); in _ssh_exchange_banner()
453 sshbuf_len(ssh->kex->server_version) != 0 && in _ssh_exchange_banner()
454 sshbuf_len(ssh->kex->client_version) == 0) in _ssh_exchange_banner()
455 r = _ssh_send_banner(ssh, ssh->kex->client_version); in _ssh_exchange_banner()
460 if (sshbuf_len(ssh->kex->server_version) != 0 && in _ssh_exchange_banner()
461 sshbuf_len(ssh->kex->client_version) != 0) { in _ssh_exchange_banner()
524 if ((r = kex_buf2prop(ssh->kex->my, NULL, &proposal)) != 0) in _ssh_order_hostkeyalgs()
552 debug2("%s: orig/%d %s", __func__, ssh->kex->server, orig); in _ssh_order_hostkeyalgs()
553 debug2("%s: replace/%d %s", __func__, ssh->kex->server, replace); in _ssh_order_hostkeyalgs()
557 r = kex_prop2buf(ssh->kex->my, proposal); in _ssh_order_hostkeyalgs()