17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved. 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * Redistribution and use in source and binary forms, with or without 57c478bd9Sstevel@tonic-gate * modification, are permitted provided that the following conditions 67c478bd9Sstevel@tonic-gate * are met: 77c478bd9Sstevel@tonic-gate * 1. Redistributions of source code must retain the above copyright 87c478bd9Sstevel@tonic-gate * notice, this list of conditions and the following disclaimer. 97c478bd9Sstevel@tonic-gate * 2. Redistributions in binary form must reproduce the above copyright 107c478bd9Sstevel@tonic-gate * notice, this list of conditions and the following disclaimer in the 117c478bd9Sstevel@tonic-gate * documentation and/or other materials provided with the distribution. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 147c478bd9Sstevel@tonic-gate * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 157c478bd9Sstevel@tonic-gate * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 167c478bd9Sstevel@tonic-gate * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 177c478bd9Sstevel@tonic-gate * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 187c478bd9Sstevel@tonic-gate * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 197c478bd9Sstevel@tonic-gate * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 207c478bd9Sstevel@tonic-gate * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 217c478bd9Sstevel@tonic-gate * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 227c478bd9Sstevel@tonic-gate * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 237c478bd9Sstevel@tonic-gate */ 247c478bd9Sstevel@tonic-gate /* 25*6f786aceSNobutomo Nakano * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 267c478bd9Sstevel@tonic-gate * Use is subject to license terms. 277c478bd9Sstevel@tonic-gate */ 287c478bd9Sstevel@tonic-gate 299b03ea0fSjp161948 #ifndef _COMPAT_H 309b03ea0fSjp161948 #define _COMPAT_H 319b03ea0fSjp161948 329b03ea0fSjp161948 /* $OpenBSD: compat.h,v 1.33 2002/09/27 10:42:09 mickey Exp $ */ 339b03ea0fSjp161948 349b03ea0fSjp161948 #ifdef __cplusplus 359b03ea0fSjp161948 extern "C" { 369b03ea0fSjp161948 #endif 379b03ea0fSjp161948 389b03ea0fSjp161948 397c478bd9Sstevel@tonic-gate #define SSH_PROTO_UNKNOWN 0x00 407c478bd9Sstevel@tonic-gate #define SSH_PROTO_1 0x01 417c478bd9Sstevel@tonic-gate #define SSH_PROTO_1_PREFERRED 0x02 427c478bd9Sstevel@tonic-gate #define SSH_PROTO_2 0x04 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gate #define SSH_BUG_SIGBLOB 0x00000001 457c478bd9Sstevel@tonic-gate #define SSH_BUG_PKSERVICE 0x00000002 467c478bd9Sstevel@tonic-gate #define SSH_BUG_HMAC 0x00000004 477c478bd9Sstevel@tonic-gate #define SSH_BUG_X11FWD 0x00000008 487c478bd9Sstevel@tonic-gate #define SSH_OLD_SESSIONID 0x00000010 497c478bd9Sstevel@tonic-gate #define SSH_BUG_PKAUTH 0x00000020 507c478bd9Sstevel@tonic-gate #define SSH_BUG_DEBUG 0x00000040 517c478bd9Sstevel@tonic-gate #define SSH_BUG_BANNER 0x00000080 527c478bd9Sstevel@tonic-gate #define SSH_BUG_IGNOREMSG 0x00000100 537c478bd9Sstevel@tonic-gate #define SSH_BUG_PKOK 0x00000200 547c478bd9Sstevel@tonic-gate #define SSH_BUG_PASSWORDPAD 0x00000400 557c478bd9Sstevel@tonic-gate #define SSH_BUG_SCANNER 0x00000800 567c478bd9Sstevel@tonic-gate #define SSH_BUG_BIGENDIANAES 0x00001000 577c478bd9Sstevel@tonic-gate #define SSH_BUG_RSASIGMD5 0x00002000 587c478bd9Sstevel@tonic-gate #define SSH_OLD_DHGEX 0x00004000 597c478bd9Sstevel@tonic-gate #define SSH_BUG_NOREKEY 0x00008000 607c478bd9Sstevel@tonic-gate #define SSH_BUG_HBSERVICE 0x00010000 617c478bd9Sstevel@tonic-gate #define SSH_BUG_OPENFAILURE 0x00020000 627c478bd9Sstevel@tonic-gate #define SSH_BUG_DERIVEKEY 0x00040000 639b03ea0fSjp161948 /*#define this is free slot 0x00080000 */ 647c478bd9Sstevel@tonic-gate #define SSH_BUG_DUMMYCHAN 0x00100000 657c478bd9Sstevel@tonic-gate #define SSH_BUG_EXTEOF 0x00200000 667c478bd9Sstevel@tonic-gate #define SSH_BUG_K5USER 0x00400000 677c478bd9Sstevel@tonic-gate #define SSH_BUG_PROBE 0x00800000 687c478bd9Sstevel@tonic-gate #define SSH_BUG_LOCALES_NOT_LANGTAGS 0x01000000 697c478bd9Sstevel@tonic-gate #define SSH_OLD_GSSAPI 0x02000000 707c478bd9Sstevel@tonic-gate #define SSH_BUG_GSSAPI_BER 0x04000000 717c478bd9Sstevel@tonic-gate #define SSH_BUG_FIRSTKEX 0x08000000 729b03ea0fSjp161948 #define SSH_BUG_RFWD_ADDR 0x10000000 737c478bd9Sstevel@tonic-gate #define SSH_BUG_GSSKEX_HOSTKEY 0x20000000 749b03ea0fSjp161948 /* SSH_OLD_FORWARD_ADDR flag bumped up the SunSSH version to 1.2 */ 759b03ea0fSjp161948 #define SSH_OLD_FORWARD_ADDR 0x40000000 76*6f786aceSNobutomo Nakano /* SSH_BUG_STRING_ENCODING flag bumped up the SunSSH version to 1.4 */ 77*6f786aceSNobutomo Nakano #define SSH_BUG_STRING_ENCODING 0x80000000 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gate void enable_compat13(void); 807c478bd9Sstevel@tonic-gate void enable_compat20(void); 817c478bd9Sstevel@tonic-gate void compat_datafellows(const char *); 827c478bd9Sstevel@tonic-gate int proto_spec(const char *); 837c478bd9Sstevel@tonic-gate char *compat_cipher_proposal(char *); 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gate extern int compat13; 867c478bd9Sstevel@tonic-gate extern int compat20; 87*6f786aceSNobutomo Nakano extern uint32_t datafellows; 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate #ifdef __cplusplus 907c478bd9Sstevel@tonic-gate } 917c478bd9Sstevel@tonic-gate #endif 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gate #endif /* _COMPAT_H */ 94