aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJon Simons <jon@jonsimons.org>2018-05-25 03:42:59 -0700
committerAndreas Schneider <asn@cryptomilk.org>2018-06-27 21:25:30 +0200
commit732818ebb28e3c9d0323e9b26d9c2de04db2b062 (patch)
tree4ef78b2adb7f9b6f26c102468fe24fb9dca10547 /tests
parent448de134ac1439e1cbbed02ad344c37d9450d6d7 (diff)
downloadlibssh-732818ebb28e3c9d0323e9b26d9c2de04db2b062.tar.gz
libssh-732818ebb28e3c9d0323e9b26d9c2de04db2b062.tar.xz
libssh-732818ebb28e3c9d0323e9b26d9c2de04db2b062.zip
tests: fix -Wunused-function warning in torture_pki_ecdsa.c
Wrap some function definitions with `HAVE_LIBCRYPTO` ifdefs to match their usages in `torture_run_tests`. Fixes this warning I observe when building locally: torture_pki_ecdsa.c:341:13: warning: ‘torture_pki_ecdsa_write_privkey’ defined but not used [-Wunused-function] Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/torture_pki_ecdsa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/unittests/torture_pki_ecdsa.c b/tests/unittests/torture_pki_ecdsa.c
index 6587a60d..e9939d56 100644
--- a/tests/unittests/torture_pki_ecdsa.c
+++ b/tests/unittests/torture_pki_ecdsa.c
@@ -338,6 +338,7 @@ static void torture_pki_generate_key_ecdsa(void **state)
ssh_free(session);
}
+#ifdef HAVE_LIBCRYPTO
static void torture_pki_ecdsa_write_privkey(void **state)
{
ssh_key origkey;
@@ -412,6 +413,7 @@ static void torture_pki_ecdsa_write_privkey(void **state)
ssh_key_free(origkey);
ssh_key_free(privkey);
}
+#endif /* HAVE_LIBCRYPTO */
static void torture_pki_ecdsa_name(void **state, const char *expected_name)
{