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>
Этот коммит содержится в:
родитель
574bfb5459
Коммит
31da8025b2
@ -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,
|
||||
|
@ -626,7 +626,8 @@ static void torture_setup_create_sshd_config(void **state, bool pam)
|
||||
# else /* OPENSSH_VERSION 7.0 - 7.5 */
|
||||
"Ciphers +3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc\n"
|
||||
# endif /* OPENSSH_VERSION 7.0 - 7.6 */
|
||||
"KexAlgorithms +diffie-hellman-group1-sha1"
|
||||
"KexAlgorithms +diffie-hellman-group1-sha1,"
|
||||
"diffie-hellman-group-exchange-sha1"
|
||||
#else /* OPENSSH_VERSION >= 6.7 */
|
||||
"Ciphers 3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,"
|
||||
"aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,"
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user