summaryrefslogtreecommitdiffhomepage
path: root/cli-auth.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2006-03-10 06:30:52 +0000
committerMatt Johnston <matt@ucc.asn.au>2006-03-10 06:30:52 +0000
commitba869e56010db68e19f5a192ed418f832c97261d (patch)
treea94270674f97649972076c799a6382b4b4a0e6ea /cli-auth.c
parent46d53c37fa27994d17646e5eb922678a7ed4b3e7 (diff)
parent1632bd4a18be897a35dc2319fd7d5f220c0963d3 (diff)
propagate from branch 'au.asn.ucc.matt.dropbear' (head 7ad1775ed65e75dbece27fe6b65bf1a234db386a)
to branch 'au.asn.ucc.matt.dropbear.insecure-nocrypto' (head 88ed2b94d9bfec9a4f661caf592ed01da5eb3b6a) --HG-- branch : insecure-nocrypto extra : convert_revision : 2b954d406290e6a2be8eb4a262d3675ac95ac544
Diffstat (limited to 'cli-auth.c')
-rw-r--r--cli-auth.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/cli-auth.c b/cli-auth.c
index d08de9a..6be14ef 100644
--- a/cli-auth.c
+++ b/cli-auth.c
@@ -251,7 +251,10 @@ void cli_auth_try() {
#endif
#ifdef ENABLE_CLI_INTERACT_AUTH
- if (!finished && ses.authstate.authtypes & AUTH_TYPE_INTERACT) {
+ if (ses.keys->trans_algo_crypt->cipherdesc == NULL) {
+ fprintf(stderr, "Sorry, I won't let you use interactive auth unencrypted.\n");
+ }
+ else if (!finished && ses.authstate.authtypes & AUTH_TYPE_INTERACT) {
if (cli_ses.auth_interact_failed) {
finished = 0;
} else {
@@ -263,7 +266,10 @@ void cli_auth_try() {
#endif
#ifdef ENABLE_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 if (!finished && ses.authstate.authtypes & AUTH_TYPE_PASSWORD) {
cli_auth_password();
finished = 1;
cli_ses.lastauthtype = AUTH_TYPE_PASSWORD;