1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-25 03:41:57 +03:00

example, tests: fix ssh2 to correctly return failure

Before this patch ssh2 and test_ssh2 returned success even if the session
failed at `libssh2_session_handshake()` or after.

This patch depends on cda41f7cb8, that fixed
running test_ssh2 on Windows via sshd_fixture.

Cherry-picked from #1017
This commit is contained in:
Viktor Szakats
2023-05-03 13:05:35 +00:00
parent 0a29a63ca6
commit 8270633eeb
2 changed files with 4 additions and 0 deletions

View File

@ -137,6 +137,8 @@ int main(int argc, char *argv[])
goto shutdown;
}
rc = 1;
/* At this point we have not yet authenticated. The first thing to do
* is check the hostkey's fingerprint against our known hosts Your app
* may have it hard coded, may go to a file, may present it to the

View File

@ -157,6 +157,8 @@ int main(int argc, char *argv[])
} while(1);
}
rc = 1;
/* At this point we have not yet authenticated. The first thing to do
* is check the hostkey's fingerprint against our known hosts Your app
* may have it hard coded, may go to a file, may present it to the