aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2019-12-16 15:50:27 +0100
committerAndreas Schneider <asn@cryptomilk.org>2020-01-23 09:49:02 +0100
commit92124ae65a15721ea546043141344d1cd437cb99 (patch)
tree7ee2dd231021e569756e33f414ae8df397c31515
parentea198fee430415441e9a86f1301b4679cae4b2f9 (diff)
downloadlibssh-92124ae65a15721ea546043141344d1cd437cb99.tar.gz
libssh-92124ae65a15721ea546043141344d1cd437cb99.tar.xz
libssh-92124ae65a15721ea546043141344d1cd437cb99.zip
tests: Do not require strict host key checking in openssh
as nothing really sets these keys up and they are probably preserverd from some previous test, which is really not a good testing strategy. Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> (cherry picked from commit 8eda4165cf43be5260ce7ad0a106a8818b9ddcc0)
-rw-r--r--tests/client/torture_proxycommand.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/client/torture_proxycommand.c b/tests/client/torture_proxycommand.c
index 91b2d836..77dd8ade 100644
--- a/tests/client/torture_proxycommand.c
+++ b/tests/client/torture_proxycommand.c
@@ -110,7 +110,9 @@ static void torture_options_set_proxycommand_ssh(void **state)
int rc;
socket_t fd;
- rc = snprintf(command, sizeof(command), "ssh -W [%%h]:%%p alice@%s", address);
+ rc = snprintf(command, sizeof(command),
+ "ssh -oStrictHostKeyChecking=no -W [%%h]:%%p alice@%s",
+ address);
assert_true((size_t)rc < sizeof(command));
rc = ssh_options_set(session, SSH_OPTIONS_PROXYCOMMAND, command);
@@ -132,7 +134,10 @@ static void torture_options_set_proxycommand_ssh_stderr(void **state)
int rc;
socket_t fd;
- rc = snprintf(command, sizeof(command), "ssh -vvv -W [%%h]:%%p alice@%s", address);
+ /* The -vvv switches produce the desired output on the standard error */
+ rc = snprintf(command, sizeof(command),
+ "ssh -vvv -oStrictHostKeyChecking=no -W [%%h]:%%p alice@%s",
+ address);
assert_true((size_t)rc < sizeof(command));
rc = ssh_options_set(session, SSH_OPTIONS_PROXYCOMMAND, command);