Skip to content
Permalink
Browse files

moved runtime tests into test files #379

No longer remove test files based on OpenSSL version to hopefully resolve the release build issue.
  • Loading branch information...
willco007 committed Oct 10, 2019
1 parent 96bbefb commit a1a9524e63f6428386892f35dc876fb51771bf2f
@@ -119,21 +119,12 @@ set(TESTS
keyboard_interactive_auth_fails_with_wrong_response
keyboard_interactive_auth_succeeds_with_correct_response
agent_forward_succeeds
public_key_auth_succeeds_with_correct_rsa_openssh_key
public_key_auth_succeeds_with_correct_ed25519_key
public_key_auth_succeeds_with_correct_encrypted_ed25519_key
public_key_auth_succeeds_with_correct_ed25519_key_from_mem
)

if(CRYPTO_BACKEND STREQUAL "OpenSSL")
list(APPEND TESTS
public_key_auth_succeeds_with_correct_rsa_openssh_key
)
if(OPENSSL_VERSION VERSION_GREATER "1.1.0")
list(APPEND TESTS
public_key_auth_succeeds_with_correct_ed25519_key
public_key_auth_succeeds_with_correct_encrypted_ed25519_key
public_key_auth_succeeds_with_correct_ed25519_key_from_mem
)
endif()
endif()

if(NOT CRYPTO_BACKEND STREQUAL "mbedTLS")
list(APPEND TESTS
public_key_auth_succeeds_with_correct_dsa_key
@@ -32,10 +32,7 @@ EXTRA_DIST += test_public_key_auth_fails_with_wrong_key.c
EXTRA_DIST += test_public_key_auth_succeeds_with_correct_dsa_key.c
EXTRA_DIST += test_public_key_auth_succeeds_with_correct_rsa_key.c
EXTRA_DIST += test_public_key_auth_succeeds_with_correct_encrypted_rsa_key.c
if OPENSSL
# TODO: need to add a test for specific openssl version some how
# EXTRA_DIST += test_public_key_auth_succeeds_with_correct_ed25519_key.c
# EXTRA_DIST += test_public_key_auth_succeeds_with_correct_encrypted_ed25519_key.c
# EXTRA_DIST += test_public_key_auth_succeeds_with_correct_ed25519_key_from_mem.c
EXTRA_DIST += test_public_key_auth_succeeds_with_correct_rsa_openssh_key.c
endif
EXTRA_DIST += test_public_key_auth_succeeds_with_correct_ed25519_key.c
EXTRA_DIST += test_public_key_auth_succeeds_with_correct_encrypted_ed25519_key.c
EXTRA_DIST += test_public_key_auth_succeeds_with_correct_ed25519_key_from_mem.c
EXTRA_DIST += test_public_key_auth_succeeds_with_correct_rsa_openssh_key.c
@@ -13,6 +13,11 @@ int test(LIBSSH2_SESSION *session)
int rc;
const char *userauth_list = NULL;

#if defined(LIBSSH2_ED25519) && !LIBSSH2_ED25519
fprintf(stderr, "Libssh2 build without ED25519 support, skipping test.");
return 0;
#endif

userauth_list = libssh2_userauth_list(session, USERNAME, strlen(USERNAME));
if(userauth_list == NULL) {
print_last_session_error("libssh2_userauth_list");
@@ -18,6 +18,11 @@ int test(LIBSSH2_SESSION *session)
size_t len = 0;
const char *userauth_list = NULL;

#if defined(LIBSSH2_ED25519) && !LIBSSH2_ED25519
fprintf(stderr, "Libssh2 build without ED25519 support, skipping test.");
return 0;
#endif

userauth_list = libssh2_userauth_list(session, USERNAME, strlen(USERNAME));
if(userauth_list == NULL) {
print_last_session_error("libssh2_userauth_list");
@@ -14,6 +14,11 @@ int test(LIBSSH2_SESSION *session)
int rc;
const char *userauth_list = NULL;

#if defined(LIBSSH2_ED25519) && !LIBSSH2_ED25519
fprintf(stderr, "Libssh2 build without ED25519 support, skipping test.");
return 0;
#endif

userauth_list = libssh2_userauth_list(session, USERNAME, strlen(USERNAME));
if(userauth_list == NULL) {
print_last_session_error("libssh2_userauth_list");
@@ -12,6 +12,11 @@ int test(LIBSSH2_SESSION *session)
{
int rc;

#if !defined(OPENSSL_VERSION_NUMBER)
fprintf(stderr, "Libssh2 backend not supported, skipping test.");
return 0;
#endif

const char *userauth_list =
libssh2_userauth_list(session, USERNAME, strlen(USERNAME));
if(userauth_list == NULL) {

0 comments on commit a1a9524

Please sign in to comment.
You can’t perform that action at this time.