1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-29 13:01:13 +03:00

Remove remained HAVE_DSA ifdefs and WITH_DSA

Signed-off-by: Norbert Pocs <npocs@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Norbert Pocs
2023-05-30 16:27:43 +02:00
parent 5c7bfaa5f6
commit 3951bbabd5
5 changed files with 1 additions and 40 deletions

View File

@ -69,8 +69,7 @@ stages:
.fips:
extends: .tests
variables:
# DSA is turned off in fips mode
CMAKE_ADDITIONAL_OPTIONS: -DWITH_PKCS11_URI=ON -DWITH_DSA=OFF
CMAKE_ADDITIONAL_OPTIONS: -DWITH_PKCS11_URI=ON
before_script:
- *build
- echo "# userspace fips" > /etc/system-fips

View File

@ -250,7 +250,6 @@ message(STATUS "Client code testing: ${CLIENT_TESTING}")
message(STATUS "Blowfish cipher support: ${WITH_BLOWFISH_CIPHER}")
message(STATUS "PKCS #11 URI support: ${WITH_PKCS11_URI}")
message(STATUS "With PKCS #11 provider support: ${WITH_PKCS11_PROVIDER}")
message(STATUS "DSA support: ${WITH_DSA}")
set(_SERVER_TESTING OFF)
if (WITH_SERVER)
set(_SERVER_TESTING ${SERVER_TESTING})

View File

@ -313,22 +313,6 @@ static int torture_pkd_setup_ecdsa_521(void **state) {
PKDTESTS_KEX_COMMON(f, client, kexcmd)
#endif
#ifdef HAVE_DSA
#define PKDTESTS_KEX_OPENSSHONLY(f, client, kexcmd) \
/* Kex algorithms. */ \
f(client, ed25519_curve25519_sha256, kexcmd("curve25519-sha256"), setup_ed25519, teardown) \
f(client, ed25519_curve25519_sha256_libssh_org, kexcmd("curve25519-sha256@libssh.org"), setup_ed25519, teardown) \
f(client, ed25519_ecdh_sha2_nistp256, kexcmd("ecdh-sha2-nistp256"), setup_ed25519, teardown) \
f(client, ed25519_ecdh_sha2_nistp384, kexcmd("ecdh-sha2-nistp384"), setup_ed25519, teardown) \
f(client, ed25519_ecdh_sha2_nistp521, kexcmd("ecdh-sha2-nistp521"), setup_ed25519, teardown) \
f(client, ed25519_diffie_hellman_group14_sha256, kexcmd("diffie-hellman-group14-sha256"), setup_ed25519, teardown) \
f(client, ed25519_diffie_hellman_group16_sha512, kexcmd("diffie-hellman-group16-sha512"), setup_ed25519, teardown) \
f(client, ed25519_diffie_hellman_group18_sha512, kexcmd("diffie-hellman-group18-sha512"), setup_ed25519, teardown) \
f(client, ed25519_diffie_hellman_group14_sha1, kexcmd("diffie-hellman-group14-sha1"), setup_ed25519, teardown) \
f(client, ed25519_diffie_hellman_group1_sha1, kexcmd("diffie-hellman-group1-sha1"), setup_ed25519, teardown) \
f(client, ed25519_diffie_hellman_group_exchange_sha256, kexcmd(GEX_SHA256), setup_ed25519, teardown) \
f(client, ed25519_diffie_hellman_group_exchange_sha1, kexcmd(GEX_SHA1), setup_ed25519, teardown)
#else
#define PKDTESTS_KEX_OPENSSHONLY(f, client, kexcmd) \
/* Kex algorithms. */ \
f(client, ed25519_curve25519_sha256, kexcmd("curve25519-sha256"), setup_ed25519, teardown) \
@ -342,7 +326,6 @@ static int torture_pkd_setup_ecdsa_521(void **state) {
f(client, ed25519_diffie_hellman_group1_sha1, kexcmd("diffie-hellman-group1-sha1"), setup_ed25519, teardown) \
f(client, ed25519_diffie_hellman_group_exchange_sha256, kexcmd(GEX_SHA256), setup_ed25519, teardown) \
f(client, ed25519_diffie_hellman_group_exchange_sha1, kexcmd(GEX_SHA1), setup_ed25519, teardown)
#endif
#define CHACHA20 "chacha20-poly1305@openssh.com"
@ -374,19 +357,10 @@ static int torture_pkd_setup_ecdsa_521(void **state) {
f(client, ecdsa_384_chacha20, ciphercmd(CHACHA20), setup_ecdsa_384, teardown) \
f(client, ecdsa_521_chacha20, ciphercmd(CHACHA20), setup_ecdsa_521, teardown)
#ifdef HAVE_DSA
#define PKDTESTS_CIPHER(f, client, ciphercmd) \
/* Ciphers. */ \
PKDTESTS_CIPHER_COMMON(f, client, ciphercmd) \
PKDTESTS_CIPHER_CHACHA(f, client, ciphercmd) \
f(client, dsa_aes128_ctr, ciphercmd("aes128-ctr"), setup_dsa, teardown) \
f(client, dsa_aes256_ctr, ciphercmd("aes256-ctr"), setup_dsa, teardown)
#else
#define PKDTESTS_CIPHER(f, client, ciphercmd) \
/* Ciphers. */ \
PKDTESTS_CIPHER_COMMON(f, client, ciphercmd) \
PKDTESTS_CIPHER_CHACHA(f, client, ciphercmd)
#endif
#define AES128_GCM "aes128-gcm@openssh.com"
#define AES256_GCM "aes256-gcm@openssh.com"

View File

@ -145,7 +145,6 @@ close_fp:
return rc;
}
#ifndef HAVE_DSA
static int setup_knownhosts_file_unsupported_type(void **state)
{
char *tmp_file = NULL;
@ -175,7 +174,6 @@ close_fp:
return rc;
}
#endif
static int teardown_knownhosts_file(void **state)
{
@ -429,7 +427,6 @@ static void torture_knownhosts_get_algorithms_names(void **state)
ssh_free(session);
}
#ifndef HAVE_DSA
/* Do not remove this test if we completely remove DSA support! */
static void torture_knownhosts_get_algorithms_names_unsupported(void **state)
{
@ -452,7 +449,6 @@ static void torture_knownhosts_get_algorithms_names_unsupported(void **state)
ssh_free(session);
}
#endif
static void torture_knownhosts_algorithms_wanted(void **state)
{
@ -722,11 +718,9 @@ int torture_run_tests(void) {
cmocka_unit_test_setup_teardown(torture_knownhosts_get_algorithms_names,
setup_knownhosts_file,
teardown_knownhosts_file),
#ifndef HAVE_DSA
cmocka_unit_test_setup_teardown(torture_knownhosts_get_algorithms_names_unsupported,
setup_knownhosts_file_unsupported_type,
teardown_knownhosts_file),
#endif
cmocka_unit_test_setup_teardown(torture_knownhosts_algorithms_wanted,
setup_knownhosts_file,
teardown_knownhosts_file),

View File

@ -1455,11 +1455,6 @@ static void torture_options_apply (void **state) {
id = ssh_path_expand_escape(session, "%d/id_rsa");
rc = ssh_list_append(awaited_list, id);
assert_int_equal(rc, SSH_OK);
#ifdef HAVE_DSA
id = ssh_path_expand_escape(session, "%d/id_dsa");
rc = ssh_list_append(awaited_list, id);
assert_int_equal(rc, SSH_OK);
#endif
assert_int_equal(ssh_list_count(awaited_list),
ssh_list_count(session->opts.identity));