diff options
Diffstat (limited to 'ssh_api.c')
-rw-r--r-- | ssh_api.c | 34 |
1 files changed, 17 insertions, 17 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh_api.c,v 1.14 2019/01/21 10:29:56 djm Exp $ */ | 1 | /* $OpenBSD: ssh_api.c,v 1.15 2019/01/21 10:38:54 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2012 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2012 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -99,37 +99,37 @@ ssh_init(struct ssh **sshp, int is_server, struct kex_params *kex_params) | |||
99 | ssh->kex->server = is_server; | 99 | ssh->kex->server = is_server; |
100 | if (is_server) { | 100 | if (is_server) { |
101 | #ifdef WITH_OPENSSL | 101 | #ifdef WITH_OPENSSL |
102 | ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_kem_server; | 102 | ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server; |
103 | ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_kem_server; | 103 | ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server; |
104 | ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_kem_server; | 104 | ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_server; |
105 | ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_kem_server; | 105 | ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_server; |
106 | ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_kem_server; | 106 | ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_server; |
107 | ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; | 107 | ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; |
108 | ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; | 108 | ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; |
109 | # ifdef OPENSSL_HAS_ECC | 109 | # ifdef OPENSSL_HAS_ECC |
110 | ssh->kex->kex[KEX_ECDH_SHA2] = kex_kem_server; | 110 | ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_server; |
111 | # endif | 111 | # endif |
112 | #endif /* WITH_OPENSSL */ | 112 | #endif /* WITH_OPENSSL */ |
113 | ssh->kex->kex[KEX_C25519_SHA256] = kex_kem_server; | 113 | ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_server; |
114 | ssh->kex->kex[KEX_KEM_SNTRUP4591761X25519_SHA512] = kex_kem_server; | 114 | ssh->kex->kex[KEX_KEM_SNTRUP4591761X25519_SHA512] = kex_gen_server; |
115 | ssh->kex->load_host_public_key=&_ssh_host_public_key; | 115 | ssh->kex->load_host_public_key=&_ssh_host_public_key; |
116 | ssh->kex->load_host_private_key=&_ssh_host_private_key; | 116 | ssh->kex->load_host_private_key=&_ssh_host_private_key; |
117 | ssh->kex->sign=&_ssh_host_key_sign; | 117 | ssh->kex->sign=&_ssh_host_key_sign; |
118 | } else { | 118 | } else { |
119 | #ifdef WITH_OPENSSL | 119 | #ifdef WITH_OPENSSL |
120 | ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_kem_client; | 120 | ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_client; |
121 | ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_kem_client; | 121 | ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_client; |
122 | ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_kem_client; | 122 | ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_client; |
123 | ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_kem_client; | 123 | ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_client; |
124 | ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_kem_client; | 124 | ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_client; |
125 | ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; | 125 | ssh->kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; |
126 | ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_client; | 126 | ssh->kex->kex[KEX_DH_GEX_SHA256] = kexgex_client; |
127 | # ifdef OPENSSL_HAS_ECC | 127 | # ifdef OPENSSL_HAS_ECC |
128 | ssh->kex->kex[KEX_ECDH_SHA2] = kex_kem_client; | 128 | ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_client; |
129 | # endif | 129 | # endif |
130 | #endif /* WITH_OPENSSL */ | 130 | #endif /* WITH_OPENSSL */ |
131 | ssh->kex->kex[KEX_C25519_SHA256] = kex_kem_client; | 131 | ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_client; |
132 | ssh->kex->kex[KEX_KEM_SNTRUP4591761X25519_SHA512] = kex_kem_client; | 132 | ssh->kex->kex[KEX_KEM_SNTRUP4591761X25519_SHA512] = kex_gen_client; |
133 | ssh->kex->verify_host_key =&_ssh_verify_host_key; | 133 | ssh->kex->verify_host_key =&_ssh_verify_host_key; |
134 | } | 134 | } |
135 | *sshp = ssh; | 135 | *sshp = ssh; |