comparison cli-auth.c @ 710:91dd8328a3ff

Merge "none" cipher/MAC branch. Also adds sha256 and sha512
author Matt Johnston <matt@ucc.asn.au>
date Wed, 20 Mar 2013 22:41:07 +0800
parents 983a817f8e41
children 714b9106e335
comparison
equal deleted inserted replaced
709:abd99ecd7ec2 710:91dd8328a3ff
255 cli_ses.lastauthtype = AUTH_TYPE_PUBKEY; 255 cli_ses.lastauthtype = AUTH_TYPE_PUBKEY;
256 } 256 }
257 #endif 257 #endif
258 258
259 #ifdef ENABLE_CLI_INTERACT_AUTH 259 #ifdef ENABLE_CLI_INTERACT_AUTH
260 if (!finished && ses.authstate.authtypes & AUTH_TYPE_INTERACT) { 260 if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
261 fprintf(stderr, "Sorry, I won't let you use interactive auth unencrypted.\n");
262 } else if (!finished && ses.authstate.authtypes & AUTH_TYPE_INTERACT) {
261 if (cli_ses.auth_interact_failed) { 263 if (cli_ses.auth_interact_failed) {
262 finished = 0; 264 finished = 0;
263 } else { 265 } else {
264 cli_auth_interactive(); 266 cli_auth_interactive();
265 cli_ses.lastauthtype = AUTH_TYPE_INTERACT; 267 cli_ses.lastauthtype = AUTH_TYPE_INTERACT;
267 } 269 }
268 } 270 }
269 #endif 271 #endif
270 272
271 #ifdef ENABLE_CLI_PASSWORD_AUTH 273 #ifdef ENABLE_CLI_PASSWORD_AUTH
272 if (!finished && ses.authstate.authtypes & AUTH_TYPE_PASSWORD) { 274 if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
275 fprintf(stderr, "Sorry, I won't let you use password auth unencrypted.\n");
276 } else if (!finished && ses.authstate.authtypes & AUTH_TYPE_PASSWORD) {
273 cli_auth_password(); 277 cli_auth_password();
274 finished = 1; 278 finished = 1;
275 cli_ses.lastauthtype = AUTH_TYPE_PASSWORD; 279 cli_ses.lastauthtype = AUTH_TYPE_PASSWORD;
276 } 280 }
277 #endif 281 #endif