crypto/openssh/auth2-gss.c
304
"gssapi-with-mic", ssh->kex->session_id);
crypto/openssh/auth2-hostbased.c
130
if ((r = sshbuf_put_stringb(b, ssh->kex->session_id)) != 0 ||
crypto/openssh/auth2-pubkey.c
120
if (ssh->kex->initial_hostkey == NULL)
crypto/openssh/auth2-pubkey.c
122
if (!sshkey_equal(hostkey, ssh->kex->initial_hostkey))
crypto/openssh/auth2-pubkey.c
197
if ((r = sshbuf_putb(b, ssh->kex->session_id)) != 0)
crypto/openssh/auth2-pubkey.c
201
ssh->kex->session_id)) != 0)
crypto/openssh/auth2-pubkey.c
221
(r = sshkey_puts(ssh->kex->initial_hostkey, b)) != 0)
crypto/openssh/auth2.c
176
if (ssh->kex->ext_info_c)
crypto/openssh/clientloop.c
1829
if ((r = ssh_agent_bind_hostkey(sock, ssh->kex->initial_hostkey,
crypto/openssh/clientloop.c
1830
ssh->kex->session_id, ssh->kex->initial_sig, 1)) == 0)
crypto/openssh/clientloop.c
2351
ssh->kex->hostkey_alg)) == KEY_RSA)
crypto/openssh/clientloop.c
2352
rsa_kexalg = ssh->kex->hostkey_alg;
crypto/openssh/clientloop.c
2369
ssh->kex->session_id)) != 0 ||
crypto/openssh/clientloop.c
519
if (ssh->kex == NULL || (ssh->kex->flags & KEX_HAS_PING) == 0)
crypto/openssh/kex.c
1000
ctos = (!kex->server && mode == MODE_OUT) ||
crypto/openssh/kex.c
1001
(kex->server && mode == MODE_IN);
crypto/openssh/kex.c
1007
kex->failed_choice = peer[nenc];
crypto/openssh/kex.c
1016
kex->failed_choice = peer[nmac];
crypto/openssh/kex.c
1022
kex->failed_choice = peer[ncomp];
crypto/openssh/kex.c
1034
newkeys = kex->newkeys[mode];
crypto/openssh/kex.c
1045
kex->we_need = need;
crypto/openssh/kex.c
1046
kex->dh_need = dh_need;
crypto/openssh/kex.c
1062
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
107
if ((cp = kex_names_cat(kexalgos, ssh->kex->server ?
crypto/openssh/kex.c
1070
if ((mdsz = ssh_digest_bytes(kex->hash_alg)) == 0)
crypto/openssh/kex.c
1078
if ((hashctx = ssh_digest_start(kex->hash_alg)) == NULL ||
crypto/openssh/kex.c
1082
ssh_digest_update_buffer(hashctx, kex->session_id) != 0 ||
crypto/openssh/kex.c
1097
if ((hashctx = ssh_digest_start(kex->hash_alg)) == NULL ||
crypto/openssh/kex.c
1127
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
1133
if ((kex->flags & KEX_INITIAL) != 0) {
crypto/openssh/kex.c
1134
if (sshbuf_len(kex->session_id) != 0) {
crypto/openssh/kex.c
1138
if ((r = sshbuf_put(kex->session_id, hash, hashlen)) != 0)
crypto/openssh/kex.c
1140
} else if (sshbuf_len(kex->session_id) == 0) {
crypto/openssh/kex.c
1145
if ((r = derive_key(ssh, 'A'+i, kex->we_need, hash, hashlen,
crypto/openssh/kex.c
1153
ctos = (!kex->server && mode == MODE_OUT) ||
crypto/openssh/kex.c
1154
(kex->server && mode == MODE_IN);
crypto/openssh/kex.c
1155
kex->newkeys[mode]->enc.iv = keys[ctos ? 0 : 1];
crypto/openssh/kex.c
1156
kex->newkeys[mode]->enc.key = keys[ctos ? 2 : 3];
crypto/openssh/kex.c
1157
kex->newkeys[mode]->mac.key = keys[ctos ? 4 : 5];
crypto/openssh/kex.c
1165
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
1169
if (kex->load_host_public_key == NULL ||
crypto/openssh/kex.c
1170
kex->load_host_private_key == NULL) {
crypto/openssh/kex.c
1174
*pubp = kex->load_host_public_key(kex->hostkey_type,
crypto/openssh/kex.c
1175
kex->hostkey_nid, ssh);
crypto/openssh/kex.c
1176
*prvp = kex->load_host_private_key(kex->hostkey_type,
crypto/openssh/kex.c
1177
kex->hostkey_nid, ssh);
crypto/openssh/kex.c
1186
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
1188
if (kex->verify_host_key == NULL) {
crypto/openssh/kex.c
1192
if (server_host_key->type != kex->hostkey_type ||
crypto/openssh/kex.c
1193
(kex->hostkey_type == KEY_ECDSA &&
crypto/openssh/kex.c
1194
server_host_key->ecdsa_nid != kex->hostkey_nid))
crypto/openssh/kex.c
1196
if (kex->verify_host_key(server_host_key, ssh) == -1)
crypto/openssh/kex.c
1219
if (!ssh->kex->server)
crypto/openssh/kex.c
1242
struct sshbuf *our_version = ssh->kex->server ?
crypto/openssh/kex.c
1243
ssh->kex->server_version : ssh->kex->client_version;
crypto/openssh/kex.c
1244
struct sshbuf *peer_version = ssh->kex->server ?
crypto/openssh/kex.c
1245
ssh->kex->client_version : ssh->kex->server_version;
crypto/openssh/kex.c
1358
if (ssh->kex->server) {
crypto/openssh/kex.c
1414
if (ssh->kex->server && (ssh->compat & SSH_BUG_PROBE) != 0) {
crypto/openssh/kex.c
1421
if (ssh->kex->server && (ssh->compat & SSH_BUG_SCANNER) != 0) {
crypto/openssh/kex.c
241
if ((ssh->kex->flags & KEX_INITIAL) && ssh->kex->kex_strict) {
crypto/openssh/kex.c
276
free(ssh->kex->server_sig_algs);
crypto/openssh/kex.c
277
ssh->kex->server_sig_algs = NULL;
crypto/openssh/kex.c
285
if (ssh->kex->server_sig_algs != NULL &&
crypto/openssh/kex.c
286
kex_has_any_alg(sigalg, ssh->kex->server_sig_algs))
crypto/openssh/kex.c
288
xextendf(&ssh->kex->server_sig_algs, ",", "%s", sigalg);
crypto/openssh/kex.c
292
if (ssh->kex->server_sig_algs == NULL)
crypto/openssh/kex.c
293
ssh->kex->server_sig_algs = xstrdup("");
crypto/openssh/kex.c
301
if (ssh->kex->server_sig_algs == NULL &&
crypto/openssh/kex.c
302
(ssh->kex->server_sig_algs = sshkey_alg_list(0, 1, 1, ',')) == NULL)
crypto/openssh/kex.c
306
(r = sshbuf_put_cstring(m, ssh->kex->server_sig_algs)) != 0 ||
crypto/openssh/kex.c
341
if ((ssh->kex->flags & KEX_INITIAL) == 0)
crypto/openssh/kex.c
343
if (!ssh->kex->ext_info_c && !ssh->kex->ext_info_s)
crypto/openssh/kex.c
349
if (ssh->kex->ext_info_c &&
crypto/openssh/kex.c
352
if (ssh->kex->ext_info_s &&
crypto/openssh/kex.c
377
if ((ssh->kex->flags & KEX_HAS_EXT_INFO_IN_AUTH) == 0)
crypto/openssh/kex.c
384
(r = sshpkt_put_cstring(ssh, ssh->kex->server_sig_algs)) != 0 ||
crypto/openssh/kex.c
411
kex_ext_info_check_ver(struct kex *kex, const char *name,
crypto/openssh/kex.c
420
kex->flags |= flag;
crypto/openssh/kex.c
440
free(ssh->kex->server_sig_algs);
crypto/openssh/kex.c
441
ssh->kex->server_sig_algs = xstrdup((const char *)value);
crypto/openssh/kex.c
442
} else if (ssh->kex->ext_info_received == 1 &&
crypto/openssh/kex.c
444
if ((r = kex_ext_info_check_ver(ssh->kex, name, value, vlen,
crypto/openssh/kex.c
448
} else if (ssh->kex->ext_info_received == 1 &&
crypto/openssh/kex.c
450
if ((r = kex_ext_info_check_ver(ssh->kex, name, value, vlen,
crypto/openssh/kex.c
467
if ((r = kex_ext_info_check_ver(ssh->kex, name, value, vlen,
crypto/openssh/kex.c
479
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
480
const int max_ext_info = kex->server ? 1 : 2;
crypto/openssh/kex.c
488
if (++kex->ext_info_received > max_ext_info) {
crypto/openssh/kex.c
508
if (kex->server) {
crypto/openssh/kex.c
526
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
527
int r, initial = (kex->flags & KEX_INITIAL) != 0;
crypto/openssh/kex.c
531
if (kex->ext_info_c && initial)
crypto/openssh/kex.c
541
if ((r = kex_buf2prop(kex->my, NULL, &prop)) != 0)
crypto/openssh/kex.c
544
kex->server ?
crypto/openssh/kex.c
552
if ((r = kex_prop2buf(ssh->kex->my, prop)) != 0) {
crypto/openssh/kex.c
562
kex->done = 1;
crypto/openssh/kex.c
563
kex->flags &= ~KEX_INITIAL;
crypto/openssh/kex.c
564
sshbuf_reset(kex->peer);
crypto/openssh/kex.c
565
kex->flags &= ~KEX_INIT_SENT;
crypto/openssh/kex.c
566
free(kex->name);
crypto/openssh/kex.c
567
kex->name = NULL;
crypto/openssh/kex.c
575
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
578
if (kex == NULL) {
crypto/openssh/kex.c
582
if (kex->flags & KEX_INIT_SENT)
crypto/openssh/kex.c
584
kex->done = 0;
crypto/openssh/kex.c
587
if (sshbuf_len(kex->my) < KEX_COOKIE_LEN) {
crypto/openssh/kex.c
589
sshbuf_len(kex->my), KEX_COOKIE_LEN);
crypto/openssh/kex.c
592
if ((cookie = sshbuf_mutable_ptr(kex->my)) == NULL) {
crypto/openssh/kex.c
599
(r = sshpkt_putb(ssh, kex->my)) != 0 ||
crypto/openssh/kex.c
605
kex->flags |= KEX_INIT_SENT;
crypto/openssh/kex.c
612
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
619
if (kex == NULL) {
crypto/openssh/kex.c
625
if ((r = sshbuf_put(kex->peer, ptr, dlen)) != 0)
crypto/openssh/kex.c
656
if (!(kex->flags & KEX_INIT_SENT))
crypto/openssh/kex.c
662
if (kex->kex_type < KEX_MAX && kex->kex[kex->kex_type] != NULL)
crypto/openssh/kex.c
663
return (kex->kex[kex->kex_type])(ssh);
crypto/openssh/kex.c
665
error_f("unknown kex type %u", kex->kex_type);
crypto/openssh/kex.c
669
struct kex *
crypto/openssh/kex.c
672
struct kex *kex;
crypto/openssh/kex.c
674
if ((kex = calloc(1, sizeof(*kex))) == NULL ||
crypto/openssh/kex.c
675
(kex->peer = sshbuf_new()) == NULL ||
crypto/openssh/kex.c
676
(kex->my = sshbuf_new()) == NULL ||
crypto/openssh/kex.c
677
(kex->client_version = sshbuf_new()) == NULL ||
crypto/openssh/kex.c
678
(kex->server_version = sshbuf_new()) == NULL ||
crypto/openssh/kex.c
679
(kex->session_id = sshbuf_new()) == NULL) {
crypto/openssh/kex.c
680
kex_free(kex);
crypto/openssh/kex.c
683
return kex;
crypto/openssh/kex.c
717
kex_free(struct kex *kex)
crypto/openssh/kex.c
721
if (kex == NULL)
crypto/openssh/kex.c
725
DH_free(kex->dh);
crypto/openssh/kex.c
727
EC_KEY_free(kex->ec_client_key);
crypto/openssh/kex.c
731
kex_free_newkeys(kex->newkeys[mode]);
crypto/openssh/kex.c
732
kex->newkeys[mode] = NULL;
crypto/openssh/kex.c
734
sshbuf_free(kex->peer);
crypto/openssh/kex.c
735
sshbuf_free(kex->my);
crypto/openssh/kex.c
736
sshbuf_free(kex->client_version);
crypto/openssh/kex.c
737
sshbuf_free(kex->server_version);
crypto/openssh/kex.c
738
sshbuf_free(kex->client_pub);
crypto/openssh/kex.c
739
sshbuf_free(kex->session_id);
crypto/openssh/kex.c
740
sshbuf_free(kex->initial_sig);
crypto/openssh/kex.c
741
sshkey_free(kex->initial_hostkey);
crypto/openssh/kex.c
742
free(kex->failed_choice);
crypto/openssh/kex.c
743
free(kex->hostkey_alg);
crypto/openssh/kex.c
744
free(kex->name);
crypto/openssh/kex.c
745
free(kex);
crypto/openssh/kex.c
753
if ((r = kex_prop2buf(ssh->kex->my, proposal)) != 0)
crypto/openssh/kex.c
755
ssh->kex->flags = KEX_INITIAL;
crypto/openssh/kex.c
769
kex_free(ssh->kex);
crypto/openssh/kex.c
770
ssh->kex = NULL;
crypto/openssh/kex.c
783
if (ssh->kex == NULL) {
crypto/openssh/kex.c
787
if (ssh->kex->done == 0) {
crypto/openssh/kex.c
791
ssh->kex->done = 0;
crypto/openssh/kex.c
859
choose_kex(struct kex *k, char *client, char *server)
crypto/openssh/kex.c
877
choose_hostkeyalg(struct kex *k, char *client, char *server)
crypto/openssh/kex.c
928
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
936
debug2("local %s KEXINIT proposal", kex->server ? "server" : "client");
crypto/openssh/kex.c
937
if ((r = kex_buf2prop(kex->my, NULL, &my)) != 0)
crypto/openssh/kex.c
939
debug2("peer %s KEXINIT proposal", kex->server ? "client" : "server");
crypto/openssh/kex.c
940
if ((r = kex_buf2prop(kex->peer, &first_kex_follows, &peer)) != 0)
crypto/openssh/kex.c
943
if (kex->server) {
crypto/openssh/kex.c
952
if ((kex->flags & KEX_INITIAL) != 0) {
crypto/openssh/kex.c
953
if (kex->server) {
crypto/openssh/kex.c
954
kex->ext_info_c = kexalgs_contains(peer, "ext-info-c");
crypto/openssh/kex.c
955
kex->kex_strict = kexalgs_contains(peer,
crypto/openssh/kex.c
958
kex->ext_info_s = kexalgs_contains(peer, "ext-info-s");
crypto/openssh/kex.c
959
kex->kex_strict = kexalgs_contains(peer,
crypto/openssh/kex.c
962
if (kex->kex_strict) {
crypto/openssh/kex.c
97
const char **defprop = ssh->kex->server ? defpropserver : defpropclient;
crypto/openssh/kex.c
972
if (kex->server && (kex->flags & KEX_INITIAL)) {
crypto/openssh/kex.c
975
kex->flags |= KEX_RSA_SHA2_256_SUPPORTED;
crypto/openssh/kex.c
978
kex->flags |= KEX_RSA_SHA2_512_SUPPORTED;
crypto/openssh/kex.c
982
if ((r = choose_kex(kex, cprop[PROPOSAL_KEX_ALGS],
crypto/openssh/kex.c
984
kex->failed_choice = peer[PROPOSAL_KEX_ALGS];
crypto/openssh/kex.c
988
if ((r = choose_hostkeyalg(kex, cprop[PROPOSAL_SERVER_HOST_KEY_ALGS],
crypto/openssh/kex.c
990
kex->failed_choice = peer[PROPOSAL_SERVER_HOST_KEY_ALGS];
crypto/openssh/kex.c
999
kex->newkeys[mode] = newkeys;
crypto/openssh/kex.h
175
int (*kex[KEX_MAX])(struct ssh *);
crypto/openssh/kex.h
203
struct kex *kex_new(void);
crypto/openssh/kex.h
207
void kex_free(struct kex *);
crypto/openssh/kex.h
230
int kex_dh_keypair(struct kex *);
crypto/openssh/kex.h
231
int kex_dh_enc(struct kex *, const struct sshbuf *, struct sshbuf **,
crypto/openssh/kex.h
233
int kex_dh_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
crypto/openssh/kex.h
235
int kex_ecdh_keypair(struct kex *);
crypto/openssh/kex.h
236
int kex_ecdh_enc(struct kex *, const struct sshbuf *, struct sshbuf **,
crypto/openssh/kex.h
238
int kex_ecdh_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
crypto/openssh/kex.h
240
int kex_c25519_keypair(struct kex *);
crypto/openssh/kex.h
241
int kex_c25519_enc(struct kex *, const struct sshbuf *, struct sshbuf **,
crypto/openssh/kex.h
243
int kex_c25519_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
crypto/openssh/kex.h
245
int kex_kem_sntrup761x25519_keypair(struct kex *);
crypto/openssh/kex.h
246
int kex_kem_sntrup761x25519_enc(struct kex *, const struct sshbuf *,
crypto/openssh/kex.h
248
int kex_kem_sntrup761x25519_dec(struct kex *, const struct sshbuf *,
crypto/openssh/kex.h
251
int kex_kem_mlkem768x25519_keypair(struct kex *);
crypto/openssh/kex.h
252
int kex_kem_mlkem768x25519_enc(struct kex *, const struct sshbuf *,
crypto/openssh/kex.h
254
int kex_kem_mlkem768x25519_dec(struct kex *, const struct sshbuf *,
crypto/openssh/kex.h
257
int kex_dh_keygen(struct kex *);
crypto/openssh/kex.h
258
int kex_dh_compute_key(struct kex *, BIGNUM *, struct sshbuf *);
crypto/openssh/kexc25519.c
102
kexc25519_keygen(kex->c25519_client_key, cp);
crypto/openssh/kexc25519.c
106
kex->client_pub = buf;
crypto/openssh/kexc25519.c
114
kex_c25519_enc(struct kex *kex, const struct sshbuf *client_blob,
crypto/openssh/kexc25519.c
166
kex_c25519_dec(struct kex *kex, const struct sshbuf *server_blob,
crypto/openssh/kexc25519.c
188
if ((r = kexc25519_shared_key_ext(kex->c25519_client_key, server_pub,
crypto/openssh/kexc25519.c
92
kex_c25519_keypair(struct kex *kex)
crypto/openssh/kexdh.c
115
kex_dh_keypair(struct kex *kex)
crypto/openssh/kexdh.c
121
if ((r = kex_dh_keygen(kex)) != 0)
crypto/openssh/kexdh.c
123
DH_get0_key(kex->dh, &pub_key, NULL);
crypto/openssh/kexdh.c
130
DHparams_print_fp(stderr, kex->dh);
crypto/openssh/kexdh.c
135
kex->client_pub = buf;
crypto/openssh/kexdh.c
143
kex_dh_enc(struct kex *kex, const struct sshbuf *client_blob,
crypto/openssh/kexdh.c
153
if ((r = kex_dh_keygen(kex)) != 0)
crypto/openssh/kexdh.c
155
DH_get0_key(kex->dh, &pub_key, NULL);
crypto/openssh/kexdh.c
163
if ((r = kex_dh_dec(kex, client_blob, shared_secretp)) != 0)
crypto/openssh/kexdh.c
168
DH_free(kex->dh);
crypto/openssh/kexdh.c
169
kex->dh = NULL;
crypto/openssh/kexdh.c
175
kex_dh_dec(struct kex *kex, const struct sshbuf *dh_blob,
crypto/openssh/kexdh.c
192
if ((r = kex_dh_compute_key(kex, dh_pub, buf)) != 0)
crypto/openssh/kexdh.c
198
DH_free(kex->dh);
crypto/openssh/kexdh.c
199
kex->dh = NULL;
crypto/openssh/kexdh.c
48
kex_dh_keygen(struct kex *kex)
crypto/openssh/kexdh.c
50
switch (kex->kex_type) {
crypto/openssh/kexdh.c
52
kex->dh = dh_new_group1();
crypto/openssh/kexdh.c
56
kex->dh = dh_new_group14();
crypto/openssh/kexdh.c
59
kex->dh = dh_new_group16();
crypto/openssh/kexdh.c
62
kex->dh = dh_new_group18();
crypto/openssh/kexdh.c
67
if (kex->dh == NULL)
crypto/openssh/kexdh.c
69
return (dh_gen_key(kex->dh, kex->we_need * 8));
crypto/openssh/kexdh.c
73
kex_dh_compute_key(struct kex *kex, BIGNUM *dh_pub, struct sshbuf *out)
crypto/openssh/kexdh.c
85
DHparams_print_fp(stderr, kex->dh);
crypto/openssh/kexdh.c
89
if (!dh_pub_is_valid(kex->dh, dh_pub)) {
crypto/openssh/kexdh.c
93
klen = DH_size(kex->dh);
crypto/openssh/kexdh.c
99
if ((kout = DH_compute_key(kbuf, dh_pub, kex->dh)) < 0 ||
crypto/openssh/kexecdh.c
104
if ((server_key = EC_KEY_new_by_curve_name(kex->ec_nid)) == NULL) {
crypto/openssh/kexecdh.c
126
if ((r = kex_ecdh_dec_key_group(kex, client_blob, server_key, group,
crypto/openssh/kexecdh.c
138
kex_ecdh_dec_key_group(struct kex *kex, const struct sshbuf *ec_blob,
crypto/openssh/kexecdh.c
200
kex_ecdh_dec(struct kex *kex, const struct sshbuf *server_blob,
crypto/openssh/kexecdh.c
205
r = kex_ecdh_dec_key_group(kex, server_blob, kex->ec_client_key,
crypto/openssh/kexecdh.c
206
kex->ec_group, shared_secretp);
crypto/openssh/kexecdh.c
207
EC_KEY_free(kex->ec_client_key);
crypto/openssh/kexecdh.c
208
kex->ec_client_key = NULL;
crypto/openssh/kexecdh.c
216
struct kex;
crypto/openssh/kexecdh.c
221
kex_ecdh_keypair(struct kex *kex)
crypto/openssh/kexecdh.c
227
kex_ecdh_enc(struct kex *kex, const struct sshbuf *client_blob,
crypto/openssh/kexecdh.c
234
kex_ecdh_dec(struct kex *kex, const struct sshbuf *server_blob,
crypto/openssh/kexecdh.c
46
kex_ecdh_dec_key_group(struct kex *, const struct sshbuf *, EC_KEY *key,
crypto/openssh/kexecdh.c
50
kex_ecdh_keypair(struct kex *kex)
crypto/openssh/kexecdh.c
58
if ((client_key = EC_KEY_new_by_curve_name(kex->ec_nid)) == NULL) {
crypto/openssh/kexecdh.c
80
kex->ec_client_key = client_key;
crypto/openssh/kexecdh.c
81
kex->ec_group = group;
crypto/openssh/kexecdh.c
83
kex->client_pub = buf;
crypto/openssh/kexecdh.c
92
kex_ecdh_enc(struct kex *kex, const struct sshbuf *client_blob,
crypto/openssh/kexgen.c
101
struct kex *kex = ssh->kex;
crypto/openssh/kexgen.c
104
switch (kex->kex_type) {
crypto/openssh/kexgen.c
111
r = kex_dh_keypair(kex);
crypto/openssh/kexgen.c
114
r = kex_ecdh_keypair(kex);
crypto/openssh/kexgen.c
118
r = kex_c25519_keypair(kex);
crypto/openssh/kexgen.c
121
r = kex_kem_sntrup761x25519_keypair(kex);
crypto/openssh/kexgen.c
124
r = kex_kem_mlkem768x25519_keypair(kex);
crypto/openssh/kexgen.c
133
(r = sshpkt_put_stringb(ssh, kex->client_pub)) != 0 ||
crypto/openssh/kexgen.c
144
struct kex *kex = ssh->kex;
crypto/openssh/kexgen.c
178
switch (kex->kex_type) {
crypto/openssh/kexgen.c
185
r = kex_dh_dec(kex, server_blob, &shared_secret);
crypto/openssh/kexgen.c
188
r = kex_ecdh_dec(kex, server_blob, &shared_secret);
crypto/openssh/kexgen.c
192
r = kex_c25519_dec(kex, server_blob, &shared_secret);
crypto/openssh/kexgen.c
195
r = kex_kem_sntrup761x25519_dec(kex, server_blob,
crypto/openssh/kexgen.c
199
r = kex_kem_mlkem768x25519_dec(kex, server_blob,
crypto/openssh/kexgen.c
212
kex->hash_alg,
crypto/openssh/kexgen.c
213
kex->client_version,
crypto/openssh/kexgen.c
214
kex->server_version,
crypto/openssh/kexgen.c
215
kex->my,
crypto/openssh/kexgen.c
216
kex->peer,
crypto/openssh/kexgen.c
218
kex->client_pub,
crypto/openssh/kexgen.c
225
kex->hostkey_alg, ssh->compat, NULL)) != 0)
crypto/openssh/kexgen.c
233
if ((kex->flags & KEX_INITIAL) != 0) {
crypto/openssh/kexgen.c
234
if (kex->initial_hostkey != NULL || kex->initial_sig != NULL) {
crypto/openssh/kexgen.c
238
if ((kex->initial_sig = sshbuf_new()) == NULL) {
crypto/openssh/kexgen.c
242
if ((r = sshbuf_put(kex->initial_sig, signature, slen)) != 0)
crypto/openssh/kexgen.c
244
kex->initial_hostkey = server_host_key;
crypto/openssh/kexgen.c
250
explicit_bzero(kex->c25519_client_key, sizeof(kex->c25519_client_key));
crypto/openssh/kexgen.c
251
explicit_bzero(kex->sntrup761_client_key,
crypto/openssh/kexgen.c
252
sizeof(kex->sntrup761_client_key));
crypto/openssh/kexgen.c
253
explicit_bzero(kex->mlkem768_client_key,
crypto/openssh/kexgen.c
254
sizeof(kex->mlkem768_client_key));
crypto/openssh/kexgen.c
261
sshbuf_free(kex->client_pub);
crypto/openssh/kexgen.c
262
kex->client_pub = NULL;
crypto/openssh/kexgen.c
277
struct kex *kex = ssh->kex;
crypto/openssh/kexgen.c
299
switch (kex->kex_type) {
crypto/openssh/kexgen.c
306
r = kex_dh_enc(kex, client_pubkey, &server_pubkey,
crypto/openssh/kexgen.c
310
r = kex_ecdh_enc(kex, client_pubkey, &server_pubkey,
crypto/openssh/kexgen.c
315
r = kex_c25519_enc(kex, client_pubkey, &server_pubkey,
crypto/openssh/kexgen.c
319
r = kex_kem_sntrup761x25519_enc(kex, client_pubkey,
crypto/openssh/kexgen.c
323
r = kex_kem_mlkem768x25519_enc(kex, client_pubkey,
crypto/openssh/kexgen.c
342
kex->hash_alg,
crypto/openssh/kexgen.c
343
kex->client_version,
crypto/openssh/kexgen.c
344
kex->server_version,
crypto/openssh/kexgen.c
345
kex->peer,
crypto/openssh/kexgen.c
346
kex->my,
crypto/openssh/kexgen.c
355
if ((r = kex->sign(ssh, server_host_private, server_host_public,
crypto/openssh/kexgen.c
356
&signature, &slen, hash, hashlen, kex->hostkey_alg)) != 0)
crypto/openssh/kexgen.c
371
if (kex->initial_hostkey == NULL &&
crypto/openssh/kexgen.c
373
&kex->initial_hostkey)) != 0)
crypto/openssh/kexgexc.c
110
(u_int)bits < kex->min || (u_int)bits > kex->max) {
crypto/openssh/kexgexc.c
114
if ((kex->dh = dh_new_group(g, p)) == NULL) {
crypto/openssh/kexgexc.c
121
if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0)
crypto/openssh/kexgexc.c
123
DH_get0_key(kex->dh, &pub_key, NULL);
crypto/openssh/kexgexc.c
130
DHparams_print_fp(stderr, kex->dh);
crypto/openssh/kexgexc.c
147
struct kex *kex = ssh->kex;
crypto/openssh/kexgexc.c
181
if ((r = kex_dh_compute_key(kex, dh_server_pub, shared_secret)) != 0)
crypto/openssh/kexgexc.c
184
kex->min = kex->max = -1;
crypto/openssh/kexgexc.c
187
DH_get0_key(kex->dh, &pub_key, NULL);
crypto/openssh/kexgexc.c
188
DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g);
crypto/openssh/kexgexc.c
191
kex->hash_alg,
crypto/openssh/kexgexc.c
192
kex->client_version,
crypto/openssh/kexgexc.c
193
kex->server_version,
crypto/openssh/kexgexc.c
194
kex->my,
crypto/openssh/kexgexc.c
195
kex->peer,
crypto/openssh/kexgexc.c
197
kex->min, kex->nbits, kex->max,
crypto/openssh/kexgexc.c
206
hashlen, kex->hostkey_alg, ssh->compat, NULL)) != 0)
crypto/openssh/kexgexc.c
214
if ((kex->flags & KEX_INITIAL) != 0) {
crypto/openssh/kexgexc.c
215
if (kex->initial_hostkey != NULL || kex->initial_sig != NULL) {
crypto/openssh/kexgexc.c
219
if ((kex->initial_sig = sshbuf_new()) == NULL) {
crypto/openssh/kexgexc.c
223
if ((r = sshbuf_put(kex->initial_sig, signature, slen)) != 0)
crypto/openssh/kexgexc.c
225
kex->initial_hostkey = server_host_key;
crypto/openssh/kexgexc.c
231
DH_free(kex->dh);
crypto/openssh/kexgexc.c
232
kex->dh = NULL;
crypto/openssh/kexgexc.c
62
struct kex *kex = ssh->kex;
crypto/openssh/kexgexc.c
66
nbits = dh_estimate(kex->dh_need * 8);
crypto/openssh/kexgexc.c
68
kex->min = DH_GRP_MIN;
crypto/openssh/kexgexc.c
69
kex->max = DH_GRP_MAX;
crypto/openssh/kexgexc.c
70
kex->nbits = nbits;
crypto/openssh/kexgexc.c
72
kex->nbits = MINIMUM(kex->nbits, 4096);
crypto/openssh/kexgexc.c
75
(r = sshpkt_put_u32(ssh, kex->min)) != 0 ||
crypto/openssh/kexgexc.c
76
(r = sshpkt_put_u32(ssh, kex->nbits)) != 0 ||
crypto/openssh/kexgexc.c
77
(r = sshpkt_put_u32(ssh, kex->max)) != 0 ||
crypto/openssh/kexgexc.c
81
kex->min, kex->nbits, kex->max);
crypto/openssh/kexgexc.c
84
kex->min, kex->nbits, kex->max);
crypto/openssh/kexgexc.c
97
struct kex *kex = ssh->kex;
crypto/openssh/kexgexs.c
101
kex->dh = mm_choose_dh(min, nbits, max);
crypto/openssh/kexgexs.c
102
if (kex->dh == NULL) {
crypto/openssh/kexgexs.c
108
DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g);
crypto/openssh/kexgexs.c
116
if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0)
crypto/openssh/kexgexs.c
129
struct kex *kex = ssh->kex;
crypto/openssh/kexgexs.c
155
if ((r = kex_dh_compute_key(kex, dh_client_pub, shared_secret)) != 0)
crypto/openssh/kexgexs.c
165
DH_get0_key(kex->dh, &pub_key, NULL);
crypto/openssh/kexgexs.c
166
DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g);
crypto/openssh/kexgexs.c
169
kex->hash_alg,
crypto/openssh/kexgexs.c
170
kex->client_version,
crypto/openssh/kexgexs.c
171
kex->server_version,
crypto/openssh/kexgexs.c
172
kex->peer,
crypto/openssh/kexgexs.c
173
kex->my,
crypto/openssh/kexgexs.c
175
kex->min, kex->nbits, kex->max,
crypto/openssh/kexgexs.c
184
if ((r = kex->sign(ssh, server_host_private, server_host_public,
crypto/openssh/kexgexs.c
185
&signature, &slen, hash, hashlen, kex->hostkey_alg)) < 0)
crypto/openssh/kexgexs.c
201
if (kex->initial_hostkey == NULL &&
crypto/openssh/kexgexs.c
203
&kex->initial_hostkey)) != 0)
crypto/openssh/kexgexs.c
208
DH_free(kex->dh);
crypto/openssh/kexgexs.c
209
kex->dh = NULL;
crypto/openssh/kexgexs.c
73
struct kex *kex = ssh->kex;
crypto/openssh/kexgexs.c
86
kex->nbits = nbits;
crypto/openssh/kexgexs.c
87
kex->min = min;
crypto/openssh/kexgexs.c
88
kex->max = max;
crypto/openssh/kexgexs.c
94
if (kex->max < kex->min || kex->nbits < kex->min ||
crypto/openssh/kexgexs.c
95
kex->max < kex->nbits || kex->max < DH_GRP_MIN) {
crypto/openssh/kexmlkem768x25519.c
156
if ((r = ssh_digest_buffer(kex->hash_alg, buf, hash, sizeof(hash))) != 0)
crypto/openssh/kexmlkem768x25519.c
169
ssh_digest_bytes(kex->hash_alg))) != 0)
crypto/openssh/kexmlkem768x25519.c
191
kex_kem_mlkem768x25519_dec(struct kex *kex,
crypto/openssh/kexmlkem768x25519.c
219
memcpy(mlkem_priv.value, kex->mlkem768_client_key,
crypto/openssh/kexmlkem768x25519.c
220
sizeof(kex->mlkem768_client_key));
crypto/openssh/kexmlkem768x25519.c
232
if ((r = kexc25519_shared_key_ext(kex->c25519_client_key, server_pub,
crypto/openssh/kexmlkem768x25519.c
235
if ((r = ssh_digest_buffer(kex->hash_alg, buf,
crypto/openssh/kexmlkem768x25519.c
245
ssh_digest_bytes(kex->hash_alg))) != 0)
crypto/openssh/kexmlkem768x25519.c
264
kex_kem_mlkem768x25519_keypair(struct kex *kex)
crypto/openssh/kexmlkem768x25519.c
270
kex_kem_mlkem768x25519_enc(struct kex *kex,
crypto/openssh/kexmlkem768x25519.c
278
kex_kem_mlkem768x25519_dec(struct kex *kex,
crypto/openssh/kexmlkem768x25519.c
53
kex_kem_mlkem768x25519_keypair(struct kex *kex)
crypto/openssh/kexmlkem768x25519.c
69
memcpy(kex->mlkem768_client_key, keypair.sk.value,
crypto/openssh/kexmlkem768x25519.c
70
sizeof(kex->mlkem768_client_key));
crypto/openssh/kexmlkem768x25519.c
76
kexc25519_keygen(kex->c25519_client_key, cp);
crypto/openssh/kexmlkem768x25519.c
82
kex->client_pub = buf;
crypto/openssh/kexmlkem768x25519.c
92
kex_kem_mlkem768x25519_enc(struct kex *kex,
crypto/openssh/kexsntrup761x25519.c
133
if ((r = ssh_digest_buffer(kex->hash_alg, buf, hash, sizeof(hash))) != 0)
crypto/openssh/kexsntrup761x25519.c
146
ssh_digest_bytes(kex->hash_alg))) != 0)
crypto/openssh/kexsntrup761x25519.c
164
kex_kem_sntrup761x25519_dec(struct kex *kex,
crypto/openssh/kexsntrup761x25519.c
197
kex->sntrup761_client_key);
crypto/openssh/kexsntrup761x25519.c
198
if ((r = kexc25519_shared_key_ext(kex->c25519_client_key, server_pub,
crypto/openssh/kexsntrup761x25519.c
201
if ((r = ssh_digest_buffer(kex->hash_alg, buf, hash, sizeof(hash))) != 0)
crypto/openssh/kexsntrup761x25519.c
210
ssh_digest_bytes(kex->hash_alg))) != 0)
crypto/openssh/kexsntrup761x25519.c
231
struct kex;
crypto/openssh/kexsntrup761x25519.c
236
kex_kem_sntrup761x25519_keypair(struct kex *kex)
crypto/openssh/kexsntrup761x25519.c
242
kex_kem_sntrup761x25519_enc(struct kex *kex,
crypto/openssh/kexsntrup761x25519.c
250
kex_kem_sntrup761x25519_dec(struct kex *kex,
crypto/openssh/kexsntrup761x25519.c
47
kex_kem_sntrup761x25519_keypair(struct kex *kex)
crypto/openssh/kexsntrup761x25519.c
59
crypto_kem_sntrup761_keypair(cp, kex->sntrup761_client_key);
crypto/openssh/kexsntrup761x25519.c
65
kexc25519_keygen(kex->c25519_client_key, cp);
crypto/openssh/kexsntrup761x25519.c
69
kex->client_pub = buf;
crypto/openssh/kexsntrup761x25519.c
77
kex_kem_sntrup761x25519_enc(struct kex *kex,
crypto/openssh/monitor.c
1841
struct kex *kex;
crypto/openssh/monitor.c
1849
if ((kex = ssh->kex) == NULL)
crypto/openssh/monitor.c
1851
if (session_id2_len != sshbuf_len(ssh->kex->session_id)) {
crypto/openssh/monitor.c
1853
sshbuf_len(ssh->kex->session_id), session_id2_len);
crypto/openssh/monitor.c
1855
if (memcmp(sshbuf_ptr(ssh->kex->session_id), session_id2,
crypto/openssh/monitor.c
1860
kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server;
crypto/openssh/monitor.c
1861
kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server;
crypto/openssh/monitor.c
1862
kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_server;
crypto/openssh/monitor.c
1863
kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_server;
crypto/openssh/monitor.c
1864
kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_server;
crypto/openssh/monitor.c
1865
kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
crypto/openssh/monitor.c
1866
kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
crypto/openssh/monitor.c
1868
kex->kex[KEX_ECDH_SHA2] = kex_gen_server;
crypto/openssh/monitor.c
1871
kex->kex[KEX_C25519_SHA256] = kex_gen_server;
crypto/openssh/monitor.c
1872
kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_server;
crypto/openssh/monitor.c
1873
kex->kex[KEX_KEM_MLKEM768X25519_SHA256] = kex_gen_server;
crypto/openssh/monitor.c
1874
kex->load_host_public_key=&get_hostkey_public_by_type;
crypto/openssh/monitor.c
1875
kex->load_host_private_key=&get_hostkey_private_by_type;
crypto/openssh/monitor.c
1876
kex->host_key_index=&get_hostkey_index;
crypto/openssh/monitor.c
1877
kex->sign = sshd_hostkey_sign;
crypto/openssh/monitor.c
643
(r = sshbuf_put_stringb(m, ssh->kex->server_version)) != 0 ||
crypto/openssh/monitor.c
644
(r = sshbuf_put_stringb(m, ssh->kex->client_version)) != 0 ||
crypto/openssh/monitor.h
77
struct kex **m_pkex;
crypto/openssh/monitor_wrap.c
884
(r = sshbuf_get_stringb(m, ssh->kex->server_version)) != 0 ||
crypto/openssh/monitor_wrap.c
885
(r = sshbuf_get_stringb(m, ssh->kex->client_version)) != 0 ||
crypto/openssh/packet.c
1302
if ((ssh->kex->flags & KEX_INITIAL) != 0) {
crypto/openssh/packet.c
1315
if (type == SSH2_MSG_NEWKEYS && ssh->kex->kex_strict) {
crypto/openssh/packet.c
1527
if (ssh->kex)
crypto/openssh/packet.c
1713
if ((ssh->kex->flags & KEX_INITIAL) != 0) {
crypto/openssh/packet.c
1784
if (*typep == SSH2_MSG_NEWKEYS && ssh->kex->kex_strict) {
crypto/openssh/packet.c
1839
if (ssh->kex != NULL &&
crypto/openssh/packet.c
1840
(ssh->kex->flags & KEX_INITIAL) && ssh->kex->kex_strict)
crypto/openssh/packet.c
2023
if (ssh->kex && ssh->kex->failed_choice) {
crypto/openssh/packet.c
2028
ssh->kex->failed_choice);
crypto/openssh/packet.c
2307
ssh->kex->server = 1; /* XXX unify? */
crypto/openssh/packet.c
2347
kex_to_blob(struct sshbuf *m, struct kex *kex)
crypto/openssh/packet.c
2351
if ((r = sshbuf_put_u32(m, kex->we_need)) != 0 ||
crypto/openssh/packet.c
2352
(r = sshbuf_put_cstring(m, kex->hostkey_alg)) != 0 ||
crypto/openssh/packet.c
2353
(r = sshbuf_put_u32(m, kex->hostkey_type)) != 0 ||
crypto/openssh/packet.c
2354
(r = sshbuf_put_u32(m, kex->hostkey_nid)) != 0 ||
crypto/openssh/packet.c
2355
(r = sshbuf_put_u32(m, kex->kex_type)) != 0 ||
crypto/openssh/packet.c
2356
(r = sshbuf_put_u32(m, kex->kex_strict)) != 0 ||
crypto/openssh/packet.c
2357
(r = sshbuf_put_stringb(m, kex->my)) != 0 ||
crypto/openssh/packet.c
2358
(r = sshbuf_put_stringb(m, kex->peer)) != 0 ||
crypto/openssh/packet.c
2359
(r = sshbuf_put_stringb(m, kex->client_version)) != 0 ||
crypto/openssh/packet.c
2360
(r = sshbuf_put_stringb(m, kex->server_version)) != 0 ||
crypto/openssh/packet.c
2361
(r = sshbuf_put_stringb(m, kex->session_id)) != 0 ||
crypto/openssh/packet.c
2362
(r = sshbuf_put_u32(m, kex->flags)) != 0)
crypto/openssh/packet.c
237
(ssh->kex = kex_new()) == NULL ||
crypto/openssh/packet.c
2418
if ((r = kex_to_blob(m, ssh->kex)) != 0 ||
crypto/openssh/packet.c
2496
ssh->kex->newkeys[mode] = newkey;
crypto/openssh/packet.c
2507
kex_from_blob(struct sshbuf *m, struct kex **kexp)
crypto/openssh/packet.c
2509
struct kex *kex;
crypto/openssh/packet.c
2512
if ((kex = kex_new()) == NULL)
crypto/openssh/packet.c
2514
if ((r = sshbuf_get_u32(m, &kex->we_need)) != 0 ||
crypto/openssh/packet.c
2515
(r = sshbuf_get_cstring(m, &kex->hostkey_alg, NULL)) != 0 ||
crypto/openssh/packet.c
2516
(r = sshbuf_get_u32(m, (u_int *)&kex->hostkey_type)) != 0 ||
crypto/openssh/packet.c
2517
(r = sshbuf_get_u32(m, (u_int *)&kex->hostkey_nid)) != 0 ||
crypto/openssh/packet.c
2518
(r = sshbuf_get_u32(m, &kex->kex_type)) != 0 ||
crypto/openssh/packet.c
2519
(r = sshbuf_get_u32(m, &kex->kex_strict)) != 0 ||
crypto/openssh/packet.c
2520
(r = sshbuf_get_stringb(m, kex->my)) != 0 ||
crypto/openssh/packet.c
2521
(r = sshbuf_get_stringb(m, kex->peer)) != 0 ||
crypto/openssh/packet.c
2522
(r = sshbuf_get_stringb(m, kex->client_version)) != 0 ||
crypto/openssh/packet.c
2523
(r = sshbuf_get_stringb(m, kex->server_version)) != 0 ||
crypto/openssh/packet.c
2524
(r = sshbuf_get_stringb(m, kex->session_id)) != 0 ||
crypto/openssh/packet.c
2525
(r = sshbuf_get_u32(m, &kex->flags)) != 0)
crypto/openssh/packet.c
2527
kex->server = 1;
crypto/openssh/packet.c
2528
kex->done = 1;
crypto/openssh/packet.c
2532
kex_free(kex);
crypto/openssh/packet.c
2537
*kexp = kex;
crypto/openssh/packet.c
2554
if ((r = kex_from_blob(m, &ssh->kex)) != 0 ||
crypto/openssh/packet.c
261
kex_free(ssh->kex);
crypto/openssh/packet.c
2779
if (ssh->kex)
crypto/openssh/packet.c
286
(ssh->kex != NULL && ssh->kex->done == 0);
crypto/openssh/packet.c
349
kex_free(ssh->kex);
crypto/openssh/packet.c
350
ssh->kex = NULL;
crypto/openssh/packet.c
737
kex_free(ssh->kex);
crypto/openssh/packet.c
738
ssh->kex = NULL;
crypto/openssh/packet.c
946
if (ssh->kex && ssh->kex->newkeys[mode]) {
crypto/openssh/packet.c
947
kex_free_newkeys(ssh->kex->newkeys[mode]);
crypto/openssh/packet.c
948
ssh->kex->newkeys[mode] = NULL;
crypto/openssh/packet.c
992
if ((state->newkeys[mode] = ssh->kex->newkeys[mode]) == NULL)
crypto/openssh/packet.c
994
ssh->kex->newkeys[mode] = NULL;
crypto/openssh/packet.h
42
struct kex;
crypto/openssh/packet.h
59
struct kex *kex;
crypto/openssh/regress/misc/fuzz-harness/kex_fuzz.cc
175
const char *kex, int keytype)
crypto/openssh/regress/misc/fuzz-harness/kex_fuzz.cc
197
debug_f("%s %s clobber client %zu", kex, keyname,
crypto/openssh/regress/misc/fuzz-harness/kex_fuzz.cc
200
debug_f("%s %s clobber server %zu", kex, keyname,
crypto/openssh/regress/misc/fuzz-harness/kex_fuzz.cc
203
debug_f("%s %s noclobber", kex, keyname);
crypto/openssh/regress/misc/fuzz-harness/kex_fuzz.cc
213
else if (i == PROPOSAL_KEX_ALGS && kex != NULL)
crypto/openssh/regress/misc/fuzz-harness/kex_fuzz.cc
214
ccp = kex;
crypto/openssh/regress/misc/fuzz-harness/kex_fuzz.cc
394
do_kex(struct shared_state *st, struct test_state *ts, const char *kex)
crypto/openssh/regress/misc/fuzz-harness/kex_fuzz.cc
396
do_kex_with_key(st, ts, kex, KEY_RSA);
crypto/openssh/regress/misc/fuzz-harness/kex_fuzz.cc
397
do_kex_with_key(st, ts, kex, KEY_ECDSA);
crypto/openssh/regress/misc/fuzz-harness/kex_fuzz.cc
398
do_kex_with_key(st, ts, kex, KEY_ED25519);
crypto/openssh/regress/misc/fuzz-harness/kex_fuzz.cc
98
while (!server->kex->done || !client->kex->done) {
crypto/openssh/regress/unittests/kex/test_kex.c
143
ASSERT_PTR_NE(server2->kex, NULL);
crypto/openssh/regress/unittests/kex/test_kex.c
146
server2->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server;
crypto/openssh/regress/unittests/kex/test_kex.c
147
server2->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server;
crypto/openssh/regress/unittests/kex/test_kex.c
148
server2->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
crypto/openssh/regress/unittests/kex/test_kex.c
149
server2->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
crypto/openssh/regress/unittests/kex/test_kex.c
151
server2->kex->kex[KEX_ECDH_SHA2] = kex_gen_server;
crypto/openssh/regress/unittests/kex/test_kex.c
154
server2->kex->kex[KEX_C25519_SHA256] = kex_gen_server;
crypto/openssh/regress/unittests/kex/test_kex.c
155
server2->kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_server;
crypto/openssh/regress/unittests/kex/test_kex.c
156
server2->kex->kex[KEX_KEM_MLKEM768X25519_SHA256] = kex_gen_server;
crypto/openssh/regress/unittests/kex/test_kex.c
157
server2->kex->load_host_public_key = server->kex->load_host_public_key;
crypto/openssh/regress/unittests/kex/test_kex.c
158
server2->kex->load_host_private_key = server->kex->load_host_private_key;
crypto/openssh/regress/unittests/kex/test_kex.c
159
server2->kex->sign = server->kex->sign;
crypto/openssh/regress/unittests/kex/test_kex.c
180
do_kex(char *kex)
crypto/openssh/regress/unittests/kex/test_kex.c
186
do_kex_with_key(kex, KEY_RSA, 2048);
crypto/openssh/regress/unittests/kex/test_kex.c
188
do_kex_with_key(kex, KEY_DSA, 1024);
crypto/openssh/regress/unittests/kex/test_kex.c
191
do_kex_with_key(kex, KEY_ECDSA, 256);
crypto/openssh/regress/unittests/kex/test_kex.c
194
do_kex_with_key(kex, KEY_ED25519, 256);
crypto/openssh/regress/unittests/kex/test_kex.c
61
while (!server->kex->done || !client->kex->done) {
crypto/openssh/regress/unittests/kex/test_kex.c
74
ASSERT_INT_EQ(server->kex->done, 1);
crypto/openssh/regress/unittests/kex/test_kex.c
75
ASSERT_INT_EQ(client->kex->done, 1);
crypto/openssh/regress/unittests/kex/test_kex.c
79
do_kex_with_key(char *kex, int keytype, int bits)
crypto/openssh/regress/unittests/kex/test_kex.c
98
if (kex != NULL)
crypto/openssh/regress/unittests/kex/test_kex.c
99
kex_params.proposal[PROPOSAL_KEX_ALGS] = kex;
crypto/openssh/regress/unittests/kex/test_proposal.c
102
ssh.kex = &kex;
crypto/openssh/regress/unittests/kex/test_proposal.c
105
kex.server = i;
crypto/openssh/regress/unittests/kex/test_proposal.c
95
struct kex kex;
crypto/openssh/serverloop.c
659
ssh->kex->hostkey_alg)) == KEY_RSA)
crypto/openssh/serverloop.c
660
kex_rsa_sigalg = ssh->kex->hostkey_alg;
crypto/openssh/serverloop.c
673
if ((ndx = ssh->kex->host_key_index(key, 1, ssh)) == -1) {
crypto/openssh/serverloop.c
697
else if (ssh->kex->flags & KEX_RSA_SHA2_512_SUPPORTED)
crypto/openssh/serverloop.c
699
else if (ssh->kex->flags & KEX_RSA_SHA2_256_SUPPORTED)
crypto/openssh/serverloop.c
708
ssh->kex->session_id)) != 0 ||
crypto/openssh/serverloop.c
710
(r = ssh->kex->sign(ssh, key_prv, key_pub, &sig, &slen,
crypto/openssh/ssh-keyscan.c
293
c->c_ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_client;
crypto/openssh/ssh-keyscan.c
294
c->c_ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_client;
crypto/openssh/ssh-keyscan.c
295
c->c_ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_client;
crypto/openssh/ssh-keyscan.c
296
c->c_ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_client;
crypto/openssh/ssh-keyscan.c
297
c->c_ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_client;
crypto/openssh/ssh-keyscan.c
298
c->c_ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
crypto/openssh/ssh-keyscan.c
299
c->c_ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
crypto/openssh/ssh-keyscan.c
301
c->c_ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_client;
crypto/openssh/ssh-keyscan.c
304
c->c_ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_client;
crypto/openssh/ssh-keyscan.c
305
c->c_ssh->kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_client;
crypto/openssh/ssh-keyscan.c
306
c->c_ssh->kex->kex[KEX_KEM_MLKEM768X25519_SHA256] = kex_gen_client;
crypto/openssh/ssh_api.c
121
ssh->kex->server = is_server;
crypto/openssh/ssh_api.c
124
ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server;
crypto/openssh/ssh_api.c
125
ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server;
crypto/openssh/ssh_api.c
126
ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_server;
crypto/openssh/ssh_api.c
127
ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_server;
crypto/openssh/ssh_api.c
128
ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_server;
crypto/openssh/ssh_api.c
129
ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
crypto/openssh/ssh_api.c
130
ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
crypto/openssh/ssh_api.c
132
ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_server;
crypto/openssh/ssh_api.c
135
ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_server;
crypto/openssh/ssh_api.c
136
ssh->kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_server;
crypto/openssh/ssh_api.c
137
ssh->kex->kex[KEX_KEM_MLKEM768X25519_SHA256] = kex_gen_server;
crypto/openssh/ssh_api.c
138
ssh->kex->load_host_public_key=&_ssh_host_public_key;
crypto/openssh/ssh_api.c
139
ssh->kex->load_host_private_key=&_ssh_host_private_key;
crypto/openssh/ssh_api.c
140
ssh->kex->sign=&_ssh_host_key_sign;
crypto/openssh/ssh_api.c
143
ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_client;
crypto/openssh/ssh_api.c
144
ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_client;
crypto/openssh/ssh_api.c
145
ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_client;
crypto/openssh/ssh_api.c
146
ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_client;
crypto/openssh/ssh_api.c
147
ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_client;
crypto/openssh/ssh_api.c
148
ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
crypto/openssh/ssh_api.c
149
ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
crypto/openssh/ssh_api.c
151
ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_client;
crypto/openssh/ssh_api.c
154
ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_client;
crypto/openssh/ssh_api.c
155
ssh->kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_client;
crypto/openssh/ssh_api.c
156
ssh->kex->kex[KEX_KEM_MLKEM768X25519_SHA256] = kex_gen_client;
crypto/openssh/ssh_api.c
157
ssh->kex->verify_host_key =&_ssh_verify_host_key;
crypto/openssh/ssh_api.c
177
if (ssh->kex && ssh->kex->server)
crypto/openssh/ssh_api.c
209
if (ssh->kex->server) {
crypto/openssh/ssh_api.c
240
if (cb == NULL || ssh->kex == NULL)
crypto/openssh/ssh_api.c
243
ssh->kex->verify_host_key = cb;
crypto/openssh/ssh_api.c
266
if (sshbuf_len(ssh->kex->client_version) == 0 ||
crypto/openssh/ssh_api.c
267
sshbuf_len(ssh->kex->server_version) == 0)
crypto/openssh/ssh_api.c
378
if (ssh->kex->server || ++n > SSH_MAX_PRE_BANNER_LINES) {
crypto/openssh/ssh_api.c
447
struct kex *kex = ssh->kex;
crypto/openssh/ssh_api.c
456
if (kex->server) {
crypto/openssh/ssh_api.c
457
if (sshbuf_len(ssh->kex->server_version) == 0)
crypto/openssh/ssh_api.c
458
r = _ssh_send_banner(ssh, ssh->kex->server_version);
crypto/openssh/ssh_api.c
460
sshbuf_len(ssh->kex->server_version) != 0 &&
crypto/openssh/ssh_api.c
461
sshbuf_len(ssh->kex->client_version) == 0)
crypto/openssh/ssh_api.c
462
r = _ssh_read_banner(ssh, ssh->kex->client_version);
crypto/openssh/ssh_api.c
464
if (sshbuf_len(ssh->kex->server_version) == 0)
crypto/openssh/ssh_api.c
465
r = _ssh_read_banner(ssh, ssh->kex->server_version);
crypto/openssh/ssh_api.c
467
sshbuf_len(ssh->kex->server_version) != 0 &&
crypto/openssh/ssh_api.c
468
sshbuf_len(ssh->kex->client_version) == 0)
crypto/openssh/ssh_api.c
469
r = _ssh_send_banner(ssh, ssh->kex->client_version);
crypto/openssh/ssh_api.c
474
if (sshbuf_len(ssh->kex->server_version) != 0 &&
crypto/openssh/ssh_api.c
475
sshbuf_len(ssh->kex->client_version) != 0) {
crypto/openssh/ssh_api.c
538
if ((r = kex_buf2prop(ssh->kex->my, NULL, &proposal)) != 0)
crypto/openssh/ssh_api.c
571
debug2_f("orig/%d %s", ssh->kex->server, orig);
crypto/openssh/ssh_api.c
572
debug2_f("replace/%d %s", ssh->kex->server, replace);
crypto/openssh/ssh_api.c
576
r = kex_prop2buf(ssh->kex->my, proposal);
crypto/openssh/sshconnect2.c
1166
if (ssh == NULL || ssh->kex->server_sig_algs == NULL ||
crypto/openssh/sshconnect2.c
1178
server_sig_algs = ssh->kex->server_sig_algs;
crypto/openssh/sshconnect2.c
1324
if ((ssh->kex->flags & KEX_HAS_PUBKEY_HOSTBOUND) != 0 &&
crypto/openssh/sshconnect2.c
1403
if ((r = sshbuf_putb(b, ssh->kex->session_id)) != 0)
crypto/openssh/sshconnect2.c
1407
ssh->kex->session_id)) != 0)
crypto/openssh/sshconnect2.c
1421
if (ssh->kex->initial_hostkey == NULL) {
crypto/openssh/sshconnect2.c
1425
if ((r = sshkey_puts(ssh->kex->initial_hostkey, b)) != 0)
crypto/openssh/sshconnect2.c
1642
if ((r = ssh_agent_bind_hostkey(agent_fd, ssh->kex->initial_hostkey,
crypto/openssh/sshconnect2.c
1643
ssh->kex->session_id, ssh->kex->initial_sig, 0)) == 0)
crypto/openssh/sshconnect2.c
1804
} else if (ssh->kex->server_sig_algs != NULL &&
crypto/openssh/sshconnect2.c
2212
if ((r = sshbuf_put_stringb(b, ssh->kex->session_id)) != 0 ||
crypto/openssh/sshconnect2.c
264
ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_client;
crypto/openssh/sshconnect2.c
265
ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_client;
crypto/openssh/sshconnect2.c
266
ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_client;
crypto/openssh/sshconnect2.c
267
ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_client;
crypto/openssh/sshconnect2.c
268
ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_client;
crypto/openssh/sshconnect2.c
269
ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
crypto/openssh/sshconnect2.c
270
ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
crypto/openssh/sshconnect2.c
272
ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_client;
crypto/openssh/sshconnect2.c
275
ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_client;
crypto/openssh/sshconnect2.c
276
ssh->kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_client;
crypto/openssh/sshconnect2.c
277
ssh->kex->kex[KEX_KEM_MLKEM768X25519_SHA256] = kex_gen_client;
crypto/openssh/sshconnect2.c
278
ssh->kex->verify_host_key=&verify_host_key_callback;
crypto/openssh/sshconnect2.c
280
ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &ssh->kex->done);
crypto/openssh/sshconnect2.c
513
ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, ssh->kex->ext_info_s ?
crypto/openssh/sshconnect2.c
862
ssh->kex->session_id);
crypto/openssh/sshd-auth.c
664
pmonitor->m_pkex = &ssh->kex;
crypto/openssh/sshd-auth.c
827
struct kex *kex;
crypto/openssh/sshd-auth.c
847
kex = ssh->kex;
crypto/openssh/sshd-auth.c
850
kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server;
crypto/openssh/sshd-auth.c
851
kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server;
crypto/openssh/sshd-auth.c
852
kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_server;
crypto/openssh/sshd-auth.c
853
kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_server;
crypto/openssh/sshd-auth.c
854
kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_server;
crypto/openssh/sshd-auth.c
855
kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
crypto/openssh/sshd-auth.c
856
kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
crypto/openssh/sshd-auth.c
858
kex->kex[KEX_ECDH_SHA2] = kex_gen_server;
crypto/openssh/sshd-auth.c
861
kex->kex[KEX_C25519_SHA256] = kex_gen_server;
crypto/openssh/sshd-auth.c
862
kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_server;
crypto/openssh/sshd-auth.c
863
kex->kex[KEX_KEM_MLKEM768X25519_SHA256] = kex_gen_server;
crypto/openssh/sshd-auth.c
864
kex->load_host_public_key=&get_hostkey_public_by_type;
crypto/openssh/sshd-auth.c
865
kex->load_host_private_key=&get_hostkey_private_by_type;
crypto/openssh/sshd-auth.c
866
kex->host_key_index=&get_hostkey_index;
crypto/openssh/sshd-auth.c
867
kex->sign = sshd_hostkey_sign;
crypto/openssh/sshd-auth.c
869
ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &kex->done);
crypto/openssh/sshd-session.c
346
pmonitor->m_pkex = &ssh->kex;
crypto/openssl/apps/list.c
1032
static void collect_kex(EVP_KEYEXCH *kex, void *stack)
crypto/openssl/apps/list.c
1036
if (is_keyexch_fetchable(kex)
crypto/openssl/apps/list.c
1037
&& EVP_KEYEXCH_up_ref(kex)
crypto/openssl/apps/list.c
1038
&& sk_EVP_KEYEXCH_push(kex_stack, kex) <= 0)
crypto/openssl/apps/list.c
1039
EVP_KEYEXCH_free(kex); /* up-ref successful but push to stack failed */
crypto/openssl/crypto/evp/ctrl_params_translate.c
433
&& ctx->pctx->op.kex.algctx == NULL)
crypto/openssl/crypto/evp/exchange.c
339
ctx->op.kex.exchange = exchange;
crypto/openssl/crypto/evp/exchange.c
342
ctx->op.kex.algctx = exchange->newctx(ossl_provider_ctx(exchange->prov));
crypto/openssl/crypto/evp/exchange.c
343
if (ctx->op.kex.algctx == NULL) {
crypto/openssl/crypto/evp/exchange.c
348
ret = exchange->init(ctx->op.kex.algctx, provkey, params);
crypto/openssl/crypto/evp/exchange.c
396
if (!EVP_PKEY_CTX_IS_DERIVE_OP(ctx) || ctx->op.kex.algctx == NULL)
crypto/openssl/crypto/evp/exchange.c
399
if (ctx->op.kex.exchange->set_peer == NULL) {
crypto/openssl/crypto/evp/exchange.c
424
EVP_KEYEXCH_get0_provider(ctx->op.kex.exchange),
crypto/openssl/crypto/evp/exchange.c
440
ret = ctx->op.kex.exchange->set_peer(ctx->op.kex.algctx, provkey);
crypto/openssl/crypto/evp/exchange.c
528
if (ctx->op.kex.algctx == NULL)
crypto/openssl/crypto/evp/exchange.c
531
ret = ctx->op.kex.exchange->derive(ctx->op.kex.algctx, key, pkeylen,
crypto/openssl/crypto/evp/pmeth_lib.c
1099
return evp_pkey_ctx_set1_octet_string(ctx, ctx->op.kex.algctx == NULL,
crypto/openssl/crypto/evp/pmeth_lib.c
1109
return evp_pkey_ctx_set1_octet_string(ctx, ctx->op.kex.algctx == NULL,
crypto/openssl/crypto/evp/pmeth_lib.c
1118
return evp_pkey_ctx_set_md(ctx, md, ctx->op.kex.algctx == NULL,
crypto/openssl/crypto/evp/pmeth_lib.c
1126
return evp_pkey_ctx_set1_octet_string(ctx, ctx->op.kex.algctx == NULL,
crypto/openssl/crypto/evp/pmeth_lib.c
1136
return evp_pkey_ctx_set1_octet_string(ctx, ctx->op.kex.algctx == NULL,
crypto/openssl/crypto/evp/pmeth_lib.c
1146
return evp_pkey_ctx_add1_octet_string(ctx, ctx->op.kex.algctx == NULL,
crypto/openssl/crypto/evp/pmeth_lib.c
1164
if (ctx->op.kex.algctx == NULL)
crypto/openssl/crypto/evp/pmeth_lib.c
1183
return evp_pkey_ctx_set1_octet_string(ctx, ctx->op.kex.algctx == NULL,
crypto/openssl/crypto/evp/pmeth_lib.c
1193
return evp_pkey_ctx_set1_octet_string(ctx, ctx->op.kex.algctx == NULL,
crypto/openssl/crypto/evp/pmeth_lib.c
1212
if (ctx->op.kex.algctx == NULL)
crypto/openssl/crypto/evp/pmeth_lib.c
144
&& ctx->op.kex.algctx != NULL)
crypto/openssl/crypto/evp/pmeth_lib.c
1570
if (ctx->op.kex.exchange != NULL)
crypto/openssl/crypto/evp/pmeth_lib.c
1571
return EVP_KEYEXCH_get0_provider(ctx->op.kex.exchange);
crypto/openssl/crypto/evp/pmeth_lib.c
367
if (ctx->op.kex.algctx != NULL && ctx->op.kex.exchange != NULL)
crypto/openssl/crypto/evp/pmeth_lib.c
368
ctx->op.kex.exchange->freectx(ctx->op.kex.algctx);
crypto/openssl/crypto/evp/pmeth_lib.c
369
EVP_KEYEXCH_free(ctx->op.kex.exchange);
crypto/openssl/crypto/evp/pmeth_lib.c
370
ctx->op.kex.algctx = NULL;
crypto/openssl/crypto/evp/pmeth_lib.c
371
ctx->op.kex.exchange = NULL;
crypto/openssl/crypto/evp/pmeth_lib.c
489
if (pctx->op.kex.exchange != NULL) {
crypto/openssl/crypto/evp/pmeth_lib.c
490
rctx->op.kex.exchange = pctx->op.kex.exchange;
crypto/openssl/crypto/evp/pmeth_lib.c
491
if (!EVP_KEYEXCH_up_ref(rctx->op.kex.exchange))
crypto/openssl/crypto/evp/pmeth_lib.c
494
if (pctx->op.kex.algctx != NULL) {
crypto/openssl/crypto/evp/pmeth_lib.c
495
if (!ossl_assert(pctx->op.kex.exchange != NULL))
crypto/openssl/crypto/evp/pmeth_lib.c
498
if (pctx->op.kex.exchange->dupctx != NULL)
crypto/openssl/crypto/evp/pmeth_lib.c
499
rctx->op.kex.algctx
crypto/openssl/crypto/evp/pmeth_lib.c
500
= pctx->op.kex.exchange->dupctx(pctx->op.kex.algctx);
crypto/openssl/crypto/evp/pmeth_lib.c
502
if (rctx->op.kex.algctx == NULL) {
crypto/openssl/crypto/evp/pmeth_lib.c
503
EVP_KEYEXCH_free(rctx->op.kex.exchange);
crypto/openssl/crypto/evp/pmeth_lib.c
504
rctx->op.kex.exchange = NULL;
crypto/openssl/crypto/evp/pmeth_lib.c
682
&& ctx->op.kex.exchange != NULL
crypto/openssl/crypto/evp/pmeth_lib.c
683
&& ctx->op.kex.exchange->set_ctx_params != NULL)
crypto/openssl/crypto/evp/pmeth_lib.c
684
return ctx->op.kex.exchange->set_ctx_params(ctx->op.kex.algctx,
crypto/openssl/crypto/evp/pmeth_lib.c
722
&& ctx->op.kex.exchange != NULL
crypto/openssl/crypto/evp/pmeth_lib.c
723
&& ctx->op.kex.exchange->get_ctx_params != NULL)
crypto/openssl/crypto/evp/pmeth_lib.c
724
return ctx->op.kex.exchange->get_ctx_params(ctx->op.kex.algctx,
crypto/openssl/crypto/evp/pmeth_lib.c
763
&& ctx->op.kex.exchange != NULL
crypto/openssl/crypto/evp/pmeth_lib.c
764
&& ctx->op.kex.exchange->gettable_ctx_params != NULL) {
crypto/openssl/crypto/evp/pmeth_lib.c
765
provctx = ossl_provider_ctx(EVP_KEYEXCH_get0_provider(ctx->op.kex.exchange));
crypto/openssl/crypto/evp/pmeth_lib.c
766
return ctx->op.kex.exchange->gettable_ctx_params(ctx->op.kex.algctx,
crypto/openssl/crypto/evp/pmeth_lib.c
807
&& ctx->op.kex.exchange != NULL
crypto/openssl/crypto/evp/pmeth_lib.c
808
&& ctx->op.kex.exchange->settable_ctx_params != NULL) {
crypto/openssl/crypto/evp/pmeth_lib.c
809
provctx = ossl_provider_ctx(EVP_KEYEXCH_get0_provider(ctx->op.kex.exchange));
crypto/openssl/crypto/evp/pmeth_lib.c
810
return ctx->op.kex.exchange->settable_ctx_params(ctx->op.kex.algctx,
crypto/openssl/crypto/evp/pmeth_lib.c
984
return evp_pkey_ctx_set_md(ctx, md, ctx->op.kex.algctx == NULL,
crypto/openssl/include/crypto/evp.h
66
} kex;
crypto/openssl/ssl/ssl_ciph.c
318
EVP_KEYEXCH *kex = NULL;
crypto/openssl/ssl/ssl_ciph.c
362
kex = EVP_KEYEXCH_fetch(ctx->libctx, "DH", ctx->propq);
crypto/openssl/ssl/ssl_ciph.c
363
if (kex == NULL)
crypto/openssl/ssl/ssl_ciph.c
366
EVP_KEYEXCH_free(kex);
crypto/openssl/ssl/ssl_ciph.c
367
kex = EVP_KEYEXCH_fetch(ctx->libctx, "ECDH", ctx->propq);
crypto/openssl/ssl/ssl_ciph.c
368
if (kex == NULL)
crypto/openssl/ssl/ssl_ciph.c
371
EVP_KEYEXCH_free(kex);