mirror of
https://github.com/clearml/dropbear
synced 2025-03-13 15:20:58 +00:00
Resort cli auth method tries
This commit is contained in:
parent
17e02fe614
commit
b734e5a423
24
cli-auth.c
24
cli-auth.c
@ -296,18 +296,6 @@ int cli_auth_try() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if DROPBEAR_CLI_PASSWORD_AUTH
|
|
||||||
if (!finished && (ses.authstate.authtypes & AUTH_TYPE_PASSWORD)) {
|
|
||||||
if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
|
|
||||||
fprintf(stderr, "Sorry, I won't let you use password auth unencrypted.\n");
|
|
||||||
} else {
|
|
||||||
cli_auth_password();
|
|
||||||
finished = 1;
|
|
||||||
cli_ses.lastauthtype = AUTH_TYPE_PASSWORD;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if DROPBEAR_CLI_INTERACT_AUTH
|
#if DROPBEAR_CLI_INTERACT_AUTH
|
||||||
if (!finished && (ses.authstate.authtypes & AUTH_TYPE_INTERACT)) {
|
if (!finished && (ses.authstate.authtypes & AUTH_TYPE_INTERACT)) {
|
||||||
if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
|
if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
|
||||||
@ -322,6 +310,18 @@ int cli_auth_try() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if DROPBEAR_CLI_PASSWORD_AUTH
|
||||||
|
if (!finished && (ses.authstate.authtypes & AUTH_TYPE_PASSWORD)) {
|
||||||
|
if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
|
||||||
|
fprintf(stderr, "Sorry, I won't let you use password auth unencrypted.\n");
|
||||||
|
} else {
|
||||||
|
cli_auth_password();
|
||||||
|
finished = 1;
|
||||||
|
cli_ses.lastauthtype = AUTH_TYPE_PASSWORD;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
TRACE(("cli_auth_try lastauthtype %d", cli_ses.lastauthtype))
|
TRACE(("cli_auth_try lastauthtype %d", cli_ses.lastauthtype))
|
||||||
|
|
||||||
if (finished) {
|
if (finished) {
|
||||||
|
Loading…
Reference in New Issue
Block a user