unsorted formatting cleanup
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
88bc364c05
Коммит
97a03083ba
@ -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;
|
||||
@ -1700,9 +1699,9 @@ int ssh_bind_options_set(ssh_bind sshbind, enum ssh_bind_options_e type,
|
||||
bind_key_path_loc = &sshbind->dsakey;
|
||||
#else
|
||||
ssh_set_error(sshbind,
|
||||
SSH_FATAL,
|
||||
"DSS key used and libssh compiled "
|
||||
"without DSA support");
|
||||
SSH_FATAL,
|
||||
"DSS key used and libssh compiled "
|
||||
"without DSA support");
|
||||
#endif
|
||||
break;
|
||||
case SSH_KEYTYPE_ECDSA_P256:
|
||||
@ -1723,9 +1722,9 @@ int ssh_bind_options_set(ssh_bind sshbind, enum ssh_bind_options_e type,
|
||||
bind_key_path_loc = &sshbind->rsakey;
|
||||
break;
|
||||
case SSH_KEYTYPE_ED25519:
|
||||
bind_key_loc = &sshbind->ed25519;
|
||||
bind_key_path_loc = &sshbind->ed25519key;
|
||||
break;
|
||||
bind_key_loc = &sshbind->ed25519;
|
||||
bind_key_path_loc = &sshbind->ed25519key;
|
||||
break;
|
||||
default:
|
||||
ssh_set_error(sshbind,
|
||||
SSH_FATAL,
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
@ -2708,9 +2708,9 @@ ssh_string ssh_srv_pki_do_sign_sessionid(ssh_session session,
|
||||
|
||||
/* Generate the signature */
|
||||
sig = pki_do_sign(privkey,
|
||||
ssh_buffer_get(sign_input),
|
||||
ssh_buffer_get_len(sign_input),
|
||||
digest);
|
||||
ssh_buffer_get(sign_input),
|
||||
ssh_buffer_get_len(sign_input),
|
||||
digest);
|
||||
if (sig == NULL) {
|
||||
goto end;
|
||||
}
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user