xref: /netbsd-src/crypto/external/bsd/openssh/dist/compat.h (revision 392e23cea848cf8a43b82c1b60cb302be86367f0)
1*392e23ceSrin /*	$NetBSD: compat.h,v 1.18 2023/07/28 04:27:30 rin Exp $	*/
2b1066cf3Schristos /* $OpenBSD: compat.h,v 1.62 2023/03/06 12:14:48 dtucker Exp $ */
3ca32bd8dSchristos 
4ca32bd8dSchristos /*
5ca32bd8dSchristos  * Copyright (c) 1999, 2000, 2001 Markus Friedl.  All rights reserved.
6ca32bd8dSchristos  *
7ca32bd8dSchristos  * Redistribution and use in source and binary forms, with or without
8ca32bd8dSchristos  * modification, are permitted provided that the following conditions
9ca32bd8dSchristos  * are met:
10ca32bd8dSchristos  * 1. Redistributions of source code must retain the above copyright
11ca32bd8dSchristos  *    notice, this list of conditions and the following disclaimer.
12ca32bd8dSchristos  * 2. Redistributions in binary form must reproduce the above copyright
13ca32bd8dSchristos  *    notice, this list of conditions and the following disclaimer in the
14ca32bd8dSchristos  *    documentation and/or other materials provided with the distribution.
15ca32bd8dSchristos  *
16ca32bd8dSchristos  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17ca32bd8dSchristos  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18ca32bd8dSchristos  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19ca32bd8dSchristos  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20ca32bd8dSchristos  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21ca32bd8dSchristos  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22ca32bd8dSchristos  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23ca32bd8dSchristos  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24ca32bd8dSchristos  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25ca32bd8dSchristos  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26ca32bd8dSchristos  */
27ca32bd8dSchristos 
28ca32bd8dSchristos #ifndef COMPAT_H
29ca32bd8dSchristos #define COMPAT_H
30ca32bd8dSchristos 
31ffae97bbSchristos #define SSH_BUG_UTF8TTYMODE	0x00000001
3255a4608bSchristos #define SSH_BUG_SIGTYPE		0x00000002
33b592f463Schristos #define SSH_BUG_SIGTYPE74	0x00000004
34ffae97bbSchristos /* #define unused		0x00000008 */
35ca32bd8dSchristos #define SSH_OLD_SESSIONID	0x00000010
36ffae97bbSchristos /* #define unused		0x00000020 */
37ca32bd8dSchristos #define SSH_BUG_DEBUG		0x00000040
38ffae97bbSchristos /* #define unused		0x00000080 */
39b1066cf3Schristos /* #define unused		0x00000100 */
40ffae97bbSchristos /* #define unused		0x00000200 */
41b1066cf3Schristos /* #define unused		0x00000400 */
42ca32bd8dSchristos #define SSH_BUG_SCANNER		0x00000800
43b1066cf3Schristos /* #define unused		0x00001000 */
44b1066cf3Schristos /* #define unused		0x00002000 */
45ca32bd8dSchristos #define SSH_OLD_DHGEX		0x00004000
46ca32bd8dSchristos #define SSH_BUG_NOREKEY		0x00008000
47ffae97bbSchristos /* #define unused		0x00010000 */
48ffae97bbSchristos /* #define unused		0x00020000 */
49ffae97bbSchristos /* #define unused		0x00040000 */
50ffae97bbSchristos /* #define unused		0x00100000 */
51ca32bd8dSchristos #define SSH_BUG_EXTEOF		0x00200000
52ca32bd8dSchristos #define SSH_BUG_PROBE		0x00400000
53ffae97bbSchristos /* #define unused		0x00800000 */
54ca32bd8dSchristos #define SSH_OLD_FORWARD_ADDR	0x01000000
55ffae97bbSchristos /* #define unused		0x02000000 */
56ca32bd8dSchristos #define SSH_NEW_OPENSSH		0x04000000
57091c4109Schristos #define SSH_BUG_DYNAMIC_RPORT	0x08000000
588a4530f9Schristos #define SSH_BUG_CURVE25519PAD	0x10000000
594054ffb0Schristos #define SSH_BUG_HOSTKEYS	0x20000000
604054ffb0Schristos #define SSH_BUG_DHGEX_LARGE	0x40000000
614054ffb0Schristos #define SSH_BUG_LARGEWINDOW	0x80000000
62ca32bd8dSchristos 
6317418e98Schristos struct ssh;
64ca32bd8dSchristos 
6517418e98Schristos void    compat_banner(struct ssh *, const char *);
66b1066cf3Schristos char	*compat_kex_proposal(struct ssh *, const char *);
67ca32bd8dSchristos #endif
68