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:
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user