mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-29 13:01:13 +03:00
tests: Add tests for dh-group14, group16 and group18
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
f4339df577
commit
8e002b9415
@ -421,6 +421,24 @@ static void torture_algorithms_dh_group1(void **state) {
|
||||
test_algorithm(s->ssh.session, "diffie-hellman-group1-sha1", NULL/*cipher*/, NULL/*hmac*/);
|
||||
}
|
||||
|
||||
static void torture_algorithms_dh_group14(void **state) {
|
||||
struct torture_state *s = *state;
|
||||
|
||||
test_algorithm(s->ssh.session, "diffie-hellman-group14-sha1", NULL/*cipher*/, NULL/*hmac*/);
|
||||
}
|
||||
|
||||
static void torture_algorithms_dh_group16(void **state) {
|
||||
struct torture_state *s = *state;
|
||||
|
||||
test_algorithm(s->ssh.session, "diffie-hellman-group16-sha512", NULL/*cipher*/, NULL/*hmac*/);
|
||||
}
|
||||
|
||||
static void torture_algorithms_dh_group18(void **state) {
|
||||
struct torture_state *s = *state;
|
||||
|
||||
test_algorithm(s->ssh.session, "diffie-hellman-group18-sha512", NULL/*cipher*/, NULL/*hmac*/);
|
||||
}
|
||||
|
||||
int torture_run_tests(void) {
|
||||
int rc;
|
||||
struct CMUnitTest tests[] = {
|
||||
@ -516,6 +534,15 @@ int torture_run_tests(void) {
|
||||
cmocka_unit_test_setup_teardown(torture_algorithms_dh_group1,
|
||||
session_setup,
|
||||
session_teardown),
|
||||
cmocka_unit_test_setup_teardown(torture_algorithms_dh_group14,
|
||||
session_setup,
|
||||
session_teardown),
|
||||
cmocka_unit_test_setup_teardown(torture_algorithms_dh_group16,
|
||||
session_setup,
|
||||
session_teardown),
|
||||
cmocka_unit_test_setup_teardown(torture_algorithms_dh_group18,
|
||||
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,
|
||||
|
Reference in New Issue
Block a user