The unified diff between revisions [7ad1775e..] and [2b954d40..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'cli-auth.c'
#
#
# patch "cli-auth.c"
# from [3b308d18cc57b0b95f782bc7e4d8ea118a974343]
# to [1198660d36f346fbdfc05c750a7600e7f0868ecc]
#
============================================================
--- cli-auth.c 3b308d18cc57b0b95f782bc7e4d8ea118a974343
+++ cli-auth.c 1198660d36f346fbdfc05c750a7600e7f0868ecc
@@ -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;