mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +09:00
tests/torture_pki_dsa: Skip completely if in FIPS mode
DSA is not allowed in FIPS mode. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
9ef0b0b029
commit
8c59f7f236
@@ -815,6 +815,11 @@ static void torture_pki_dsa_cert_verify(void **state)
|
|||||||
ssh_free(session);
|
ssh_free(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void torture_pki_dsa_skip(UNUSED_PARAM(void **state))
|
||||||
|
{
|
||||||
|
skip();
|
||||||
|
}
|
||||||
|
|
||||||
int torture_run_tests(void)
|
int torture_run_tests(void)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
@@ -865,10 +870,17 @@ int torture_run_tests(void)
|
|||||||
setup_dsa_key,
|
setup_dsa_key,
|
||||||
teardown),
|
teardown),
|
||||||
};
|
};
|
||||||
|
struct CMUnitTest skip_tests[] = {
|
||||||
|
cmocka_unit_test(torture_pki_dsa_skip)
|
||||||
|
};
|
||||||
|
|
||||||
ssh_init();
|
ssh_init();
|
||||||
|
if (ssh_fips_mode()) {
|
||||||
|
rc = cmocka_run_group_tests(skip_tests, NULL, NULL);
|
||||||
|
} else {
|
||||||
torture_filter_tests(tests);
|
torture_filter_tests(tests);
|
||||||
rc = cmocka_run_group_tests(tests, NULL, NULL);
|
rc = cmocka_run_group_tests(tests, NULL, NULL);
|
||||||
|
}
|
||||||
ssh_finalize();
|
ssh_finalize();
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user