diff options
author | Matt Johnston <matt@ucc.asn.au> | 2012-05-16 22:54:51 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2012-05-16 22:54:51 +0800 |
commit | f40ed8bad70fc9bb2ffb3cb7f81dd0352103612b (patch) | |
tree | b124a417e1420f5fbb976d03f40417b15d162e9c /cli-auth.c | |
parent | 41f50057f1671f4fd44cf7bc752a54f0897b709c (diff) | |
parent | 1912439526aff3ebb50aaf370b1744ba3d3e8fc5 (diff) |
Update insecure-nocrypto to current head
--HG--
branch : insecure-nocrypto
Diffstat (limited to 'cli-auth.c')
-rw-r--r-- | cli-auth.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -257,7 +257,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 { @@ -269,7 +272,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; |