xref: /onnv-gate/usr/src/cmd/ssh/include/myproposal.h (revision 8658:9772d2c4d0b9)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * Copyright (c) 2000 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  */
246288Sjp161948 
256288Sjp161948 /*
26*8658SJan.Pechanec@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
276288Sjp161948  * Use is subject to license terms.
286288Sjp161948  */
296288Sjp161948 
306288Sjp161948 /*	$OpenBSD: myproposal.h,v 1.14 2002/04/03 09:26:11 markus Exp $	*/
316288Sjp161948 
326288Sjp161948 #ifndef	_MYPROPOSAL_H
336288Sjp161948 #define	_MYPROPOSAL_H
346288Sjp161948 
356288Sjp161948 #ifdef __cplusplus
366288Sjp161948 extern "C" {
376288Sjp161948 #endif
386288Sjp161948 
396288Sjp161948 
40*8658SJan.Pechanec@Sun.COM #define	KEX_DEFAULT_KEX			"diffie-hellman-group-exchange-sha1," \
41*8658SJan.Pechanec@Sun.COM 					"diffie-hellman-group1-sha1"
426288Sjp161948 
43*8658SJan.Pechanec@Sun.COM #define	KEX_DEFAULT_PK_ALG		"ssh-rsa,ssh-dss"
446288Sjp161948 
45*8658SJan.Pechanec@Sun.COM /*
46*8658SJan.Pechanec@Sun.COM  * Keep CBC modes in the back of the client default cipher list for backward
47*8658SJan.Pechanec@Sun.COM  * compatibility but remove them from the server side because there are some
48*8658SJan.Pechanec@Sun.COM  * potential security issues with those modes regarding SSH protocol version 2.
49*8658SJan.Pechanec@Sun.COM  * Since the client is the one who picks the cipher from the list offered by the
50*8658SJan.Pechanec@Sun.COM  * server the only way to force the client not to use CBC modes is not to
51*8658SJan.Pechanec@Sun.COM  * advertise those at all. Note that we still support all such CBC modes in the
52*8658SJan.Pechanec@Sun.COM  * server code, this is about the default server cipher list only. The list can
53*8658SJan.Pechanec@Sun.COM  * be changed in the Ciphers option in the sshd_config(4) file.
54*8658SJan.Pechanec@Sun.COM  *
55*8658SJan.Pechanec@Sun.COM  * Note that the ordering of ciphers on the server side is not relevant but we
56*8658SJan.Pechanec@Sun.COM  * must do it properly even here so that we can use the macro for the client
57*8658SJan.Pechanec@Sun.COM  * list as well.
58*8658SJan.Pechanec@Sun.COM  */
59*8658SJan.Pechanec@Sun.COM #define	KEX_DEFAULT_SERVER_ENCRYPT	"aes128-ctr,aes192-ctr,aes256-ctr," \
60*8658SJan.Pechanec@Sun.COM 					"arcfour"
616288Sjp161948 
62*8658SJan.Pechanec@Sun.COM #define	KEX_DEFAULT_CLIENT_ENCRYPT	KEX_DEFAULT_SERVER_ENCRYPT \
63*8658SJan.Pechanec@Sun.COM 					",aes128-cbc,aes192-cbc,aes256-cbc," \
64*8658SJan.Pechanec@Sun.COM 					"blowfish-cbc,3des-cbc"
656288Sjp161948 
66*8658SJan.Pechanec@Sun.COM #define	KEX_DEFAULT_MAC			"hmac-md5,hmac-sha1,hmac-sha1-96," \
67*8658SJan.Pechanec@Sun.COM 					"hmac-md5-96"
68*8658SJan.Pechanec@Sun.COM 
69*8658SJan.Pechanec@Sun.COM #define	KEX_DEFAULT_COMP		"none,zlib"
70*8658SJan.Pechanec@Sun.COM #define	KEX_DEFAULT_LANG		""
710Sstevel@tonic-gate 
720Sstevel@tonic-gate 
73*8658SJan.Pechanec@Sun.COM static char *my_srv_proposal[PROPOSAL_MAX] = {
740Sstevel@tonic-gate 	KEX_DEFAULT_KEX,
750Sstevel@tonic-gate 	KEX_DEFAULT_PK_ALG,
76*8658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_SERVER_ENCRYPT,
77*8658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_SERVER_ENCRYPT,
78*8658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_MAC,
79*8658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_MAC,
80*8658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_COMP,
81*8658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_COMP,
82*8658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_LANG,
83*8658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_LANG
84*8658SJan.Pechanec@Sun.COM };
85*8658SJan.Pechanec@Sun.COM 
86*8658SJan.Pechanec@Sun.COM static char *my_clnt_proposal[PROPOSAL_MAX] = {
87*8658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_KEX,
88*8658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_PK_ALG,
89*8658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_CLIENT_ENCRYPT,
90*8658SJan.Pechanec@Sun.COM 	KEX_DEFAULT_CLIENT_ENCRYPT,
910Sstevel@tonic-gate 	KEX_DEFAULT_MAC,
920Sstevel@tonic-gate 	KEX_DEFAULT_MAC,
930Sstevel@tonic-gate 	KEX_DEFAULT_COMP,
940Sstevel@tonic-gate 	KEX_DEFAULT_COMP,
950Sstevel@tonic-gate 	KEX_DEFAULT_LANG,
960Sstevel@tonic-gate 	KEX_DEFAULT_LANG
970Sstevel@tonic-gate };
980Sstevel@tonic-gate 
990Sstevel@tonic-gate #ifdef __cplusplus
1000Sstevel@tonic-gate }
1010Sstevel@tonic-gate #endif
1020Sstevel@tonic-gate 
1030Sstevel@tonic-gate #endif /* _MYPROPOSAL_H */
104