diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2018-11-06 16:39:08 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-01-24 11:56:23 +0100 |
commit | 31da8025b2a138be823194866581741c568f44fe (patch) | |
tree | 8c8382264df32986f219c45f8350468443519fdb /tests/client | |
parent | 574bfb54595870033af2927c692af5f0afd3073c (diff) | |
download | libssh-31da8025b2a138be823194866581741c568f44fe.tar.gz libssh-31da8025b2a138be823194866581741c568f44fe.tar.xz libssh-31da8025b2a138be823194866581741c568f44fe.zip |
tests: Add dh-group-exchange algorithm tests
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'tests/client')
-rw-r--r-- | tests/client/torture_algorithms.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/client/torture_algorithms.c b/tests/client/torture_algorithms.c index d327d046..097e3c3c 100644 --- a/tests/client/torture_algorithms.c +++ b/tests/client/torture_algorithms.c @@ -438,6 +438,26 @@ static void torture_algorithms_dh_group18(void **state) { test_algorithm(s->ssh.session, "diffie-hellman-group18-sha512", NULL/*cipher*/, NULL/*hmac*/); } +static void torture_algorithms_dh_gex_sha1(void **state) +{ + struct torture_state *s = *state; + + test_algorithm(s->ssh.session, + "diffie-hellman-group-exchange-sha1", + NULL, /* cipher */ + NULL); /* hmac */ +} + +static void torture_algorithms_dh_gex_sha256(void **state) +{ + struct torture_state *s = *state; + + test_algorithm(s->ssh.session, + "diffie-hellman-group-exchange-sha256", + NULL, /* cipher */ + NULL); /* hmac */ +} + int torture_run_tests(void) { int rc; struct CMUnitTest tests[] = { @@ -544,6 +564,12 @@ int torture_run_tests(void) { cmocka_unit_test_setup_teardown(torture_algorithms_dh_group18, session_setup, session_teardown), + cmocka_unit_test_setup_teardown(torture_algorithms_dh_gex_sha1, + session_setup, + session_teardown), + cmocka_unit_test_setup_teardown(torture_algorithms_dh_gex_sha256, + session_setup, + session_teardown), #if ((OPENSSH_VERSION_MAJOR == 7 && OPENSSH_VERSION_MINOR >= 3) || OPENSSH_VERSION_MAJOR > 7) cmocka_unit_test_setup_teardown(torture_algorithms_ecdh_curve25519_sha256, session_setup, |