summaryrefslogtreecommitdiff
path: root/cli-auth.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2012-05-17 20:52:57 +0800
committerMatt Johnston <matt@ucc.asn.au>2012-05-17 20:52:57 +0800
commit0a65d477915cb445e95575521688810fe7905b4b (patch)
tree26190cb460eea91b4be9e81f655bbdf69aa257f5 /cli-auth.c
parent9695acebf0b632af7baca39455b3f01d071181cc (diff)
downloaddropbear-insecure-nocrypto.tar.gz
- Only request "none" cipher after auth has succeededinsecure-nocrypto
Diffstat (limited to 'cli-auth.c')
-rw-r--r--cli-auth.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/cli-auth.c b/cli-auth.c
index 97c12d8..321cbf3 100644
--- a/cli-auth.c
+++ b/cli-auth.c
@@ -257,13 +257,9 @@ void cli_auth_try() {
#endif
#ifdef ENABLE_CLI_INTERACT_AUTH
-#if defined(DROPBEAR_NONE_CIPHER) && !defined(ALLOW_NONE_PASSWORD_AUTH)
if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
fprintf(stderr, "Sorry, I won't let you use interactive auth unencrypted.\n");
- }
- else
-#endif
- if (!finished && ses.authstate.authtypes & AUTH_TYPE_INTERACT) {
+ } else if (!finished && ses.authstate.authtypes & AUTH_TYPE_INTERACT) {
if (cli_ses.auth_interact_failed) {
finished = 0;
} else {
@@ -275,13 +271,9 @@ void cli_auth_try() {
#endif
#ifdef ENABLE_CLI_PASSWORD_AUTH
-#if defined(DROPBEAR_NONE_CIPHER) && !defined(ALLOW_NONE_PASSWORD_AUTH)
if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
fprintf(stderr, "Sorry, I won't let you use password auth unencrypted.\n");
- }
- else
-#endif
- if (!finished && ses.authstate.authtypes & AUTH_TYPE_PASSWORD) {
+ } else if (!finished && ses.authstate.authtypes & AUTH_TYPE_PASSWORD) {
cli_auth_password();
finished = 1;
cli_ses.lastauthtype = AUTH_TYPE_PASSWORD;