xref: /netbsd/lib/libtelnet/auth-proto.h (revision dccc2c6f)
1*dccc2c6fSchristos /*	$NetBSD: auth-proto.h,v 1.16 2018/12/14 23:42:39 christos Exp $	*/
20667d122Schristos 
361f28255Scgd /*-
450c0885eScgd  * Copyright (c) 1991, 1993
550c0885eScgd  *	The Regents of the University of California.  All rights reserved.
661f28255Scgd  *
761f28255Scgd  * Redistribution and use in source and binary forms, with or without
861f28255Scgd  * modification, are permitted provided that the following conditions
961f28255Scgd  * are met:
1061f28255Scgd  * 1. Redistributions of source code must retain the above copyright
1161f28255Scgd  *    notice, this list of conditions and the following disclaimer.
1261f28255Scgd  * 2. Redistributions in binary form must reproduce the above copyright
1361f28255Scgd  *    notice, this list of conditions and the following disclaimer in the
1461f28255Scgd  *    documentation and/or other materials provided with the distribution.
15eb7c1594Sagc  * 3. Neither the name of the University nor the names of its contributors
1661f28255Scgd  *    may be used to endorse or promote products derived from this software
1761f28255Scgd  *    without specific prior written permission.
1861f28255Scgd  *
1961f28255Scgd  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2061f28255Scgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2161f28255Scgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2261f28255Scgd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2361f28255Scgd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2461f28255Scgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2561f28255Scgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2661f28255Scgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2761f28255Scgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2861f28255Scgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2961f28255Scgd  * SUCH DAMAGE.
3061f28255Scgd  *
3150c0885eScgd  *	from: @(#)auth-proto.h	8.1 (Berkeley) 6/4/93
3261f28255Scgd  */
3361f28255Scgd 
3461f28255Scgd /*
3561f28255Scgd  * Copyright (C) 1990 by the Massachusetts Institute of Technology
3661f28255Scgd  *
3761f28255Scgd  * Export of this software from the United States of America is assumed
3861f28255Scgd  * to require a specific license from the United States Government.
3961f28255Scgd  * It is the responsibility of any person or organization contemplating
4061f28255Scgd  * export to obtain such a license before exporting.
4161f28255Scgd  *
4261f28255Scgd  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
4361f28255Scgd  * distribute this software and its documentation for any purpose and
4461f28255Scgd  * without fee is hereby granted, provided that the above copyright
4561f28255Scgd  * notice appear in all copies and that both that copyright notice and
4661f28255Scgd  * this permission notice appear in supporting documentation, and that
4761f28255Scgd  * the name of M.I.T. not be used in advertising or publicity pertaining
4861f28255Scgd  * to distribution of the software without specific, written prior
4961f28255Scgd  * permission.  M.I.T. makes no representations about the suitability of
5061f28255Scgd  * this software for any purpose.  It is provided "as is" without express
5161f28255Scgd  * or implied warranty.
5261f28255Scgd  */
5361f28255Scgd 
54c0d0aa9eSchristos #ifndef _LIBTELNET_AUTH_PROTO_H_
55c0d0aa9eSchristos #define _LIBTELNET_AUTH_PROTO_H_
56f0f12c9eSpk #include <sys/cdefs.h>
5761f28255Scgd 
587b8c272dSitojun #ifdef AUTHENTICATION
594fcf8685Sperry Authenticator *findauthenticator(int, int);
6061f28255Scgd 
614fcf8685Sperry void auth_init(const char *, int);
624fcf8685Sperry int auth_cmd(int, char **);
634fcf8685Sperry void auth_request(void);
644fcf8685Sperry void auth_send(unsigned char *, int);
654fcf8685Sperry void auth_send_retry(void);
664fcf8685Sperry void auth_is(unsigned char *, int);
674fcf8685Sperry void auth_reply(unsigned char *, int);
684fcf8685Sperry void auth_disable_name(char *);
694fcf8685Sperry void auth_gen_printsub(unsigned char *, int, unsigned char *, int);
70f0f12c9eSpk 
71*dccc2c6fSchristos int getauthmask(const char *, int *);
72*dccc2c6fSchristos int auth_enable(const char *);
73*dccc2c6fSchristos int auth_disable(const char *);
74*dccc2c6fSchristos int auth_onoff(const char *, int);
754fcf8685Sperry int auth_togdebug(int);
76*dccc2c6fSchristos int auth_status(const char *);
774fcf8685Sperry void auth_name(unsigned char *, int);
784fcf8685Sperry int auth_sendname(unsigned char *, int);
794fcf8685Sperry void auth_finished(Authenticator *, int);
804fcf8685Sperry int auth_wait(char *, size_t);
814fcf8685Sperry void auth_debug(int);
824fcf8685Sperry void auth_printsub(unsigned char *, int, unsigned char *, int);
8361f28255Scgd 
8461f28255Scgd #ifdef	KRB5
854fcf8685Sperry int kerberos5_init(Authenticator *, int);
864fcf8685Sperry int kerberos5_send(Authenticator *);
874fcf8685Sperry void kerberos5_is(Authenticator *, unsigned char *, int);
884fcf8685Sperry void kerberos5_reply(Authenticator *, unsigned char *, int);
894fcf8685Sperry int kerberos5_status(Authenticator *, char *, size_t, int);
904fcf8685Sperry void kerberos5_printsub(unsigned char *, int, unsigned char *, int);
9161f28255Scgd #endif
92185393efSchristos 
93185393efSchristos #ifdef SRA
94185393efSchristos int sra_init(Authenticator *, int);
95185393efSchristos int sra_send(Authenticator *);
96185393efSchristos void sra_is(Authenticator *, unsigned char *, int);
97185393efSchristos void sra_reply(Authenticator *, unsigned char *, int);
98185393efSchristos int sra_status(Authenticator *, char *, size_t, int);
99185393efSchristos void sra_printsub(unsigned char *, int, unsigned char *, int);
10061f28255Scgd #endif
101185393efSchristos 
102185393efSchristos #endif /* AUTHENTICATION */
103c0d0aa9eSchristos #endif /* _LIBTELNET_AUTH_PROTO_H_ */
104