xref: /csrg-svn/libexec/telnetd/authenc.c (revision 60151)
146813Sdab /*-
246813Sdab  * Copyright (c) 1991 The Regents of the University of California.
346813Sdab  * All rights reserved.
446813Sdab  *
546813Sdab  * %sccs.include.redist.c%
646813Sdab  */
746813Sdab 
846813Sdab #ifndef lint
9*60151Sdab static char sccsid[] = "@(#)authenc.c	5.3 (Berkeley) 05/20/93";
1046813Sdab #endif /* not lint */
1146813Sdab 
12*60151Sdab #if	defined(AUTHENTICATION) || defined(ENCRYPTION)
1346813Sdab #include "telnetd.h"
1446813Sdab #include <libtelnet/misc.h>
1546813Sdab 
1646813Sdab 	int
1746813Sdab net_write(str, len)
1846813Sdab 	unsigned char *str;
1946813Sdab 	int len;
2046813Sdab {
2146813Sdab 	if (nfrontp + len < netobuf + BUFSIZ) {
2246813Sdab 		bcopy((void *)str, (void *)nfrontp, len);
2346813Sdab 		nfrontp += len;
2446813Sdab 		return(len);
2546813Sdab 	}
2646813Sdab 	return(0);
2746813Sdab }
2846813Sdab 
2946813Sdab 	void
3046813Sdab net_encrypt()
3146813Sdab {
32*60151Sdab #ifdef	ENCRYPTION
3346813Sdab 	char *s = (nclearto > nbackp) ? nclearto : nbackp;
3446813Sdab 	if (s < nfrontp && encrypt_output) {
3546813Sdab 		(*encrypt_output)((unsigned char *)s, nfrontp - s);
3646813Sdab 	}
3746813Sdab 	nclearto = nfrontp;
38*60151Sdab #endif /* ENCRYPTION */
3946813Sdab }
4046813Sdab 
4146813Sdab 	int
4246813Sdab telnet_spin()
4346813Sdab {
4446813Sdab 	ttloop();
4546813Sdab 	return(0);
4646813Sdab }
4746813Sdab 
4846813Sdab 	char *
4946813Sdab telnet_getenv(val)
5046813Sdab 	char *val;
5146813Sdab {
5246813Sdab 	extern char *getenv();
5346813Sdab 	return(getenv(val));
5446813Sdab }
5546813Sdab 
5646813Sdab 	char *
5746813Sdab telnet_gets(prompt, result, length, echo)
5846813Sdab 	char *prompt;
5946813Sdab 	char *result;
6046813Sdab 	int length;
6146813Sdab 	int echo;
6246813Sdab {
6346813Sdab 	return((char *)0);
6446813Sdab }
65*60151Sdab #endif	/* defined(AUTHENTICATION) || defined(ENCRYPTION) */
66