=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/telnet/Attic/authenc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** src/usr.bin/telnet/Attic/authenc.c 1996/03/27 19:32:57 1.2 --- src/usr.bin/telnet/Attic/authenc.c 1998/03/12 04:57:27 1.3 *************** *** 1,4 **** ! /* $OpenBSD: authenc.c,v 1.2 1996/03/27 19:32:57 niklas Exp $ */ /* $NetBSD: authenc.c,v 1.5 1996/02/28 21:03:52 thorpej Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: authenc.c,v 1.3 1998/03/12 04:57:27 art Exp $ */ /* $NetBSD: authenc.c,v 1.5 1996/02/28 21:03:52 thorpej Exp $ */ /*- *************** *** 34,60 **** * SUCH DAMAGE. */ ! #ifndef lint ! #if 0 ! static char sccsid[] = "@(#)authenc.c 8.1 (Berkeley) 6/6/93"; ! static char rcsid[] = "$NetBSD: authenc.c,v 1.5 1996/02/28 21:03:52 thorpej Exp $"; ! #else ! static char rcsid[] = "$OpenBSD: authenc.c,v 1.2 1996/03/27 19:32:57 niklas Exp $"; ! #endif ! #endif /* not lint */ ! #if defined(AUTHENTICATION) ! #include ! #include ! #include ! #include - #include "general.h" - #include "ring.h" - #include "externs.h" - #include "defines.h" - #include "types.h" - int net_write(str, len) unsigned char *str; --- 34,43 ---- * SUCH DAMAGE. */ ! #include "telnet_locl.h" ! #if defined(AUTHENTICATION) || defined(ENCRYPTION) int net_write(str, len) unsigned char *str; *************** *** 72,77 **** --- 55,66 ---- void net_encrypt() { + #if defined(ENCRYPTION) + if (encrypt_output) + ring_encrypt(&netoring, encrypt_output); + else + ring_clearto(&netoring); + #endif } int *************** *** 103,109 **** if (echo) { printf("%s", prompt); res = fgets(result, length, stdin); ! } else if (res = getpass(prompt)) { strncpy(result, res, length); res = result; } --- 92,98 ---- if (echo) { printf("%s", prompt); res = fgets(result, length, stdin); ! } else if ((res = getpass(prompt))) { strncpy(result, res, length); res = result; }