comparison cli-auth.c @ 681:a4b7627b3157 insecure-nocrypto

Update insecure-nocrypto to current head
author Matt Johnston <matt@ucc.asn.au>
date Wed, 16 May 2012 22:54:51 +0800
parents de3653483ac0 582cb38e4eb5
children 5af8993f7529
comparison
equal deleted inserted replaced
680:bd4b5d7886e5 681:a4b7627b3157
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 }
263 else if (!finished && ses.authstate.authtypes & AUTH_TYPE_INTERACT) {
261 if (cli_ses.auth_interact_failed) { 264 if (cli_ses.auth_interact_failed) {
262 finished = 0; 265 finished = 0;
263 } else { 266 } else {
264 cli_auth_interactive(); 267 cli_auth_interactive();
265 cli_ses.lastauthtype = AUTH_TYPE_INTERACT; 268 cli_ses.lastauthtype = AUTH_TYPE_INTERACT;
267 } 270 }
268 } 271 }
269 #endif 272 #endif
270 273
271 #ifdef ENABLE_CLI_PASSWORD_AUTH 274 #ifdef ENABLE_CLI_PASSWORD_AUTH
272 if (!finished && ses.authstate.authtypes & AUTH_TYPE_PASSWORD) { 275 if (ses.keys->trans.algo_crypt->cipherdesc == NULL) {
276 fprintf(stderr, "Sorry, I won't let you use password auth unencrypted.\n");
277 }
278 else if (!finished && ses.authstate.authtypes & AUTH_TYPE_PASSWORD) {
273 cli_auth_password(); 279 cli_auth_password();
274 finished = 1; 280 finished = 1;
275 cli_ses.lastauthtype = AUTH_TYPE_PASSWORD; 281 cli_ses.lastauthtype = AUTH_TYPE_PASSWORD;
276 } 282 }
277 #endif 283 #endif