Print message about not encrypting when receiving WONT or DONT encrypt.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@247 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Unknown User d91-jda
1996-02-11 04:09:28 +00:00
parent fcb08660bc
commit 74f17a8ba2
3 changed files with 24 additions and 6 deletions

View File

@@ -69,6 +69,7 @@ Encryptions *findencryption P((int));
void encrypt_send_supprt P((void)); void encrypt_send_supprt P((void));
void encrypt_auto P((int)); void encrypt_auto P((int));
void decrypt_auto P((int)); void decrypt_auto P((int));
void encrypt_not P((void));
void encrypt_is P((unsigned char *, int)); void encrypt_is P((unsigned char *, int));
void encrypt_reply P((unsigned char *, int)); void encrypt_reply P((unsigned char *, int));
void encrypt_start_input P((int)); void encrypt_start_input P((int));

View File

@@ -498,6 +498,15 @@ EncryptAutoDec(on)
return(1); return(1);
} }
/* Called when we receive a WONT or a DONT ENCRYPT after we sent a DO
encrypt */
void
encrypt_not(void)
{
if(encrypt_verbose)
printf("[ Connection is NOT encrypted ]\r\n");
}
/* /*
* Called when ENCRYPT SUPPORT is received. * Called when ENCRYPT SUPPORT is received.
*/ */

View File

@@ -376,9 +376,8 @@ willoption(option)
#endif #endif
} }
void void
wontoption(option) wontoption(int option)
int option;
{ {
if (do_dont_resp[option]) { if (do_dont_resp[option]) {
--do_dont_resp[option]; --do_dont_resp[option];
@@ -407,6 +406,11 @@ wontoption(option)
set_my_state_dont(option); set_my_state_dont(option);
return; /* Never reply to TM will's/wont's */ return; /* Never reply to TM will's/wont's */
#ifdef ENCRYPTION
case TELOPT_ENCRYPT:
encrypt_not();
break;
#endif
default: default:
break; break;
} }
@@ -535,9 +539,8 @@ dooption(option)
set_my_state_will(option); set_my_state_will(option);
} }
static void static void
dontoption(option) dontoption(int option)
int option;
{ {
if (will_wont_resp[option]) { if (will_wont_resp[option]) {
@@ -560,6 +563,11 @@ dontoption(option)
send_will(TELOPT_OLD_ENVIRON, 1); send_will(TELOPT_OLD_ENVIRON, 1);
telopt_environ = TELOPT_OLD_ENVIRON; telopt_environ = TELOPT_OLD_ENVIRON;
break; break;
#endif
#ifdef ENCRYPTION
case TELOPT_ENCRYPT:
encrypt_not();
break;
#endif #endif
} }
/* we always accept a DONT */ /* we always accept a DONT */