summaryrefslogtreecommitdiff
path: root/regress/unittests/kex/test_kex.c
diff options
context:
space:
mode:
Diffstat (limited to 'regress/unittests/kex/test_kex.c')
-rw-r--r--regress/unittests/kex/test_kex.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/regress/unittests/kex/test_kex.c b/regress/unittests/kex/test_kex.c
index d5edf7ed4..c61e2bdbb 100644
--- a/regress/unittests/kex/test_kex.c
+++ b/regress/unittests/kex/test_kex.c
@@ -145,7 +145,9 @@ do_kex_with_key(char *kex, int keytype, int bits)
145 server2->kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; 145 server2->kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server;
146 server2->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; 146 server2->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
147 server2->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; 147 server2->kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
148#ifdef OPENSSL_HAS_ECC
148 server2->kex->kex[KEX_ECDH_SHA2] = kexecdh_server; 149 server2->kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
150#endif
149 server2->kex->kex[KEX_C25519_SHA256] = kexc25519_server; 151 server2->kex->kex[KEX_C25519_SHA256] = kexc25519_server;
150 server2->kex->load_host_public_key = server->kex->load_host_public_key; 152 server2->kex->load_host_public_key = server->kex->load_host_public_key;
151 server2->kex->load_host_private_key = server->kex->load_host_private_key; 153 server2->kex->load_host_private_key = server->kex->load_host_private_key;
@@ -173,7 +175,9 @@ do_kex(char *kex)
173{ 175{
174 do_kex_with_key(kex, KEY_RSA, 2048); 176 do_kex_with_key(kex, KEY_RSA, 2048);
175 do_kex_with_key(kex, KEY_DSA, 1024); 177 do_kex_with_key(kex, KEY_DSA, 1024);
178#ifdef OPENSSL_HAS_ECC
176 do_kex_with_key(kex, KEY_ECDSA, 256); 179 do_kex_with_key(kex, KEY_ECDSA, 256);
180#endif
177 do_kex_with_key(kex, KEY_ED25519, 256); 181 do_kex_with_key(kex, KEY_ED25519, 256);
178} 182}
179 183
@@ -181,9 +185,11 @@ void
181kex_tests(void) 185kex_tests(void)
182{ 186{
183 do_kex("curve25519-sha256@libssh.org"); 187 do_kex("curve25519-sha256@libssh.org");
188#ifdef OPENSSL_HAS_ECC
184 do_kex("ecdh-sha2-nistp256"); 189 do_kex("ecdh-sha2-nistp256");
185 do_kex("ecdh-sha2-nistp384"); 190 do_kex("ecdh-sha2-nistp384");
186 do_kex("ecdh-sha2-nistp521"); 191 do_kex("ecdh-sha2-nistp521");
192#endif
187 do_kex("diffie-hellman-group-exchange-sha256"); 193 do_kex("diffie-hellman-group-exchange-sha256");
188 do_kex("diffie-hellman-group-exchange-sha1"); 194 do_kex("diffie-hellman-group-exchange-sha1");
189 do_kex("diffie-hellman-group14-sha1"); 195 do_kex("diffie-hellman-group14-sha1");