Variable encrypt_verbose had to be turned on in main.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@253 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Unknown User d91-jda
1996-02-11 09:50:08 +00:00
parent da3520c703
commit a9e3c2cdb5
3 changed files with 86 additions and 109 deletions

View File

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

View File

@@ -84,7 +84,7 @@ char *nclearto;
int encrypt_debug_mode = 0;
static int decrypt_mode = 0;
static int encrypt_mode = 0;
static int encrypt_verbose = 1;
static int encrypt_verbose = 0;
static int autoencrypt = 0;
static int autodecrypt = 0;
static int havesessionkey = 0;
@@ -138,8 +138,7 @@ static unsigned char str_start[72] = { IAC, SB, TELOPT_ENCRYPT };
static unsigned char str_end[] = { IAC, SB, TELOPT_ENCRYPT, 0, IAC, SE };
Encryptions *
findencryption(type)
int type;
findencryption(int type)
{
Encryptions *ep = encryptions;
@@ -151,8 +150,7 @@ findencryption(type)
}
Encryptions *
finddecryption(type)
int type;
finddecryption(int type)
{
Encryptions *ep = encryptions;
@@ -177,9 +175,7 @@ static struct key_info {
};
void
encrypt_init(name, server)
char *name;
int server;
encrypt_init(char *name, int server)
{
Encryptions *ep = encryptions;
@@ -215,7 +211,7 @@ encrypt_init(name, server)
}
void
encrypt_list_types()
encrypt_list_types(void)
{
Encryptions *ep = encryptions;
@@ -227,8 +223,7 @@ encrypt_list_types()
}
int
EncryptEnable(type, mode)
char *type, *mode;
EncryptEnable(char *type, char *mode)
{
if (isprefix(type, "help") || isprefix(type, "?")) {
printf("Usage: encrypt enable <type> [input|output]\n");
@@ -241,8 +236,7 @@ EncryptEnable(type, mode)
}
int
EncryptDisable(type, mode)
char *type, *mode;
EncryptDisable(char *type, char *mode)
{
register Encryptions *ep;
int ret = 0;
@@ -275,9 +269,7 @@ EncryptDisable(type, mode)
}
int
EncryptType(type, mode)
char *type;
char *mode;
EncryptType(char *type, char *mode)
{
register Encryptions *ep;
int ret = 0;
@@ -308,8 +300,7 @@ EncryptType(type, mode)
}
int
EncryptStart(mode)
char *mode;
EncryptStart(char *mode)
{
register int ret = 0;
if (mode) {
@@ -330,7 +321,7 @@ EncryptStart(mode)
}
int
EncryptStartInput()
EncryptStartInput(void)
{
if (decrypt_mode) {
encrypt_send_request_start();
@@ -341,7 +332,7 @@ EncryptStartInput()
}
int
EncryptStartOutput()
EncryptStartOutput(void)
{
if (encrypt_mode) {
encrypt_start_output(encrypt_mode);
@@ -352,8 +343,7 @@ EncryptStartOutput()
}
int
EncryptStop(mode)
char *mode;
EncryptStop(char *mode)
{
int ret = 0;
if (mode) {
@@ -374,21 +364,21 @@ EncryptStop(mode)
}
int
EncryptStopInput()
EncryptStopInput(void)
{
encrypt_send_request_end();
return(1);
}
int
EncryptStopOutput()
EncryptStopOutput(void)
{
encrypt_send_end();
return(1);
}
void
encrypt_display()
encrypt_display(void)
{
printf("Autoencrypt for output is %s. Autodecrypt for input is %s.\r\n",
autoencrypt?"on":"off", autodecrypt?"on":"off");
@@ -407,7 +397,7 @@ encrypt_display()
}
int
EncryptStatus()
EncryptStatus(void)
{
printf("Autoencrypt for output is %s. Autodecrypt for input is %s.\r\n",
autoencrypt?"on":"off", autodecrypt?"on":"off");
@@ -436,7 +426,7 @@ EncryptStatus()
}
void
encrypt_send_support()
encrypt_send_support(void)
{
if (str_suplen) {
/*
@@ -453,8 +443,7 @@ encrypt_send_support()
}
int
EncryptDebug(on)
int on;
EncryptDebug(int on)
{
if (on < 0)
encrypt_debug_mode ^= 1;
@@ -465,22 +454,27 @@ EncryptDebug(on)
return(1);
}
int
EncryptVerbose(on)
int on;
/* turn on verbose encryption, but dont keep telling the whole world
*/
void encrypt_verbose_quiet(int on)
{
if(on < 0)
encrypt_verbose ^= 1;
else
encrypt_verbose = on;
encrypt_verbose = on ? 1 : 0;
}
int
EncryptVerbose(int on)
{
encrypt_verbose_quiet(on);
printf("Encryption %s verbose\r\n",
encrypt_verbose ? "is" : "is not");
return(1);
}
int
EncryptAutoEnc(on)
int on;
EncryptAutoEnc(int on)
{
encrypt_auto(on);
printf("Automatic encryption of output is %s\r\n",
@@ -489,8 +483,7 @@ EncryptAutoEnc(on)
}
int
EncryptAutoDec(on)
int on;
EncryptAutoDec(int on)
{
decrypt_auto(on);
printf("Automatic decryption of input is %s\r\n",
@@ -511,9 +504,7 @@ encrypt_not(void)
* Called when ENCRYPT SUPPORT is received.
*/
void
encrypt_support(typelist, cnt)
unsigned char *typelist;
int cnt;
encrypt_support(unsigned char *typelist, int cnt)
{
register int type, use_type = 0;
Encryptions *ep;
@@ -553,9 +544,7 @@ encrypt_support(typelist, cnt)
}
void
encrypt_is(data, cnt)
unsigned char *data;
int cnt;
encrypt_is(unsigned char *data, int cnt)
{
Encryptions *ep;
register int type, ret;
@@ -599,9 +588,7 @@ encrypt_is(data, cnt)
}
void
encrypt_reply(data, cnt)
unsigned char *data;
int cnt;
encrypt_reply(unsigned char *data, int cnt)
{
Encryptions *ep;
register int ret, type;
@@ -649,9 +636,7 @@ encrypt_reply(data, cnt)
* Called when a ENCRYPT START command is received.
*/
void
encrypt_start(data, cnt)
unsigned char *data;
int cnt;
encrypt_start(unsigned char *data, int cnt)
{
Encryptions *ep;
@@ -687,9 +672,7 @@ encrypt_start(data, cnt)
}
void
encrypt_session_key(key, server)
Session_Key *key;
int server;
encrypt_session_key(Session_Key *key, int server)
{
Encryptions *ep = encryptions;
@@ -706,7 +689,7 @@ encrypt_session_key(key, server)
* Called when ENCRYPT END is received.
*/
void
encrypt_end()
encrypt_end(void)
{
decrypt_input = 0;
if (encrypt_debug_mode)
@@ -719,7 +702,7 @@ encrypt_end()
* Called when ENCRYPT REQUEST-END is received.
*/
void
encrypt_request_end()
encrypt_request_end(void)
{
encrypt_send_end();
}
@@ -731,9 +714,7 @@ encrypt_request_end()
* can.
*/
void
encrypt_request_start(data, cnt)
unsigned char *data;
int cnt;
encrypt_request_start(unsigned char *data, int cnt)
{
if (encrypt_mode == 0) {
if (Server)
@@ -818,8 +799,7 @@ void encrypt_send_keyid(int dir, unsigned char *keyid, int keylen, int saveit)
}
void
encrypt_auto(on)
int on;
encrypt_auto(int on)
{
if (on < 0)
autoencrypt ^= 1;
@@ -828,8 +808,7 @@ encrypt_auto(on)
}
void
decrypt_auto(on)
int on;
decrypt_auto(int on)
{
if (on < 0)
autodecrypt ^= 1;
@@ -838,8 +817,7 @@ decrypt_auto(on)
}
void
encrypt_start_output(type)
int type;
encrypt_start_output(int type)
{
Encryptions *ep;
register unsigned char *p;
@@ -895,7 +873,7 @@ encrypt_start_output(type)
}
void
encrypt_send_end()
encrypt_send_end(void)
{
if (!encrypt_output)
return;
@@ -916,7 +894,7 @@ encrypt_send_end()
}
void
encrypt_send_request_start()
encrypt_send_request_start(void)
{
register unsigned char *p;
register int i;
@@ -936,7 +914,7 @@ encrypt_send_request_start()
}
void
encrypt_send_request_end()
encrypt_send_request_end(void)
{
str_end[3] = ENCRYPT_REQEND;
net_write(str_end, sizeof(str_end));
@@ -959,8 +937,7 @@ void encrypt_wait(void)
}
void
encrypt_debug(mode)
int mode;
encrypt_debug(int mode)
{
encrypt_debug_mode = mode;
}
@@ -986,9 +963,7 @@ void encrypt_gen_printsub(unsigned char *data, int cnt,
}
void
encrypt_printsub(data, cnt, buf, buflen)
unsigned char *data, *buf;
int cnt, buflen;
encrypt_printsub(unsigned char *data, int cnt, unsigned char *buf, int buflen)
{
Encryptions *ep;
register int type = data[1];

View File

@@ -255,6 +255,7 @@ int main(int argc, char **argv)
}
}
encrypt_verbose_quiet(1);
if (autologin == -1) { /* esc@magic.fi; force */
#if defined(AUTHENTICATION)
autologin = 1;