mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-31 00:03:07 +03:00
unsorted formatting cleanup
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@ -523,7 +523,8 @@ int ssh_userauth_try_publickey(ssh_session session,
|
||||
"Invalid key type (unknown)");
|
||||
return SSH_AUTH_DENIED;
|
||||
}
|
||||
if (!ssh_key_algorithm_allowed(session, sig_type_c)) {
|
||||
rc = ssh_key_algorithm_allowed(session, sig_type_c);
|
||||
if (!rc) {
|
||||
ssh_set_error(session, SSH_REQUEST_DENIED,
|
||||
"The key algorithm '%s' is not allowed to be used by"
|
||||
" PUBLICKEY_ACCEPTED_TYPES configuration option",
|
||||
@ -647,7 +648,8 @@ int ssh_userauth_publickey(ssh_session session,
|
||||
"Invalid key type (unknown)");
|
||||
return SSH_AUTH_DENIED;
|
||||
}
|
||||
if (!ssh_key_algorithm_allowed(session, sig_type_c)) {
|
||||
rc = ssh_key_algorithm_allowed(session, sig_type_c);
|
||||
if (!rc) {
|
||||
ssh_set_error(session, SSH_REQUEST_DENIED,
|
||||
"The key algorithm '%s' is not allowed to be used by"
|
||||
" PUBLICKEY_ACCEPTED_TYPES configuration option",
|
||||
@ -765,7 +767,8 @@ static int ssh_userauth_agent_publickey(ssh_session session,
|
||||
SSH_STRING_FREE(pubkey_s);
|
||||
return SSH_AUTH_DENIED;
|
||||
}
|
||||
if (!ssh_key_algorithm_allowed(session, sig_type_c)) {
|
||||
rc = ssh_key_algorithm_allowed(session, sig_type_c);
|
||||
if (!rc) {
|
||||
ssh_set_error(session, SSH_REQUEST_DENIED,
|
||||
"The key algorithm '%s' is not allowed to be used by"
|
||||
" PUBLICKEY_ACCEPTED_TYPES configuration option",
|
||||
|
@ -906,7 +906,6 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
|
||||
|
||||
session->opts.StrictHostKeyChecking = (*x & 0xff) > 0 ? 1 : 0;
|
||||
}
|
||||
session->opts.StrictHostKeyChecking = *(int*)value;
|
||||
break;
|
||||
case SSH_OPTIONS_PROXYCOMMAND:
|
||||
v = value;
|
||||
|
@ -558,7 +558,7 @@ static void torture_auth_agent(void **state) {
|
||||
assert_true(rc & SSH_AUTH_METHOD_PUBLICKEY);
|
||||
|
||||
rc = ssh_userauth_agent(session, NULL);
|
||||
assert_int_equal(rc, SSH_AUTH_SUCCESS);
|
||||
assert_ssh_return_code(session, rc);
|
||||
}
|
||||
|
||||
static void torture_auth_agent_nonblocking(void **state) {
|
||||
@ -589,7 +589,7 @@ static void torture_auth_agent_nonblocking(void **state) {
|
||||
do {
|
||||
rc = ssh_userauth_agent(session, NULL);
|
||||
} while (rc == SSH_AUTH_AGAIN);
|
||||
assert_int_equal(rc, SSH_AUTH_SUCCESS);
|
||||
assert_ssh_return_code(session, rc);
|
||||
}
|
||||
|
||||
static void torture_auth_cert(void **state) {
|
||||
@ -631,7 +631,7 @@ static void torture_auth_cert(void **state) {
|
||||
assert_int_equal(rc, SSH_OK);
|
||||
|
||||
rc = ssh_userauth_try_publickey(session, NULL, cert);
|
||||
assert_int_equal(rc, SSH_AUTH_SUCCESS);
|
||||
assert_ssh_return_code(session, rc);
|
||||
|
||||
rc = ssh_userauth_publickey(session, NULL, privkey);
|
||||
assert_int_equal(rc, SSH_AUTH_SUCCESS);
|
||||
|
Reference in New Issue
Block a user