default to waiting for encryption if we are using authentication

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10820 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2002-02-07 16:12:20 +00:00
parent c2cde6766e
commit 5c081c1559
2 changed files with 8 additions and 3 deletions

View File

@@ -329,6 +329,7 @@ main(int argc, char **argv)
#if defined(ENCRYPTION)
encrypt_auto(1);
decrypt_auto(1);
wantencryption = -1;
#endif
}

View File

@@ -2071,9 +2071,13 @@ my_telnet(char *user)
send_will(TELOPT_ENCRYPT, 1);
while (1) {
if (my_want_state_is_wont(TELOPT_AUTHENTICATION)) {
printf("\nServer refused to negotiate authentication,\n");
printf("which is required for encryption.\n");
Exit(1);
if (wantencryption == -1) {
break;
} else {
printf("\nServer refused to negotiate authentication,\n");
printf("which is required for encryption.\n");
Exit(1);
}
}
if (auth_has_failed) {
printf("\nAuthentication negotation has failed,\n");