129088Smarkm/*-
229088Smarkm * Copyright (c) 1991, 1993
329088Smarkm *	The Regents of the University of California.  All rights reserved.
429088Smarkm *
529088Smarkm * Redistribution and use in source and binary forms, with or without
629088Smarkm * modification, are permitted provided that the following conditions
729088Smarkm * are met:
829088Smarkm * 1. Redistributions of source code must retain the above copyright
929088Smarkm *    notice, this list of conditions and the following disclaimer.
1029088Smarkm * 2. Redistributions in binary form must reproduce the above copyright
1129088Smarkm *    notice, this list of conditions and the following disclaimer in the
1229088Smarkm *    documentation and/or other materials provided with the distribution.
1329088Smarkm * 3. All advertising materials mentioning features or use of this software
1429088Smarkm *    must display the following acknowledgement:
1529088Smarkm *	This product includes software developed by the University of
1629088Smarkm *	California, Berkeley and its contributors.
1729088Smarkm * 4. Neither the name of the University nor the names of its contributors
1829088Smarkm *    may be used to endorse or promote products derived from this software
1929088Smarkm *    without specific prior written permission.
2029088Smarkm *
2129088Smarkm * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2229088Smarkm * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2329088Smarkm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2429088Smarkm * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2529088Smarkm * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2629088Smarkm * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2729088Smarkm * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2829088Smarkm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2929088Smarkm * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3029088Smarkm * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3129088Smarkm * SUCH DAMAGE.
3229088Smarkm */
3329088Smarkm
34114630Sobrien#if 0
3529088Smarkm#ifndef lint
3629181Smarkmstatic const char sccsid[] = "@(#)authenc.c	8.2 (Berkeley) 5/30/95";
3731622Scharnier#endif
38114630Sobrien#endif
39114630Sobrien#include <sys/cdefs.h>
40114630Sobrien__FBSDID("$FreeBSD$");
4129088Smarkm
4287139Smarkm#ifdef	AUTHENTICATION
4387139Smarkm#ifdef	ENCRYPTION
4487139Smarkm/* Above "#ifdef"s actually "or"'ed together. XXX MarkM
4587139Smarkm */
4629088Smarkm#include "telnetd.h"
4729088Smarkm#include <libtelnet/misc.h>
4829088Smarkm
4987139Smarkmint
5087139Smarkmnet_write(unsigned char *str, int len)
5129088Smarkm{
5229088Smarkm	if (nfrontp + len < netobuf + BUFSIZ) {
5379981Sru		output_datalen(str, len);
5429088Smarkm		return(len);
5529088Smarkm	}
5629088Smarkm	return(0);
5729088Smarkm}
5829088Smarkm
5987139Smarkmvoid
6087139Smarkmnet_encrypt(void)
6129088Smarkm{
6229088Smarkm#ifdef	ENCRYPTION
6329088Smarkm	char *s = (nclearto > nbackp) ? nclearto : nbackp;
6429088Smarkm	if (s < nfrontp && encrypt_output) {
6529088Smarkm		(*encrypt_output)((unsigned char *)s, nfrontp - s);
6629088Smarkm	}
6729088Smarkm	nclearto = nfrontp;
6829088Smarkm#endif /* ENCRYPTION */
6929088Smarkm}
7029088Smarkm
7187139Smarkmint
7287139Smarkmtelnet_spin(void)
7329088Smarkm{
7429088Smarkm	ttloop();
7529088Smarkm	return(0);
7629088Smarkm}
7729088Smarkm
7887139Smarkmchar *
7987139Smarkmtelnet_getenv(char *val)
8029088Smarkm{
8129088Smarkm	return(getenv(val));
8229088Smarkm}
8329088Smarkm
8487139Smarkmchar *
8587139Smarkmtelnet_gets(const char *prompt __unused, char *result __unused, int length __unused, int echo __unused)
8629088Smarkm{
8787139Smarkm	return(NULL);
8829088Smarkm}
8987139Smarkm#endif	/* ENCRYPTION */
9087139Smarkm#endif	/* AUTHENTICATION */
91