xref: /onnv-gate/usr/src/cmd/ssh/include/compat.h (revision 9600:113cf06ae502)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * Copyright (c) 1999, 2000, 2001 Markus Friedl.  All rights reserved.
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * Redistribution and use in source and binary forms, with or without
50Sstevel@tonic-gate  * modification, are permitted provided that the following conditions
60Sstevel@tonic-gate  * are met:
70Sstevel@tonic-gate  * 1. Redistributions of source code must retain the above copyright
80Sstevel@tonic-gate  *    notice, this list of conditions and the following disclaimer.
90Sstevel@tonic-gate  * 2. Redistributions in binary form must reproduce the above copyright
100Sstevel@tonic-gate  *    notice, this list of conditions and the following disclaimer in the
110Sstevel@tonic-gate  *    documentation and/or other materials provided with the distribution.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
140Sstevel@tonic-gate  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
150Sstevel@tonic-gate  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
160Sstevel@tonic-gate  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
170Sstevel@tonic-gate  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
180Sstevel@tonic-gate  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
190Sstevel@tonic-gate  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
200Sstevel@tonic-gate  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
210Sstevel@tonic-gate  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
220Sstevel@tonic-gate  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
230Sstevel@tonic-gate  */
240Sstevel@tonic-gate /*
25*9600SNobutomo.Nakano@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
260Sstevel@tonic-gate  * Use is subject to license terms.
270Sstevel@tonic-gate  */
280Sstevel@tonic-gate 
295334Sjp161948 #ifndef	_COMPAT_H
305334Sjp161948 #define	_COMPAT_H
315334Sjp161948 
325334Sjp161948 /*	$OpenBSD: compat.h,v 1.33 2002/09/27 10:42:09 mickey Exp $	*/
335334Sjp161948 
345334Sjp161948 #ifdef __cplusplus
355334Sjp161948 extern "C" {
365334Sjp161948 #endif
375334Sjp161948 
385334Sjp161948 
390Sstevel@tonic-gate #define	SSH_PROTO_UNKNOWN 	0x00
400Sstevel@tonic-gate #define	SSH_PROTO_1		0x01
410Sstevel@tonic-gate #define	SSH_PROTO_1_PREFERRED	0x02
420Sstevel@tonic-gate #define	SSH_PROTO_2		0x04
430Sstevel@tonic-gate 
440Sstevel@tonic-gate #define SSH_BUG_SIGBLOB		0x00000001
450Sstevel@tonic-gate #define SSH_BUG_PKSERVICE	0x00000002
460Sstevel@tonic-gate #define SSH_BUG_HMAC		0x00000004
470Sstevel@tonic-gate #define SSH_BUG_X11FWD		0x00000008
480Sstevel@tonic-gate #define SSH_OLD_SESSIONID	0x00000010
490Sstevel@tonic-gate #define SSH_BUG_PKAUTH		0x00000020
500Sstevel@tonic-gate #define SSH_BUG_DEBUG		0x00000040
510Sstevel@tonic-gate #define SSH_BUG_BANNER		0x00000080
520Sstevel@tonic-gate #define SSH_BUG_IGNOREMSG	0x00000100
530Sstevel@tonic-gate #define SSH_BUG_PKOK		0x00000200
540Sstevel@tonic-gate #define SSH_BUG_PASSWORDPAD	0x00000400
550Sstevel@tonic-gate #define SSH_BUG_SCANNER		0x00000800
560Sstevel@tonic-gate #define SSH_BUG_BIGENDIANAES	0x00001000
570Sstevel@tonic-gate #define SSH_BUG_RSASIGMD5	0x00002000
580Sstevel@tonic-gate #define SSH_OLD_DHGEX		0x00004000
590Sstevel@tonic-gate #define SSH_BUG_NOREKEY		0x00008000
600Sstevel@tonic-gate #define SSH_BUG_HBSERVICE	0x00010000
610Sstevel@tonic-gate #define SSH_BUG_OPENFAILURE	0x00020000
620Sstevel@tonic-gate #define SSH_BUG_DERIVEKEY	0x00040000
635334Sjp161948 /*#define this is free slot	0x00080000 */
640Sstevel@tonic-gate #define SSH_BUG_DUMMYCHAN	0x00100000
650Sstevel@tonic-gate #define SSH_BUG_EXTEOF		0x00200000
660Sstevel@tonic-gate #define SSH_BUG_K5USER		0x00400000
670Sstevel@tonic-gate #define SSH_BUG_PROBE		0x00800000
680Sstevel@tonic-gate #define SSH_BUG_LOCALES_NOT_LANGTAGS		0x01000000
690Sstevel@tonic-gate #define SSH_OLD_GSSAPI		0x02000000
700Sstevel@tonic-gate #define SSH_BUG_GSSAPI_BER	0x04000000
710Sstevel@tonic-gate #define SSH_BUG_FIRSTKEX	0x08000000
725334Sjp161948 #define SSH_BUG_RFWD_ADDR	0x10000000
730Sstevel@tonic-gate #define SSH_BUG_GSSKEX_HOSTKEY	0x20000000
745334Sjp161948 /* SSH_OLD_FORWARD_ADDR flag bumped up the SunSSH version to 1.2 */
755334Sjp161948 #define SSH_OLD_FORWARD_ADDR	0x40000000
76*9600SNobutomo.Nakano@Sun.COM /* SSH_BUG_STRING_ENCODING flag bumped up the SunSSH version to 1.4 */
77*9600SNobutomo.Nakano@Sun.COM #define SSH_BUG_STRING_ENCODING 0x80000000
780Sstevel@tonic-gate 
790Sstevel@tonic-gate void     enable_compat13(void);
800Sstevel@tonic-gate void     enable_compat20(void);
810Sstevel@tonic-gate void     compat_datafellows(const char *);
820Sstevel@tonic-gate int	 proto_spec(const char *);
830Sstevel@tonic-gate char	*compat_cipher_proposal(char *);
840Sstevel@tonic-gate 
850Sstevel@tonic-gate extern int compat13;
860Sstevel@tonic-gate extern int compat20;
87*9600SNobutomo.Nakano@Sun.COM extern uint32_t datafellows;
880Sstevel@tonic-gate 
890Sstevel@tonic-gate #ifdef __cplusplus
900Sstevel@tonic-gate }
910Sstevel@tonic-gate #endif
920Sstevel@tonic-gate 
930Sstevel@tonic-gate #endif /* _COMPAT_H */
94