mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
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>
This commit is contained in:
committed by
Andreas Schneider
parent
448de134ac
commit
732818ebb2
@@ -338,6 +338,7 @@ static void torture_pki_generate_key_ecdsa(void **state)
|
|||||||
ssh_free(session);
|
ssh_free(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBCRYPTO
|
||||||
static void torture_pki_ecdsa_write_privkey(void **state)
|
static void torture_pki_ecdsa_write_privkey(void **state)
|
||||||
{
|
{
|
||||||
ssh_key origkey;
|
ssh_key origkey;
|
||||||
@@ -412,6 +413,7 @@ static void torture_pki_ecdsa_write_privkey(void **state)
|
|||||||
ssh_key_free(origkey);
|
ssh_key_free(origkey);
|
||||||
ssh_key_free(privkey);
|
ssh_key_free(privkey);
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE_LIBCRYPTO */
|
||||||
|
|
||||||
static void torture_pki_ecdsa_name(void **state, const char *expected_name)
|
static void torture_pki_ecdsa_name(void **state, const char *expected_name)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user