diff options
author | Anderson Toshiyuki Sasaki <ansasaki@redhat.com> | 2019-06-05 15:31:29 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-06-13 16:29:32 +0200 |
commit | 8c59f7f236a4e5971aa4ee2632e01a0a9b578383 (patch) | |
tree | b80fa1afc11a2451956ee597504636806b1c7509 | |
parent | 9ef0b0b029859073b45ad33c8f1a7c9393053453 (diff) | |
download | libssh-8c59f7f236a4e5971aa4ee2632e01a0a9b578383.tar.gz libssh-8c59f7f236a4e5971aa4ee2632e01a0a9b578383.tar.xz libssh-8c59f7f236a4e5971aa4ee2632e01a0a9b578383.zip |
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>
-rw-r--r-- | tests/unittests/torture_pki_dsa.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/unittests/torture_pki_dsa.c b/tests/unittests/torture_pki_dsa.c index b88aa84e..f1fd9bf9 100644 --- a/tests/unittests/torture_pki_dsa.c +++ b/tests/unittests/torture_pki_dsa.c @@ -815,6 +815,11 @@ static void torture_pki_dsa_cert_verify(void **state) ssh_free(session); } +static void torture_pki_dsa_skip(UNUSED_PARAM(void **state)) +{ + skip(); +} + int torture_run_tests(void) { int rc; @@ -865,10 +870,17 @@ int torture_run_tests(void) setup_dsa_key, teardown), }; + struct CMUnitTest skip_tests[] = { + cmocka_unit_test(torture_pki_dsa_skip) + }; ssh_init(); - torture_filter_tests(tests); - rc = cmocka_run_group_tests(tests, NULL, NULL); + if (ssh_fips_mode()) { + rc = cmocka_run_group_tests(skip_tests, NULL, NULL); + } else { + torture_filter_tests(tests); + rc = cmocka_run_group_tests(tests, NULL, NULL); + } ssh_finalize(); return rc; } |