diff cli-auth.c @ 252:29afa62b5450 insecure-nocrypto

- a hack for grahame to run dropbear with "none" cipher. DO NOT USE IF YOU DON'T KNOW THE CONSEQUENCES Here is your noose. Use it wisely.
author Matt Johnston <matt@ucc.asn.au>
date Fri, 23 Sep 2005 16:29:19 +0000
parents efbaf6b03837
children 64abb124763d
line wrap: on
line diff
--- a/cli-auth.c	Wed Sep 21 15:58:19 2005 +0000
+++ b/cli-auth.c	Fri Sep 23 16:29:19 2005 +0000
@@ -251,7 +251,10 @@
 #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 @@
 #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;