diff options
Diffstat (limited to 'src/appl/telnet/libtelnet/encrypt.c')
-rw-r--r-- | src/appl/telnet/libtelnet/encrypt.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/appl/telnet/libtelnet/encrypt.c b/src/appl/telnet/libtelnet/encrypt.c index 4a539b92b..15f2a88b2 100644 --- a/src/appl/telnet/libtelnet/encrypt.c +++ b/src/appl/telnet/libtelnet/encrypt.c @@ -332,7 +332,8 @@ EncryptStartInput() encrypt_send_request_start(); return(1); } - printf("No previous decryption mode, decryption not enabled\r\n"); + if (!Server) + printf("No previous decryption mode, decryption not enabled\r\n"); return(0); } @@ -343,7 +344,8 @@ EncryptStartOutput() encrypt_start_output(encrypt_mode); return(1); } - printf("No previous encryption mode, encryption not enabled\r\n"); + if (!Server) + printf("No previous encryption mode, encryption not enabled\r\n"); return(0); } @@ -723,27 +725,28 @@ encrypt_request_start(data, cnt) static unsigned char str_keyid[(MAXKEYLEN*2)+5] = { IAC, SB, TELOPT_ENCRYPT }; -encrypt_enc_keyid(keyid, len) +void encrypt_keyid(); + +void encrypt_enc_keyid(keyid, len) unsigned char *keyid; int len; { encrypt_keyid(&ki[1], keyid, len); } -encrypt_dec_keyid(keyid, len) +void encrypt_dec_keyid(keyid, len) unsigned char *keyid; int len; { encrypt_keyid(&ki[0], keyid, len); } -encrypt_keyid(kp, keyid, len) +void encrypt_keyid(kp, keyid, len) struct key_info *kp; unsigned char *keyid; int len; { Encryptions *ep; - unsigned char *strp, *cp; int dir = kp->dir; register int ret = 0; @@ -939,7 +942,6 @@ encrypt_send_request_end() void encrypt_wait() { - register int encrypt, decrypt; if (encrypt_debug_mode) printf(">>>%s: in encrypt_wait\r\n", Name); if (!havesessionkey || !(I_SUPPORT_ENCRYPT & remote_supports_decrypt)) @@ -949,6 +951,13 @@ encrypt_wait() return; } +int encrypt_is_encrypting() +{ + if (encrypt_output && decrypt_input) + return 1; + return 0; +} + void encrypt_debug(mode) int mode; |