[openssh-commits] [openssh] 01/01: Skip OpenSSL specific tests w/out OpenSSL.

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Jun 19 18:41:34 AEST 2020


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit e684b1ea365e070433f282a3c1dabc3e2311ce49
Author: Darren Tucker <dtucker at dtucker.net>
Date:   Fri Jun 19 18:38:39 2020 +1000

    Skip OpenSSL specific tests w/out OpenSSL.
    
    Allows unit tests to pass when configure'ed --without-openssl.
---
 regress/unittests/sshkey/test_file.c | 2 ++
 regress/unittests/sshsig/tests.c     | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/regress/unittests/sshkey/test_file.c b/regress/unittests/sshkey/test_file.c
index 6afe3ba2..7d767336 100644
--- a/regress/unittests/sshkey/test_file.c
+++ b/regress/unittests/sshkey/test_file.c
@@ -422,6 +422,7 @@ sshkey_file_tests(void)
 
 	sshkey_free(k1);
 
+#if defined(WITH_OPENSSL) && defined(OPENSSL_HAS_ECC)
 	TEST_START("parse ECDSA-SK from private");
 	buf = load_file("ecdsa_sk1");
 	ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0);
@@ -485,6 +486,7 @@ sshkey_file_tests(void)
 	TEST_DONE();
 
 	sshkey_free(k1);
+#endif
 
 	TEST_START("parse Ed25519-SK from private");
 	buf = load_file("ed25519_sk1");
diff --git a/regress/unittests/sshsig/tests.c b/regress/unittests/sshsig/tests.c
index 2d69e8d4..44dcf5ef 100644
--- a/regress/unittests/sshsig/tests.c
+++ b/regress/unittests/sshsig/tests.c
@@ -80,8 +80,10 @@ tests(void)
         log_init("test_sshsig", SYSLOG_LEVEL_DEBUG3, SYSLOG_FACILITY_AUTH, 1);
 #endif
 
+#ifdef WITH_OPENSSL
 	OpenSSL_add_all_algorithms();
 	ERR_load_CRYPTO_strings();
+#endif
 
 	TEST_START("load data");
 	msg = load_file("namespace");
@@ -91,6 +93,7 @@ tests(void)
 	msg = load_file("signed-data");
 	TEST_DONE();
 
+#ifdef WITH_OPENSSL
 	TEST_START("check RSA signature");
 	check_sig("rsa", "rsa.sig", msg, namespace);
 	TEST_DONE();
@@ -99,17 +102,22 @@ tests(void)
 	check_sig("dsa", "dsa.sig", msg, namespace);
 	TEST_DONE();
 
+#ifdef OPENSSL_HAS_ECC
 	TEST_START("check ECDSA signature");
 	check_sig("ecdsa", "ecdsa.sig", msg, namespace);
 	TEST_DONE();
+#endif
+#endif
 
 	TEST_START("check ED25519 signature");
 	check_sig("ed25519", "ed25519.sig", msg, namespace);
 	TEST_DONE();
 
+#if defined(WITH_OPENSSL) && defined(OPENSSL_HAS_ECC)
 	TEST_START("check ECDSA-SK signature");
 	check_sig("ecdsa_sk", "ecdsa_sk.sig", msg, namespace);
 	TEST_DONE();
+#endif
 
 	TEST_START("check ED25519-SK signature");
 	check_sig("ed25519_sk", "ed25519_sk.sig", msg, namespace);

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list