1
0
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:
Jakub Jelen
2022-05-10 11:39:47 +02:00
parent 88bc364c05
commit 97a03083ba
5 changed files with 20 additions and 18 deletions

View File

@ -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",

View File

@ -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;

View File

@ -2687,7 +2687,7 @@ ssh_string ssh_srv_pki_do_sign_sessionid(ssh_session session,
session->current_crypto;
if (crypto->secret_hash == NULL){
ssh_set_error(session,SSH_FATAL,"Missing secret_hash");
ssh_set_error(session, SSH_FATAL, "Missing secret_hash");
return NULL;
}

View File

@ -1,5 +1,5 @@
/*
* pki_ed25519 .c - PKI infrastructure using ed25519
* pki_ed25519.c - PKI infrastructure using ed25519
*
* This file is part of the SSH Library
*

View File

@ -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);