aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-01-04 15:35:37 +0100
committerAndreas Schneider <asn@cryptomilk.org>2018-01-04 15:35:37 +0100
commitcc13e8520255232e7917070222e88ab8dfb3880e (patch)
treeadecf2bb10488def7d7d2a0114791e1aad4d1ca3
parent720739bc2a7e7ea8ad1bd4c868c369e91dbc2ad8 (diff)
downloadlibssh-cc13e8520255232e7917070222e88ab8dfb3880e.tar.gz
libssh-cc13e8520255232e7917070222e88ab8dfb3880e.tar.xz
libssh-cc13e8520255232e7917070222e88ab8dfb3880e.zip
tests: Fix torture_pki with libcrypto
This stops asking for a passphrase on commandline. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--tests/unittests/torture_pki.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/unittests/torture_pki.c b/tests/unittests/torture_pki.c
index 33e7cd89..5493ae3f 100644
--- a/tests/unittests/torture_pki.c
+++ b/tests/unittests/torture_pki.c
@@ -399,6 +399,7 @@ static void torture_pki_import_privkey_base64_passphrase(void **state) {
&key);
assert_true(rc == -1);
+#ifndef HAVE_LIBCRYPTO
/* test if it returns -1 if passphrase is NULL */
/* libcrypto asks for a passphrase, so skip this test */
rc = ssh_pki_import_privkey_base64(torture_get_testkey(SSH_KEYTYPE_DSS, 0, 1),
@@ -407,7 +408,8 @@ static void torture_pki_import_privkey_base64_passphrase(void **state) {
NULL,
&key);
assert_true(rc == -1);
-# endif
+#endif /* HAVE_LIBCRYPTO */
+#endif /* HAVE_DSA */
/* same for ED25519 */
rc = ssh_pki_import_privkey_base64(torture_get_testkey(SSH_KEYTYPE_ED25519, 0, 1),
passphrase,