1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-10 06:23:01 +03:00

tests: Use new auth API in the torture_session test.

This commit is contained in:
Andreas Schneider
2013-12-15 20:29:30 +01:00
parent ce5d421753
commit 15c64b2981

View File

@@ -68,9 +68,10 @@ static void torture_channel_read_error(void **state) {
if (rc == SSH_ERROR) { if (rc == SSH_ERROR) {
assert_true(ssh_get_error_code(session) == SSH_REQUEST_DENIED); assert_true(ssh_get_error_code(session) == SSH_REQUEST_DENIED);
} }
assert_true(ssh_auth_list(session) & SSH_AUTH_METHOD_PUBLICKEY); rc = ssh_userauth_list(session, NULL);
assert_true(rc & SSH_AUTH_METHOD_PUBLICKEY);
rc = ssh_userauth_autopubkey(session, NULL); rc = ssh_userauth_publickey_auto(session, NULL, NULL);
assert_true(rc == SSH_AUTH_SUCCESS); assert_true(rc == SSH_AUTH_SUCCESS);
channel = ssh_channel_new(session); channel = ssh_channel_new(session);