crypto/openssh/auth2-gss.c
303
"gssapi-with-mic", ssh->kex->session_id);
crypto/openssh/auth2-hostbased.c
131
if ((r = sshbuf_put_stringb(b, ssh->kex->session_id)) != 0 ||
crypto/openssh/auth2-pubkey.c
114
if (ssh->kex->initial_hostkey == NULL)
crypto/openssh/auth2-pubkey.c
116
if (!sshkey_equal(hostkey, ssh->kex->initial_hostkey))
crypto/openssh/auth2-pubkey.c
192
if ((r = sshbuf_putb(b, ssh->kex->session_id)) != 0)
crypto/openssh/auth2-pubkey.c
196
ssh->kex->session_id)) != 0)
crypto/openssh/auth2-pubkey.c
216
(r = sshkey_puts(ssh->kex->initial_hostkey, b)) != 0)
crypto/openssh/auth2.c
176
if (ssh->kex->ext_info_c)
crypto/openssh/clientloop.c
1861
if ((r = ssh_agent_bind_hostkey(sock, ssh->kex->initial_hostkey,
crypto/openssh/clientloop.c
1862
ssh->kex->session_id, ssh->kex->initial_sig, 1)) == 0)
crypto/openssh/clientloop.c
2384
ssh->kex->hostkey_alg)) == KEY_RSA)
crypto/openssh/clientloop.c
2385
rsa_kexalg = ssh->kex->hostkey_alg;
crypto/openssh/clientloop.c
2402
ssh->kex->session_id)) != 0 ||
crypto/openssh/clientloop.c
2835
if (ssh->kex != NULL && (ssh->kex->flags & KEX_HAS_NEWAGENT) != 0)
crypto/openssh/clientloop.c
517
if (ssh->kex == NULL || (ssh->kex->flags & KEX_HAS_PING) == 0)
crypto/openssh/kex.c
1000
kex->failed_choice = peer[PROPOSAL_SERVER_HOST_KEY_ALGS];
crypto/openssh/kex.c
1009
kex->newkeys[mode] = newkeys;
crypto/openssh/kex.c
1010
ctos = (!kex->server && mode == MODE_OUT) ||
crypto/openssh/kex.c
1011
(kex->server && mode == MODE_IN);
crypto/openssh/kex.c
1017
kex->failed_choice = peer[nenc];
crypto/openssh/kex.c
1026
kex->failed_choice = peer[nmac];
crypto/openssh/kex.c
103
if ((cp = kex_names_cat(kexalgos, ssh->kex->server ?
crypto/openssh/kex.c
1032
kex->failed_choice = peer[ncomp];
crypto/openssh/kex.c
1044
newkeys = kex->newkeys[mode];
crypto/openssh/kex.c
1055
kex->we_need = need;
crypto/openssh/kex.c
1056
kex->dh_need = dh_need;
crypto/openssh/kex.c
1072
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
1080
if ((mdsz = ssh_digest_bytes(kex->hash_alg)) == 0)
crypto/openssh/kex.c
1088
if ((hashctx = ssh_digest_start(kex->hash_alg)) == NULL ||
crypto/openssh/kex.c
1092
ssh_digest_update_buffer(hashctx, kex->session_id) != 0 ||
crypto/openssh/kex.c
1107
if ((hashctx = ssh_digest_start(kex->hash_alg)) == NULL ||
crypto/openssh/kex.c
1137
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
1143
if ((kex->flags & KEX_INITIAL) != 0) {
crypto/openssh/kex.c
1144
if (sshbuf_len(kex->session_id) != 0) {
crypto/openssh/kex.c
1148
if ((r = sshbuf_put(kex->session_id, hash, hashlen)) != 0)
crypto/openssh/kex.c
1150
} else if (sshbuf_len(kex->session_id) == 0) {
crypto/openssh/kex.c
1155
if ((r = derive_key(ssh, 'A'+i, kex->we_need, hash, hashlen,
crypto/openssh/kex.c
1163
ctos = (!kex->server && mode == MODE_OUT) ||
crypto/openssh/kex.c
1164
(kex->server && mode == MODE_IN);
crypto/openssh/kex.c
1165
kex->newkeys[mode]->enc.iv = keys[ctos ? 0 : 1];
crypto/openssh/kex.c
1166
kex->newkeys[mode]->enc.key = keys[ctos ? 2 : 3];
crypto/openssh/kex.c
1167
kex->newkeys[mode]->mac.key = keys[ctos ? 4 : 5];
crypto/openssh/kex.c
1175
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
1179
if (kex->load_host_public_key == NULL ||
crypto/openssh/kex.c
1180
kex->load_host_private_key == NULL) {
crypto/openssh/kex.c
1184
*pubp = kex->load_host_public_key(kex->hostkey_type,
crypto/openssh/kex.c
1185
kex->hostkey_nid, ssh);
crypto/openssh/kex.c
1186
*prvp = kex->load_host_private_key(kex->hostkey_type,
crypto/openssh/kex.c
1187
kex->hostkey_nid, ssh);
crypto/openssh/kex.c
1196
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
1198
if (kex->verify_host_key == NULL) {
crypto/openssh/kex.c
1202
if (server_host_key->type != kex->hostkey_type ||
crypto/openssh/kex.c
1203
(kex->hostkey_type == KEY_ECDSA &&
crypto/openssh/kex.c
1204
server_host_key->ecdsa_nid != kex->hostkey_nid))
crypto/openssh/kex.c
1206
if (kex->verify_host_key(server_host_key, ssh) == -1)
crypto/openssh/kex.c
1229
if (!ssh->kex->server)
crypto/openssh/kex.c
1252
struct sshbuf *our_version = ssh->kex->server ?
crypto/openssh/kex.c
1253
ssh->kex->server_version : ssh->kex->client_version;
crypto/openssh/kex.c
1254
struct sshbuf *peer_version = ssh->kex->server ?
crypto/openssh/kex.c
1255
ssh->kex->client_version : ssh->kex->server_version;
crypto/openssh/kex.c
1368
if (ssh->kex->server) {
crypto/openssh/kex.c
1424
if (ssh->kex->server && (ssh->compat & SSH_BUG_PROBE) != 0) {
crypto/openssh/kex.c
1431
if (ssh->kex->server && (ssh->compat & SSH_BUG_SCANNER) != 0) {
crypto/openssh/kex.c
237
if ((ssh->kex->flags & KEX_INITIAL) && ssh->kex->kex_strict) {
crypto/openssh/kex.c
272
free(ssh->kex->server_sig_algs);
crypto/openssh/kex.c
273
ssh->kex->server_sig_algs = NULL;
crypto/openssh/kex.c
281
if (ssh->kex->server_sig_algs != NULL &&
crypto/openssh/kex.c
282
kex_has_any_alg(sigalg, ssh->kex->server_sig_algs))
crypto/openssh/kex.c
284
xextendf(&ssh->kex->server_sig_algs, ",", "%s", sigalg);
crypto/openssh/kex.c
288
if (ssh->kex->server_sig_algs == NULL)
crypto/openssh/kex.c
289
ssh->kex->server_sig_algs = xstrdup("");
crypto/openssh/kex.c
297
if (ssh->kex->server_sig_algs == NULL &&
crypto/openssh/kex.c
298
(ssh->kex->server_sig_algs = sshkey_alg_list(0, 1, 1, ',')) == NULL)
crypto/openssh/kex.c
302
(r = sshbuf_put_cstring(m, ssh->kex->server_sig_algs)) != 0 ||
crypto/openssh/kex.c
339
if ((ssh->kex->flags & KEX_INITIAL) == 0)
crypto/openssh/kex.c
341
if (!ssh->kex->ext_info_c && !ssh->kex->ext_info_s)
crypto/openssh/kex.c
347
if (ssh->kex->ext_info_c &&
crypto/openssh/kex.c
350
if (ssh->kex->ext_info_s &&
crypto/openssh/kex.c
375
if ((ssh->kex->flags & KEX_HAS_EXT_INFO_IN_AUTH) == 0)
crypto/openssh/kex.c
382
(r = sshpkt_put_cstring(ssh, ssh->kex->server_sig_algs)) != 0 ||
crypto/openssh/kex.c
409
kex_ext_info_check_ver(struct kex *kex, const char *name,
crypto/openssh/kex.c
418
kex->flags |= flag;
crypto/openssh/kex.c
438
free(ssh->kex->server_sig_algs);
crypto/openssh/kex.c
439
ssh->kex->server_sig_algs = xstrdup((const char *)value);
crypto/openssh/kex.c
440
} else if (ssh->kex->ext_info_received == 1 &&
crypto/openssh/kex.c
442
if ((r = kex_ext_info_check_ver(ssh->kex, name, value, vlen,
crypto/openssh/kex.c
446
} else if (ssh->kex->ext_info_received == 1 &&
crypto/openssh/kex.c
448
if ((r = kex_ext_info_check_ver(ssh->kex, name, value, vlen,
crypto/openssh/kex.c
452
} else if (ssh->kex->ext_info_received == 1 &&
crypto/openssh/kex.c
454
if ((r = kex_ext_info_check_ver(ssh->kex, name, value, vlen,
crypto/openssh/kex.c
471
if ((r = kex_ext_info_check_ver(ssh->kex, name, value, vlen,
crypto/openssh/kex.c
483
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
484
const int max_ext_info = kex->server ? 1 : 2;
crypto/openssh/kex.c
492
if (++kex->ext_info_received > max_ext_info) {
crypto/openssh/kex.c
512
if (kex->server) {
crypto/openssh/kex.c
530
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
531
int r, initial = (kex->flags & KEX_INITIAL) != 0;
crypto/openssh/kex.c
535
if (kex->ext_info_c && initial)
crypto/openssh/kex.c
545
if ((r = kex_buf2prop(kex->my, NULL, &prop)) != 0)
crypto/openssh/kex.c
548
kex->server ?
crypto/openssh/kex.c
556
if ((r = kex_prop2buf(ssh->kex->my, prop)) != 0) {
crypto/openssh/kex.c
566
kex->done = 1;
crypto/openssh/kex.c
567
kex->flags &= ~KEX_INITIAL;
crypto/openssh/kex.c
568
sshbuf_reset(kex->peer);
crypto/openssh/kex.c
569
kex->flags &= ~(KEX_INIT_SENT|KEX_INIT_RECVD);
crypto/openssh/kex.c
577
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
580
if (kex == NULL) {
crypto/openssh/kex.c
584
if (kex->flags & KEX_INIT_SENT)
crypto/openssh/kex.c
586
kex->done = 0;
crypto/openssh/kex.c
589
if (sshbuf_len(kex->my) < KEX_COOKIE_LEN) {
crypto/openssh/kex.c
591
sshbuf_len(kex->my), KEX_COOKIE_LEN);
crypto/openssh/kex.c
594
if ((cookie = sshbuf_mutable_ptr(kex->my)) == NULL) {
crypto/openssh/kex.c
601
(r = sshpkt_putb(ssh, kex->my)) != 0 ||
crypto/openssh/kex.c
607
kex->flags |= KEX_INIT_SENT;
crypto/openssh/kex.c
614
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
621
if (kex == NULL) {
crypto/openssh/kex.c
625
free(kex->name);
crypto/openssh/kex.c
626
kex->name = NULL;
crypto/openssh/kex.c
627
if ((kex->flags & KEX_INIT_RECVD) != 0) {
crypto/openssh/kex.c
631
kex->flags |= KEX_INIT_RECVD;
crypto/openssh/kex.c
634
if ((r = sshbuf_put(kex->peer, ptr, dlen)) != 0)
crypto/openssh/kex.c
665
if (!(kex->flags & KEX_INIT_SENT))
crypto/openssh/kex.c
671
if (kex->kex_type < KEX_MAX && kex->kex[kex->kex_type] != NULL)
crypto/openssh/kex.c
672
return (kex->kex[kex->kex_type])(ssh);
crypto/openssh/kex.c
674
error_f("unknown kex type %u", kex->kex_type);
crypto/openssh/kex.c
678
struct kex *
crypto/openssh/kex.c
681
struct kex *kex;
crypto/openssh/kex.c
683
if ((kex = calloc(1, sizeof(*kex))) == NULL ||
crypto/openssh/kex.c
684
(kex->peer = sshbuf_new()) == NULL ||
crypto/openssh/kex.c
685
(kex->my = sshbuf_new()) == NULL ||
crypto/openssh/kex.c
686
(kex->client_version = sshbuf_new()) == NULL ||
crypto/openssh/kex.c
687
(kex->server_version = sshbuf_new()) == NULL ||
crypto/openssh/kex.c
688
(kex->session_id = sshbuf_new()) == NULL) {
crypto/openssh/kex.c
689
kex_free(kex);
crypto/openssh/kex.c
692
return kex;
crypto/openssh/kex.c
726
kex_free(struct kex *kex)
crypto/openssh/kex.c
730
if (kex == NULL)
crypto/openssh/kex.c
734
DH_free(kex->dh);
crypto/openssh/kex.c
736
EC_KEY_free(kex->ec_client_key);
crypto/openssh/kex.c
740
kex_free_newkeys(kex->newkeys[mode]);
crypto/openssh/kex.c
741
kex->newkeys[mode] = NULL;
crypto/openssh/kex.c
743
sshbuf_free(kex->peer);
crypto/openssh/kex.c
744
sshbuf_free(kex->my);
crypto/openssh/kex.c
745
sshbuf_free(kex->client_version);
crypto/openssh/kex.c
746
sshbuf_free(kex->server_version);
crypto/openssh/kex.c
747
sshbuf_free(kex->client_pub);
crypto/openssh/kex.c
748
sshbuf_free(kex->session_id);
crypto/openssh/kex.c
749
sshbuf_free(kex->initial_sig);
crypto/openssh/kex.c
750
sshkey_free(kex->initial_hostkey);
crypto/openssh/kex.c
751
free(kex->failed_choice);
crypto/openssh/kex.c
752
free(kex->hostkey_alg);
crypto/openssh/kex.c
753
free(kex->name);
crypto/openssh/kex.c
754
free(kex->server_sig_algs);
crypto/openssh/kex.c
755
free(kex);
crypto/openssh/kex.c
763
if ((r = kex_prop2buf(ssh->kex->my, proposal)) != 0)
crypto/openssh/kex.c
765
ssh->kex->flags = KEX_INITIAL;
crypto/openssh/kex.c
779
kex_free(ssh->kex);
crypto/openssh/kex.c
780
ssh->kex = NULL;
crypto/openssh/kex.c
793
if (ssh->kex == NULL) {
crypto/openssh/kex.c
797
if (ssh->kex->done == 0) {
crypto/openssh/kex.c
801
ssh->kex->done = 0;
crypto/openssh/kex.c
869
choose_kex(struct kex *k, char *client, char *server)
crypto/openssh/kex.c
887
choose_hostkeyalg(struct kex *k, char *client, char *server)
crypto/openssh/kex.c
93
const char **defprop = ssh->kex->server ? defpropserver : defpropclient;
crypto/openssh/kex.c
938
struct kex *kex = ssh->kex;
crypto/openssh/kex.c
946
debug2("local %s KEXINIT proposal", kex->server ? "server" : "client");
crypto/openssh/kex.c
947
if ((r = kex_buf2prop(kex->my, NULL, &my)) != 0)
crypto/openssh/kex.c
949
debug2("peer %s KEXINIT proposal", kex->server ? "client" : "server");
crypto/openssh/kex.c
950
if ((r = kex_buf2prop(kex->peer, &first_kex_follows, &peer)) != 0)
crypto/openssh/kex.c
953
if (kex->server) {
crypto/openssh/kex.c
962
if ((kex->flags & KEX_INITIAL) != 0) {
crypto/openssh/kex.c
963
if (kex->server) {
crypto/openssh/kex.c
964
kex->ext_info_c = kexalgs_contains(peer, "ext-info-c");
crypto/openssh/kex.c
965
kex->kex_strict = kexalgs_contains(peer,
crypto/openssh/kex.c
968
kex->ext_info_s = kexalgs_contains(peer, "ext-info-s");
crypto/openssh/kex.c
969
kex->kex_strict = kexalgs_contains(peer,
crypto/openssh/kex.c
972
if (kex->kex_strict) {
crypto/openssh/kex.c
982
if (kex->server && (kex->flags & KEX_INITIAL)) {
crypto/openssh/kex.c
985
kex->flags |= KEX_RSA_SHA2_256_SUPPORTED;
crypto/openssh/kex.c
988
kex->flags |= KEX_RSA_SHA2_512_SUPPORTED;
crypto/openssh/kex.c
992
if ((r = choose_kex(kex, cprop[PROPOSAL_KEX_ALGS],
crypto/openssh/kex.c
994
kex->failed_choice = peer[PROPOSAL_KEX_ALGS];
crypto/openssh/kex.c
998
if ((r = choose_hostkeyalg(kex, cprop[PROPOSAL_SERVER_HOST_KEY_ALGS],
crypto/openssh/kex.h
181
int (*kex[KEX_MAX])(struct ssh *);
crypto/openssh/kex.h
210
struct kex *kex_new(void);
crypto/openssh/kex.h
214
void kex_free(struct kex *);
crypto/openssh/kex.h
237
int kex_dh_keypair(struct kex *);
crypto/openssh/kex.h
238
int kex_dh_enc(struct kex *, const struct sshbuf *, struct sshbuf **,
crypto/openssh/kex.h
240
int kex_dh_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
crypto/openssh/kex.h
242
int kex_ecdh_keypair(struct kex *);
crypto/openssh/kex.h
243
int kex_ecdh_enc(struct kex *, const struct sshbuf *, struct sshbuf **,
crypto/openssh/kex.h
245
int kex_ecdh_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
crypto/openssh/kex.h
247
int kex_c25519_keypair(struct kex *);
crypto/openssh/kex.h
248
int kex_c25519_enc(struct kex *, const struct sshbuf *, struct sshbuf **,
crypto/openssh/kex.h
250
int kex_c25519_dec(struct kex *, const struct sshbuf *, struct sshbuf **);
crypto/openssh/kex.h
252
int kex_kem_sntrup761x25519_keypair(struct kex *);
crypto/openssh/kex.h
253
int kex_kem_sntrup761x25519_enc(struct kex *, const struct sshbuf *,
crypto/openssh/kex.h
255
int kex_kem_sntrup761x25519_dec(struct kex *, const struct sshbuf *,
crypto/openssh/kex.h
258
int kex_kem_mlkem768x25519_keypair(struct kex *);
crypto/openssh/kex.h
259
int kex_kem_mlkem768x25519_enc(struct kex *, const struct sshbuf *,
crypto/openssh/kex.h
261
int kex_kem_mlkem768x25519_dec(struct kex *, const struct sshbuf *,
crypto/openssh/kex.h
264
int kex_dh_keygen(struct kex *);
crypto/openssh/kex.h
265
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
113
kex_dh_keypair(struct kex *kex)
crypto/openssh/kexdh.c
119
if ((r = kex_dh_keygen(kex)) != 0)
crypto/openssh/kexdh.c
121
DH_get0_key(kex->dh, &pub_key, NULL);
crypto/openssh/kexdh.c
128
DHparams_print_fp(stderr, kex->dh);
crypto/openssh/kexdh.c
133
kex->client_pub = buf;
crypto/openssh/kexdh.c
141
kex_dh_enc(struct kex *kex, const struct sshbuf *client_blob,
crypto/openssh/kexdh.c
151
if ((r = kex_dh_keygen(kex)) != 0)
crypto/openssh/kexdh.c
153
DH_get0_key(kex->dh, &pub_key, NULL);
crypto/openssh/kexdh.c
161
if ((r = kex_dh_dec(kex, client_blob, shared_secretp)) != 0)
crypto/openssh/kexdh.c
166
DH_free(kex->dh);
crypto/openssh/kexdh.c
167
kex->dh = NULL;
crypto/openssh/kexdh.c
173
kex_dh_dec(struct kex *kex, const struct sshbuf *dh_blob,
crypto/openssh/kexdh.c
190
if ((r = kex_dh_compute_key(kex, dh_pub, buf)) != 0)
crypto/openssh/kexdh.c
196
DH_free(kex->dh);
crypto/openssh/kexdh.c
197
kex->dh = NULL;
crypto/openssh/kexdh.c
46
kex_dh_keygen(struct kex *kex)
crypto/openssh/kexdh.c
48
switch (kex->kex_type) {
crypto/openssh/kexdh.c
50
kex->dh = dh_new_group1();
crypto/openssh/kexdh.c
54
kex->dh = dh_new_group14();
crypto/openssh/kexdh.c
57
kex->dh = dh_new_group16();
crypto/openssh/kexdh.c
60
kex->dh = dh_new_group18();
crypto/openssh/kexdh.c
65
if (kex->dh == NULL)
crypto/openssh/kexdh.c
67
return (dh_gen_key(kex->dh, kex->we_need * 8));
crypto/openssh/kexdh.c
71
kex_dh_compute_key(struct kex *kex, BIGNUM *dh_pub, struct sshbuf *out)
crypto/openssh/kexdh.c
83
DHparams_print_fp(stderr, kex->dh);
crypto/openssh/kexdh.c
87
if (!dh_pub_is_valid(kex->dh, dh_pub)) {
crypto/openssh/kexdh.c
91
klen = DH_size(kex->dh);
crypto/openssh/kexdh.c
97
if ((kout = DH_compute_key(kbuf, dh_pub, kex->dh)) < 0 ||
crypto/openssh/kexecdh.c
103
if ((server_key = EC_KEY_new_by_curve_name(kex->ec_nid)) == NULL) {
crypto/openssh/kexecdh.c
125
if ((r = kex_ecdh_dec_key_group(kex, client_blob, server_key, group,
crypto/openssh/kexecdh.c
137
kex_ecdh_dec_key_group(struct kex *kex, const struct sshbuf *ec_blob,
crypto/openssh/kexecdh.c
199
kex_ecdh_dec(struct kex *kex, const struct sshbuf *server_blob,
crypto/openssh/kexecdh.c
204
r = kex_ecdh_dec_key_group(kex, server_blob, kex->ec_client_key,
crypto/openssh/kexecdh.c
205
kex->ec_group, shared_secretp);
crypto/openssh/kexecdh.c
206
EC_KEY_free(kex->ec_client_key);
crypto/openssh/kexecdh.c
207
kex->ec_client_key = NULL;
crypto/openssh/kexecdh.c
215
struct kex;
crypto/openssh/kexecdh.c
220
kex_ecdh_keypair(struct kex *kex)
crypto/openssh/kexecdh.c
226
kex_ecdh_enc(struct kex *kex, const struct sshbuf *client_blob,
crypto/openssh/kexecdh.c
233
kex_ecdh_dec(struct kex *kex, const struct sshbuf *server_blob,
crypto/openssh/kexecdh.c
45
kex_ecdh_dec_key_group(struct kex *, const struct sshbuf *, EC_KEY *key,
crypto/openssh/kexecdh.c
49
kex_ecdh_keypair(struct kex *kex)
crypto/openssh/kexecdh.c
57
if ((client_key = EC_KEY_new_by_curve_name(kex->ec_nid)) == NULL) {
crypto/openssh/kexecdh.c
79
kex->ec_client_key = client_key;
crypto/openssh/kexecdh.c
80
kex->ec_group = group;
crypto/openssh/kexecdh.c
82
kex->client_pub = buf;
crypto/openssh/kexecdh.c
91
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
109
(u_int)bits < kex->min || (u_int)bits > kex->max) {
crypto/openssh/kexgexc.c
113
if ((kex->dh = dh_new_group(g, p)) == NULL) {
crypto/openssh/kexgexc.c
120
if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0)
crypto/openssh/kexgexc.c
122
DH_get0_key(kex->dh, &pub_key, NULL);
crypto/openssh/kexgexc.c
129
DHparams_print_fp(stderr, kex->dh);
crypto/openssh/kexgexc.c
146
struct kex *kex = ssh->kex;
crypto/openssh/kexgexc.c
180
if ((r = kex_dh_compute_key(kex, dh_server_pub, shared_secret)) != 0)
crypto/openssh/kexgexc.c
183
kex->min = kex->max = -1;
crypto/openssh/kexgexc.c
186
DH_get0_key(kex->dh, &pub_key, NULL);
crypto/openssh/kexgexc.c
187
DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g);
crypto/openssh/kexgexc.c
190
kex->hash_alg,
crypto/openssh/kexgexc.c
191
kex->client_version,
crypto/openssh/kexgexc.c
192
kex->server_version,
crypto/openssh/kexgexc.c
193
kex->my,
crypto/openssh/kexgexc.c
194
kex->peer,
crypto/openssh/kexgexc.c
196
kex->min, kex->nbits, kex->max,
crypto/openssh/kexgexc.c
205
hashlen, kex->hostkey_alg, ssh->compat, NULL)) != 0)
crypto/openssh/kexgexc.c
213
if ((kex->flags & KEX_INITIAL) != 0) {
crypto/openssh/kexgexc.c
214
if (kex->initial_hostkey != NULL || kex->initial_sig != NULL) {
crypto/openssh/kexgexc.c
218
if ((kex->initial_sig = sshbuf_new()) == NULL) {
crypto/openssh/kexgexc.c
222
if ((r = sshbuf_put(kex->initial_sig, signature, slen)) != 0)
crypto/openssh/kexgexc.c
224
kex->initial_hostkey = server_host_key;
crypto/openssh/kexgexc.c
230
DH_free(kex->dh);
crypto/openssh/kexgexc.c
231
kex->dh = NULL;
crypto/openssh/kexgexc.c
61
struct kex *kex = ssh->kex;
crypto/openssh/kexgexc.c
65
nbits = dh_estimate(kex->dh_need * 8);
crypto/openssh/kexgexc.c
67
kex->min = DH_GRP_MIN;
crypto/openssh/kexgexc.c
68
kex->max = DH_GRP_MAX;
crypto/openssh/kexgexc.c
69
kex->nbits = nbits;
crypto/openssh/kexgexc.c
71
kex->nbits = MINIMUM(kex->nbits, 4096);
crypto/openssh/kexgexc.c
74
(r = sshpkt_put_u32(ssh, kex->min)) != 0 ||
crypto/openssh/kexgexc.c
75
(r = sshpkt_put_u32(ssh, kex->nbits)) != 0 ||
crypto/openssh/kexgexc.c
76
(r = sshpkt_put_u32(ssh, kex->max)) != 0 ||
crypto/openssh/kexgexc.c
80
kex->min, kex->nbits, kex->max);
crypto/openssh/kexgexc.c
83
kex->min, kex->nbits, kex->max);
crypto/openssh/kexgexc.c
96
struct kex *kex = ssh->kex;
crypto/openssh/kexgexs.c
100
kex->dh = mm_choose_dh(min, nbits, max);
crypto/openssh/kexgexs.c
101
if (kex->dh == NULL) {
crypto/openssh/kexgexs.c
107
DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g);
crypto/openssh/kexgexs.c
115
if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0)
crypto/openssh/kexgexs.c
128
struct kex *kex = ssh->kex;
crypto/openssh/kexgexs.c
154
if ((r = kex_dh_compute_key(kex, dh_client_pub, shared_secret)) != 0)
crypto/openssh/kexgexs.c
164
DH_get0_key(kex->dh, &pub_key, NULL);
crypto/openssh/kexgexs.c
165
DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g);
crypto/openssh/kexgexs.c
168
kex->hash_alg,
crypto/openssh/kexgexs.c
169
kex->client_version,
crypto/openssh/kexgexs.c
170
kex->server_version,
crypto/openssh/kexgexs.c
171
kex->peer,
crypto/openssh/kexgexs.c
172
kex->my,
crypto/openssh/kexgexs.c
174
kex->min, kex->nbits, kex->max,
crypto/openssh/kexgexs.c
183
if ((r = kex->sign(ssh, server_host_private, server_host_public,
crypto/openssh/kexgexs.c
184
&signature, &slen, hash, hashlen, kex->hostkey_alg)) < 0)
crypto/openssh/kexgexs.c
200
if (kex->initial_hostkey == NULL &&
crypto/openssh/kexgexs.c
202
&kex->initial_hostkey)) != 0)
crypto/openssh/kexgexs.c
207
DH_free(kex->dh);
crypto/openssh/kexgexs.c
208
kex->dh = NULL;
crypto/openssh/kexgexs.c
72
struct kex *kex = ssh->kex;
crypto/openssh/kexgexs.c
85
kex->nbits = nbits;
crypto/openssh/kexgexs.c
86
kex->min = min;
crypto/openssh/kexgexs.c
87
kex->max = max;
crypto/openssh/kexgexs.c
93
if (kex->max < kex->min || kex->nbits < kex->min ||
crypto/openssh/kexgexs.c
94
kex->max < kex->nbits || kex->max < DH_GRP_MIN) {
crypto/openssh/kexmlkem768x25519.c
142
if ((r = ssh_digest_buffer(kex->hash_alg, buf,
crypto/openssh/kexmlkem768x25519.c
155
ssh_digest_bytes(kex->hash_alg))) != 0)
crypto/openssh/kexmlkem768x25519.c
176
kex_kem_mlkem768x25519_dec(struct kex *kex,
crypto/openssh/kexmlkem768x25519.c
206
kex->mlkem768_client_key) != 0) {
crypto/openssh/kexmlkem768x25519.c
212
if ((r = kexc25519_shared_key_ext(kex->c25519_client_key, server_pub,
crypto/openssh/kexmlkem768x25519.c
215
if ((r = ssh_digest_buffer(kex->hash_alg, buf,
crypto/openssh/kexmlkem768x25519.c
225
ssh_digest_bytes(kex->hash_alg))) != 0)
crypto/openssh/kexmlkem768x25519.c
242
kex_kem_mlkem768x25519_keypair(struct kex *kex)
crypto/openssh/kexmlkem768x25519.c
248
kex_kem_mlkem768x25519_enc(struct kex *kex,
crypto/openssh/kexmlkem768x25519.c
256
kex_kem_mlkem768x25519_dec(struct kex *kex,
crypto/openssh/kexmlkem768x25519.c
49
kex_kem_mlkem768x25519_keypair(struct kex *kex)
crypto/openssh/kexmlkem768x25519.c
61
if (crypto_kem_mlkem768_keypair(cp, kex->mlkem768_client_key) != 0) {
crypto/openssh/kexmlkem768x25519.c
70
kexc25519_keygen(kex->c25519_client_key, cp);
crypto/openssh/kexmlkem768x25519.c
76
kex->client_pub = buf;
crypto/openssh/kexmlkem768x25519.c
84
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
1849
struct kex *kex;
crypto/openssh/monitor.c
1857
if ((kex = ssh->kex) == NULL)
crypto/openssh/monitor.c
1859
if (session_id2_len != sshbuf_len(ssh->kex->session_id)) {
crypto/openssh/monitor.c
1861
sshbuf_len(ssh->kex->session_id), session_id2_len);
crypto/openssh/monitor.c
1863
if (memcmp(sshbuf_ptr(ssh->kex->session_id), session_id2,
crypto/openssh/monitor.c
1868
kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server;
crypto/openssh/monitor.c
1869
kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server;
crypto/openssh/monitor.c
1870
kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_server;
crypto/openssh/monitor.c
1871
kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_server;
crypto/openssh/monitor.c
1872
kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_server;
crypto/openssh/monitor.c
1873
kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
crypto/openssh/monitor.c
1874
kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
crypto/openssh/monitor.c
1876
kex->kex[KEX_ECDH_SHA2] = kex_gen_server;
crypto/openssh/monitor.c
1879
kex->kex[KEX_C25519_SHA256] = kex_gen_server;
crypto/openssh/monitor.c
1880
kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_server;
crypto/openssh/monitor.c
1881
kex->kex[KEX_KEM_MLKEM768X25519_SHA256] = kex_gen_server;
crypto/openssh/monitor.c
1882
kex->load_host_public_key=&get_hostkey_public_by_type;
crypto/openssh/monitor.c
1883
kex->load_host_private_key=&get_hostkey_private_by_type;
crypto/openssh/monitor.c
1884
kex->host_key_index=&get_hostkey_index;
crypto/openssh/monitor.c
1885
kex->sign = sshd_hostkey_sign;
crypto/openssh/monitor.c
641
(r = sshbuf_put_stringb(m, ssh->kex->server_version)) != 0 ||
crypto/openssh/monitor.c
642
(r = sshbuf_put_stringb(m, ssh->kex->client_version)) != 0)
crypto/openssh/monitor.h
78
struct kex **m_pkex;
crypto/openssh/monitor_wrap.c
877
(r = sshbuf_get_stringb(m, ssh->kex->server_version)) != 0 ||
crypto/openssh/monitor_wrap.c
878
(r = sshbuf_get_stringb(m, ssh->kex->client_version)) != 0)
crypto/openssh/packet.c
1017
if ((state->newkeys[mode] = ssh->kex->newkeys[mode]) == NULL)
crypto/openssh/packet.c
1019
ssh->kex->newkeys[mode] = NULL;
crypto/openssh/packet.c
1364
if ((ssh->kex->flags & KEX_INITIAL) != 0) {
crypto/openssh/packet.c
1376
if (type == SSH2_MSG_NEWKEYS && ssh->kex->kex_strict) {
crypto/openssh/packet.c
1593
if (ssh->kex)
crypto/openssh/packet.c
1779
if ((ssh->kex->flags & KEX_INITIAL) != 0) {
crypto/openssh/packet.c
1849
if (*typep == SSH2_MSG_NEWKEYS && ssh->kex->kex_strict) {
crypto/openssh/packet.c
1904
if (ssh->kex != NULL &&
crypto/openssh/packet.c
1905
(ssh->kex->flags & KEX_INITIAL) && ssh->kex->kex_strict)
crypto/openssh/packet.c
1952
if (ssh->kex != NULL &&
crypto/openssh/packet.c
1953
(ssh->kex->flags & KEX_INIT_RECVD) != 0 &&
crypto/openssh/packet.c
2095
if (ssh->kex && ssh->kex->failed_choice) {
crypto/openssh/packet.c
2100
ssh->kex->failed_choice);
crypto/openssh/packet.c
2379
ssh->kex->server = 1; /* XXX unify? */
crypto/openssh/packet.c
2419
kex_to_blob(struct sshbuf *m, struct kex *kex)
crypto/openssh/packet.c
2423
if ((r = sshbuf_put_u32(m, kex->we_need)) != 0 ||
crypto/openssh/packet.c
2424
(r = sshbuf_put_cstring(m, kex->hostkey_alg)) != 0 ||
crypto/openssh/packet.c
2425
(r = sshbuf_put_u32(m, kex->hostkey_type)) != 0 ||
crypto/openssh/packet.c
2426
(r = sshbuf_put_u32(m, kex->hostkey_nid)) != 0 ||
crypto/openssh/packet.c
2427
(r = sshbuf_put_u32(m, kex->kex_type)) != 0 ||
crypto/openssh/packet.c
2428
(r = sshbuf_put_u32(m, kex->kex_strict)) != 0 ||
crypto/openssh/packet.c
2429
(r = sshbuf_put_stringb(m, kex->my)) != 0 ||
crypto/openssh/packet.c
243
(ssh->kex = kex_new()) == NULL ||
crypto/openssh/packet.c
2430
(r = sshbuf_put_stringb(m, kex->peer)) != 0 ||
crypto/openssh/packet.c
2431
(r = sshbuf_put_stringb(m, kex->client_version)) != 0 ||
crypto/openssh/packet.c
2432
(r = sshbuf_put_stringb(m, kex->server_version)) != 0 ||
crypto/openssh/packet.c
2433
(r = sshbuf_put_stringb(m, kex->session_id)) != 0 ||
crypto/openssh/packet.c
2434
(r = sshbuf_put_u32(m, kex->flags)) != 0)
crypto/openssh/packet.c
2491
if ((r = kex_to_blob(m, ssh->kex)) != 0 ||
crypto/openssh/packet.c
2579
ssh->kex->newkeys[mode] = newkey;
crypto/openssh/packet.c
2590
kex_from_blob(struct sshbuf *m, struct kex **kexp)
crypto/openssh/packet.c
2592
struct kex *kex;
crypto/openssh/packet.c
2595
if ((kex = kex_new()) == NULL)
crypto/openssh/packet.c
2597
if ((r = sshbuf_get_u32(m, &kex->we_need)) != 0 ||
crypto/openssh/packet.c
2598
(r = sshbuf_get_cstring(m, &kex->hostkey_alg, NULL)) != 0 ||
crypto/openssh/packet.c
2599
(r = sshbuf_get_u32(m, (u_int *)&kex->hostkey_type)) != 0 ||
crypto/openssh/packet.c
2600
(r = sshbuf_get_u32(m, (u_int *)&kex->hostkey_nid)) != 0 ||
crypto/openssh/packet.c
2601
(r = sshbuf_get_u32(m, &kex->kex_type)) != 0 ||
crypto/openssh/packet.c
2602
(r = sshbuf_get_u32(m, &kex->kex_strict)) != 0 ||
crypto/openssh/packet.c
2603
(r = sshbuf_get_stringb(m, kex->my)) != 0 ||
crypto/openssh/packet.c
2604
(r = sshbuf_get_stringb(m, kex->peer)) != 0 ||
crypto/openssh/packet.c
2605
(r = sshbuf_get_stringb(m, kex->client_version)) != 0 ||
crypto/openssh/packet.c
2606
(r = sshbuf_get_stringb(m, kex->server_version)) != 0 ||
crypto/openssh/packet.c
2607
(r = sshbuf_get_stringb(m, kex->session_id)) != 0 ||
crypto/openssh/packet.c
2608
(r = sshbuf_get_u32(m, &kex->flags)) != 0)
crypto/openssh/packet.c
2610
if (kex->we_need > 1024) {
crypto/openssh/packet.c
2614
kex->server = 1;
crypto/openssh/packet.c
2615
kex->done = 1;
crypto/openssh/packet.c
2619
kex_free(kex);
crypto/openssh/packet.c
2624
*kexp = kex;
crypto/openssh/packet.c
2642
if ((r = kex_from_blob(m, &ssh->kex)) != 0 ||
crypto/openssh/packet.c
269
kex_free(ssh->kex);
crypto/openssh/packet.c
2877
if (ssh->kex)
crypto/openssh/packet.c
294
(ssh->kex != NULL && ssh->kex->done == 0);
crypto/openssh/packet.c
3044
struct kex *kex;
crypto/openssh/packet.c
3053
kex = ssh->kex;
crypto/openssh/packet.c
3114
kex->name, kex->hostkey_alg,
crypto/openssh/packet.c
359
kex_free(ssh->kex);
crypto/openssh/packet.c
360
ssh->kex = NULL;
crypto/openssh/packet.c
753
kex_free(ssh->kex);
crypto/openssh/packet.c
754
ssh->kex = NULL;
crypto/openssh/packet.c
969
if (ssh->kex && ssh->kex->newkeys[mode]) {
crypto/openssh/packet.c
970
kex_free_newkeys(ssh->kex->newkeys[mode]);
crypto/openssh/packet.c
971
ssh->kex->newkeys[mode] = NULL;
crypto/openssh/packet.h
43
struct kex;
crypto/openssh/packet.h
60
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
103
if (kex != NULL)
crypto/openssh/regress/unittests/kex/test_kex.c
104
kex_params.proposal[PROPOSAL_KEX_ALGS] = kex;
crypto/openssh/regress/unittests/kex/test_kex.c
156
ASSERT_PTR_NE(server2->kex, NULL);
crypto/openssh/regress/unittests/kex/test_kex.c
159
server2->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server;
crypto/openssh/regress/unittests/kex/test_kex.c
160
server2->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server;
crypto/openssh/regress/unittests/kex/test_kex.c
161
server2->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
crypto/openssh/regress/unittests/kex/test_kex.c
162
server2->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
crypto/openssh/regress/unittests/kex/test_kex.c
163
server2->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_server;
crypto/openssh/regress/unittests/kex/test_kex.c
164
server2->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_server;
crypto/openssh/regress/unittests/kex/test_kex.c
165
server2->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_server;
crypto/openssh/regress/unittests/kex/test_kex.c
167
server2->kex->kex[KEX_ECDH_SHA2] = kex_gen_server;
crypto/openssh/regress/unittests/kex/test_kex.c
170
server2->kex->kex[KEX_C25519_SHA256] = kex_gen_server;
crypto/openssh/regress/unittests/kex/test_kex.c
171
server2->kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_server;
crypto/openssh/regress/unittests/kex/test_kex.c
172
server2->kex->kex[KEX_KEM_MLKEM768X25519_SHA256] = kex_gen_server;
crypto/openssh/regress/unittests/kex/test_kex.c
173
server2->kex->load_host_public_key = server->kex->load_host_public_key;
crypto/openssh/regress/unittests/kex/test_kex.c
174
server2->kex->load_host_private_key = server->kex->load_host_private_key;
crypto/openssh/regress/unittests/kex/test_kex.c
175
server2->kex->sign = server->kex->sign;
crypto/openssh/regress/unittests/kex/test_kex.c
197
do_kex(char *kex)
crypto/openssh/regress/unittests/kex/test_kex.c
203
snprintf(name, sizeof(name), "generate %s", kex);
crypto/openssh/regress/unittests/kex/test_kex.c
207
snprintf(name, sizeof(name), "KEX %s", kex);
crypto/openssh/regress/unittests/kex/test_kex.c
213
do_kex_with_key(kex, "aes128-ctr", "hmac-sha2-256", key,
crypto/openssh/regress/unittests/kex/test_kex.c
221
do_kex_with_key(kex, NULL, NULL, NULL, KEY_RSA, 2048);
crypto/openssh/regress/unittests/kex/test_kex.c
223
do_kex_with_key(kex, NULL, NULL, NULL, KEY_ECDSA, 256);
crypto/openssh/regress/unittests/kex/test_kex.c
226
do_kex_with_key(kex, NULL, NULL, NULL, KEY_ED25519, 256);
crypto/openssh/regress/unittests/kex/test_kex.c
60
while (!server->kex->done || !client->kex->done) {
crypto/openssh/regress/unittests/kex/test_kex.c
73
ASSERT_INT_EQ(server->kex->done, 1);
crypto/openssh/regress/unittests/kex/test_kex.c
74
ASSERT_INT_EQ(client->kex->done, 1);
crypto/openssh/regress/unittests/kex/test_kex.c
78
do_kex_with_key(char *kex, char *cipher, char *mac,
crypto/openssh/regress/unittests/kex/test_proposal.c
100
ssh.kex = &kex;
crypto/openssh/regress/unittests/kex/test_proposal.c
103
kex.server = i;
crypto/openssh/regress/unittests/kex/test_proposal.c
93
struct kex kex;
crypto/openssh/serverloop.c
684
ssh->kex->hostkey_alg)) == KEY_RSA)
crypto/openssh/serverloop.c
685
kex_rsa_sigalg = ssh->kex->hostkey_alg;
crypto/openssh/serverloop.c
698
if ((ndx = ssh->kex->host_key_index(key, 1, ssh)) == -1) {
crypto/openssh/serverloop.c
722
else if (ssh->kex->flags & KEX_RSA_SHA2_512_SUPPORTED)
crypto/openssh/serverloop.c
724
else if (ssh->kex->flags & KEX_RSA_SHA2_256_SUPPORTED)
crypto/openssh/serverloop.c
733
ssh->kex->session_id)) != 0 ||
crypto/openssh/serverloop.c
735
(r = ssh->kex->sign(ssh, key_prv, key_pub, &sig, &slen,
crypto/openssh/ssh-keyscan.c
286
c->c_ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_client;
crypto/openssh/ssh-keyscan.c
287
c->c_ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_client;
crypto/openssh/ssh-keyscan.c
288
c->c_ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_client;
crypto/openssh/ssh-keyscan.c
289
c->c_ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_client;
crypto/openssh/ssh-keyscan.c
290
c->c_ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_client;
crypto/openssh/ssh-keyscan.c
291
c->c_ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
crypto/openssh/ssh-keyscan.c
292
c->c_ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
crypto/openssh/ssh-keyscan.c
294
c->c_ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_client;
crypto/openssh/ssh-keyscan.c
297
c->c_ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_client;
crypto/openssh/ssh-keyscan.c
298
c->c_ssh->kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_client;
crypto/openssh/ssh-keyscan.c
299
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/sshconnect.c
1671
if (!options.kex_algorithms_set && ssh->kex != NULL &&
crypto/openssh/sshconnect.c
1672
ssh->kex->name != NULL && options.warn_weak_crypto &&
crypto/openssh/sshconnect.c
1673
!kex_is_pq_from_name(ssh->kex->name))
crypto/openssh/sshconnect2.c
1172
if (ssh == NULL || ssh->kex->server_sig_algs == NULL ||
crypto/openssh/sshconnect2.c
1184
server_sig_algs = ssh->kex->server_sig_algs;
crypto/openssh/sshconnect2.c
1331
if ((ssh->kex->flags & KEX_HAS_PUBKEY_HOSTBOUND) != 0 &&
crypto/openssh/sshconnect2.c
1410
if ((r = sshbuf_putb(b, ssh->kex->session_id)) != 0)
crypto/openssh/sshconnect2.c
1414
ssh->kex->session_id)) != 0)
crypto/openssh/sshconnect2.c
1428
if (ssh->kex->initial_hostkey == NULL) {
crypto/openssh/sshconnect2.c
1432
if ((r = sshkey_puts(ssh->kex->initial_hostkey, b)) != 0)
crypto/openssh/sshconnect2.c
1653
if ((r = ssh_agent_bind_hostkey(agent_fd, ssh->kex->initial_hostkey,
crypto/openssh/sshconnect2.c
1654
ssh->kex->session_id, ssh->kex->initial_sig, 0)) == 0)
crypto/openssh/sshconnect2.c
1815
} else if (ssh->kex->server_sig_algs != NULL &&
crypto/openssh/sshconnect2.c
2228
if ((r = sshbuf_put_stringb(b, ssh->kex->session_id)) != 0 ||
crypto/openssh/sshconnect2.c
267
ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_client;
crypto/openssh/sshconnect2.c
268
ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_client;
crypto/openssh/sshconnect2.c
269
ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_client;
crypto/openssh/sshconnect2.c
270
ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_client;
crypto/openssh/sshconnect2.c
271
ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_client;
crypto/openssh/sshconnect2.c
272
ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
crypto/openssh/sshconnect2.c
273
ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
crypto/openssh/sshconnect2.c
275
ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_client;
crypto/openssh/sshconnect2.c
278
ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_client;
crypto/openssh/sshconnect2.c
279
ssh->kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_client;
crypto/openssh/sshconnect2.c
280
ssh->kex->kex[KEX_KEM_MLKEM768X25519_SHA256] = kex_gen_client;
crypto/openssh/sshconnect2.c
281
ssh->kex->verify_host_key=&verify_host_key_callback;
crypto/openssh/sshconnect2.c
283
ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &ssh->kex->done);
crypto/openssh/sshconnect2.c
516
ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, ssh->kex->ext_info_s ?
crypto/openssh/sshconnect2.c
865
ssh->kex->session_id);
crypto/openssh/sshd-auth.c
612
pmonitor->m_pkex = &ssh->kex;
crypto/openssh/sshd-auth.c
773
struct kex *kex;
crypto/openssh/sshd-auth.c
803
kex = ssh->kex;
crypto/openssh/sshd-auth.c
806
kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server;
crypto/openssh/sshd-auth.c
807
kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server;
crypto/openssh/sshd-auth.c
808
kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_server;
crypto/openssh/sshd-auth.c
809
kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_server;
crypto/openssh/sshd-auth.c
810
kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_server;
crypto/openssh/sshd-auth.c
811
kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
crypto/openssh/sshd-auth.c
812
kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
crypto/openssh/sshd-auth.c
814
kex->kex[KEX_ECDH_SHA2] = kex_gen_server;
crypto/openssh/sshd-auth.c
817
kex->kex[KEX_C25519_SHA256] = kex_gen_server;
crypto/openssh/sshd-auth.c
818
kex->kex[KEX_KEM_SNTRUP761X25519_SHA512] = kex_gen_server;
crypto/openssh/sshd-auth.c
819
kex->kex[KEX_KEM_MLKEM768X25519_SHA256] = kex_gen_server;
crypto/openssh/sshd-auth.c
820
kex->load_host_public_key=&get_hostkey_public_by_type;
crypto/openssh/sshd-auth.c
821
kex->load_host_private_key=&get_hostkey_private_by_type;
crypto/openssh/sshd-auth.c
822
kex->host_key_index=&get_hostkey_index;
crypto/openssh/sshd-auth.c
823
kex->sign = sshd_hostkey_sign;
crypto/openssh/sshd-auth.c
825
ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &kex->done);
crypto/openssh/sshd-session.c
312
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);