Mercurial > dropbear
annotate default_options.h.in @ 1494:da095983a60b
Move DEBUG_TRACE to default_options
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 14 Feb 2018 00:24:44 +0800 |
parents | abbdeca6f1bd |
children | 2d450c1056e3 |
rev | line source |
---|---|
1295
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
1 #ifndef DROPBEAR_DEFAULT_OPTIONS_H_ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
2 #define DROPBEAR_DEFAULT_OPTIONS_H_ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
3 /* |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
4 > > > Read This < < < |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
5 |
1488
abbdeca6f1bd
Fix building default_options.h
Matt Johnston <matt@ucc.asn.au>
parents:
1445
diff
changeset
|
6 default_options.h.in documents compile-time options, and provides default values. |
1295
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
7 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
8 Local customisation should be added to localoptions.h which is |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
9 used if it exists. Options defined there will override any options in this |
1488
abbdeca6f1bd
Fix building default_options.h
Matt Johnston <matt@ucc.asn.au>
parents:
1445
diff
changeset
|
10 file. |
1295
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
11 |
1438
4f8eb331174f
add configuration option for default RSA size.
Matt Johnston <matt@ucc.asn.au>
parents:
1295
diff
changeset
|
12 Options can also be defined with -DDROPBEAR_XXX in Makefile CFLAGS |
1295
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
13 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
14 IMPORTANT: Many options will require "make clean" after changes */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
15 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
16 #define DROPBEAR_DEFPORT "22" |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
17 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
18 /* Listen on all interfaces */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
19 #define DROPBEAR_DEFADDRESS "" |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
20 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
21 /* Default hostkey paths - these can be specified on the command line */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
22 #define DSS_PRIV_FILENAME "/etc/dropbear/dropbear_dss_host_key" |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
23 #define RSA_PRIV_FILENAME "/etc/dropbear/dropbear_rsa_host_key" |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
24 #define ECDSA_PRIV_FILENAME "/etc/dropbear/dropbear_ecdsa_host_key" |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
25 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
26 /* Set NON_INETD_MODE if you require daemon functionality (ie Dropbear listens |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
27 * on chosen ports and keeps accepting connections. This is the default. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
28 * |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
29 * Set INETD_MODE if you want to be able to run Dropbear with inetd (or |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
30 * similar), where it will use stdin/stdout for connections, and each process |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
31 * lasts for a single connection. Dropbear should be invoked with the -i flag |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
32 * for inetd, and can only accept IPv4 connections. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
33 * |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
34 * Both of these flags can be defined at once, don't compile without at least |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
35 * one of them. */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
36 #define NON_INETD_MODE 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
37 #define INETD_MODE 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
38 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
39 /* Setting this disables the fast exptmod bignum code. It saves ~5kB, but is |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
40 * perhaps 20% slower for pubkey operations (it is probably worth experimenting |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
41 * if you want to use this) */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
42 /*#define NO_FAST_EXPTMOD*/ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
43 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
44 /* Set this if you want to use the DROPBEAR_SMALL_CODE option. This can save |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
45 several kB in binary size however will make the symmetrical ciphers and hashes |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
46 slower, perhaps by 50%. Recommended for small systems that aren't doing |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
47 much traffic. */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
48 #define DROPBEAR_SMALL_CODE 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
49 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
50 /* Enable X11 Forwarding - server only */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
51 #define DROPBEAR_X11FWD 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
52 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
53 /* Enable TCP Fowarding */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
54 /* 'Local' is "-L" style (client listening port forwarded via server) |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
55 * 'Remote' is "-R" style (server listening port forwarded via client) */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
56 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
57 #define DROPBEAR_CLI_LOCALTCPFWD 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
58 #define DROPBEAR_CLI_REMOTETCPFWD 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
59 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
60 #define DROPBEAR_SVR_LOCALTCPFWD 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
61 #define DROPBEAR_SVR_REMOTETCPFWD 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
62 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
63 /* Enable Authentication Agent Forwarding */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
64 #define DROPBEAR_SVR_AGENTFWD 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
65 #define DROPBEAR_CLI_AGENTFWD 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
66 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
67 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
68 /* Note: Both DROPBEAR_CLI_PROXYCMD and DROPBEAR_CLI_NETCAT must be set to |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
69 * allow multihop dbclient connections */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
70 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
71 /* Allow using -J <proxycommand> to run the connection through a |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
72 pipe to a program, rather the normal TCP connection */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
73 #define DROPBEAR_CLI_PROXYCMD 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
74 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
75 /* Enable "Netcat mode" option. This will forward standard input/output |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
76 * to a remote TCP-forwarded connection */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
77 #define DROPBEAR_CLI_NETCAT 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
78 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
79 /* Whether to support "-c" and "-m" flags to choose ciphers/MACs at runtime */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
80 #define ENABLE_USER_ALGO_LIST 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
81 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
82 /* Encryption - at least one required. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
83 * Protocol RFC requires 3DES and recommends AES128 for interoperability. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
84 * Including multiple keysize variants the same cipher |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
85 * (eg AES256 as well as AES128) will result in a minimal size increase.*/ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
86 #define DROPBEAR_AES128 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
87 #define DROPBEAR_3DES 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
88 #define DROPBEAR_AES256 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
89 /* Compiling in Blowfish will add ~6kB to runtime heap memory usage */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
90 /*#define DROPBEAR_BLOWFISH*/ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
91 #define DROPBEAR_TWOFISH256 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
92 #define DROPBEAR_TWOFISH128 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
93 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
94 /* Enable CBC mode for ciphers. This has security issues though |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
95 * is the most compatible with older SSH implementations */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
96 #define DROPBEAR_ENABLE_CBC_MODE 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
97 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
98 /* Enable "Counter Mode" for ciphers. This is more secure than normal |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
99 * CBC mode against certain attacks. It is recommended for security |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
100 * and forwards compatibility */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
101 #define DROPBEAR_ENABLE_CTR_MODE 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
102 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
103 /* Twofish counter mode is disabled by default because it |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
104 has not been tested for interoperability with other SSH implementations. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
105 If you test it please contact the Dropbear author */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
106 #define DROPBEAR_TWOFISH_CTR 0 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
107 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
108 /* Message integrity. sha2-256 is recommended as a default, |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
109 sha1 for compatibility */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
110 #define DROPBEAR_SHA1_HMAC 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
111 #define DROPBEAR_SHA1_96_HMAC 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
112 #define DROPBEAR_SHA2_256_HMAC 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
113 /* Default is to include it is sha512 is being compiled in for ECDSA */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
114 #define DROPBEAR_SHA2_512_HMAC (DROPBEAR_ECDSA) |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
115 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
116 /* XXX needed for fingerprints */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
117 #define DROPBEAR_MD5_HMAC 0 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
118 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
119 /* Hostkey/public key algorithms - at least one required, these are used |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
120 * for hostkey as well as for verifying signatures with pubkey auth. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
121 * Removing either of these won't save very much space. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
122 * RSA is recommended |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
123 * DSS may be necessary to connect to some systems though |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
124 is not recommended for new keys */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
125 #define DROPBEAR_RSA 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
126 #define DROPBEAR_DSS 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
127 /* ECDSA is significantly faster than RSA or DSS. Compiling in ECC |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
128 * code (either ECDSA or ECDH) increases binary size - around 30kB |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
129 * on x86-64 */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
130 #define DROPBEAR_ECDSA 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
131 |
1438
4f8eb331174f
add configuration option for default RSA size.
Matt Johnston <matt@ucc.asn.au>
parents:
1295
diff
changeset
|
132 /* RSA must be >=1024 */ |
4f8eb331174f
add configuration option for default RSA size.
Matt Johnston <matt@ucc.asn.au>
parents:
1295
diff
changeset
|
133 #define DROPBEAR_DEFAULT_RSA_SIZE 2048 |
4f8eb331174f
add configuration option for default RSA size.
Matt Johnston <matt@ucc.asn.au>
parents:
1295
diff
changeset
|
134 /* DSS is always 1024 */ |
4f8eb331174f
add configuration option for default RSA size.
Matt Johnston <matt@ucc.asn.au>
parents:
1295
diff
changeset
|
135 /* ECDSA defaults to largest size configured, usually 521 */ |
4f8eb331174f
add configuration option for default RSA size.
Matt Johnston <matt@ucc.asn.au>
parents:
1295
diff
changeset
|
136 |
1295
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
137 /* Add runtime flag "-R" to generate hostkeys as-needed when the first |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
138 connection using that key type occurs. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
139 This avoids the need to otherwise run "dropbearkey" and avoids some problems |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
140 with badly seeded /dev/urandom when systems first boot. */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
141 #define DROPBEAR_DELAY_HOSTKEY 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
142 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
143 /* Enable Curve25519 for key exchange. This is another elliptic |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
144 * curve method with good security properties. Increases binary size |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
145 * by ~8kB on x86-64 */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
146 #define DROPBEAR_CURVE25519 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
147 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
148 /* Enable elliptic curve Diffie Hellman key exchange, see note about |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
149 * ECDSA above */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
150 #define DROPBEAR_ECDH 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
151 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
152 /* Key exchange algorithm. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
153 * group14_sha1 - 2048 bit, sha1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
154 * group14_sha256 - 2048 bit, sha2-256 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
155 * group16 - 4096 bit, sha2-512 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
156 * group1 - 1024 bit, sha1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
157 * |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
158 * group14 is supported by most implementations. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
159 * group16 provides a greater strength level but is slower and increases binary size |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
160 * group1 is too small for security though is necessary if you need |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
161 compatibility with some implementations such as Dropbear versions < 0.53 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
162 */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
163 #define DROPBEAR_DH_GROUP1 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
164 #define DROPBEAR_DH_GROUP14_SHA1 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
165 #define DROPBEAR_DH_GROUP14_SHA256 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
166 #define DROPBEAR_DH_GROUP16 0 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
167 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
168 /* Control the memory/performance/compression tradeoff for zlib. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
169 * Set windowBits=8 for least memory usage, see your system's |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
170 * zlib.h for full details. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
171 * Default settings (windowBits=15) will use 256kB for compression |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
172 * windowBits=8 will use 129kB for compression. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
173 * Both modes will use ~35kB for decompression (using windowBits=15 for |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
174 * interoperability) */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
175 #define DROPBEAR_ZLIB_WINDOW_BITS 15 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
176 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
177 /* Whether to do reverse DNS lookups. */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
178 #define DO_HOST_LOOKUP 0 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
179 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
180 /* Whether to print the message of the day (MOTD). */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
181 #define DO_MOTD 0 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
182 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
183 /* The MOTD file path */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
184 #define MOTD_FILENAME "/etc/motd" |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
185 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
186 /* Authentication Types - at least one required. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
187 RFC Draft requires pubkey auth, and recommends password */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
188 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
189 /* Note: PAM auth is quite simple and only works for PAM modules which just do |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
190 * a simple "Login: " "Password: " (you can edit the strings in svr-authpam.c). |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
191 * It's useful for systems like OS X where standard password crypts don't work |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
192 * but there's an interface via a PAM module. It won't work for more complex |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
193 * PAM challenge/response. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
194 * You can't enable both PASSWORD and PAM. */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
195 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
196 /* This requires crypt() */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
197 #ifdef HAVE_CRYPT |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
198 #define DROPBEAR_SVR_PASSWORD_AUTH 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
199 #else |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
200 #define DROPBEAR_SVR_PASSWORD_AUTH 0 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
201 #endif |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
202 /* PAM requires ./configure --enable-pam */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
203 #define DROPBEAR_SVR_PAM_AUTH 0 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
204 #define DROPBEAR_SVR_PUBKEY_AUTH 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
205 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
206 /* Whether to take public key options in |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
207 * authorized_keys file into account */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
208 #define DROPBEAR_SVR_PUBKEY_OPTIONS 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
209 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
210 /* This requires getpass. */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
211 #ifdef HAVE_GETPASS |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
212 #define DROPBEAR_CLI_PASSWORD_AUTH 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
213 #define DROPBEAR_CLI_INTERACT_AUTH 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
214 #endif |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
215 #define DROPBEAR_CLI_PUBKEY_AUTH 1 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
216 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
217 /* A default argument for dbclient -i <privatekey>. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
218 Homedir is prepended unless path begins with / */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
219 #define DROPBEAR_DEFAULT_CLI_AUTHKEY ".ssh/id_dropbear" |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
220 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
221 /* This variable can be used to set a password for client |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
222 * authentication on the commandline. Beware of platforms |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
223 * that don't protect environment variables of processes etc. Also |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
224 * note that it will be provided for all "hidden" client-interactive |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
225 * style prompts - if you want something more sophisticated, use |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
226 * SSH_ASKPASS instead. Comment out this var to remove this functionality.*/ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
227 #define DROPBEAR_PASSWORD_ENV "DROPBEAR_PASSWORD" |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
228 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
229 /* Define this (as well as DROPBEAR_CLI_PASSWORD_AUTH) to allow the use of |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
230 * a helper program for the ssh client. The helper program should be |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
231 * specified in the SSH_ASKPASS environment variable, and dbclient |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
232 * should be run with DISPLAY set and no tty. The program should |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
233 * return the password on standard output */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
234 #define DROPBEAR_CLI_ASKPASS_HELPER 0 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
235 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
236 /* Save a network roundtrip by sendng a real auth request immediately after |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
237 * sending a query for the available methods. It is at the expense of < 100 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
238 * bytes of extra network traffic. This is not yet enabled by default since it |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
239 * could cause problems with non-compliant servers */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
240 #define DROPBEAR_CLI_IMMEDIATE_AUTH 0 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
241 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
242 /* Source for randomness. This must be able to provide hundreds of bytes per SSH |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
243 * connection without blocking. In addition /dev/random is used for seeding |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
244 * rsa/dss key generation */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
245 #define DROPBEAR_URANDOM_DEV "/dev/urandom" |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
246 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
247 /* Set this to use PRNGD or EGD instead of /dev/urandom or /dev/random */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
248 /*#define DROPBEAR_PRNGD_SOCKET "/var/run/dropbear-rng"*/ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
249 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
250 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
251 /* Specify the number of clients we will allow to be connected but |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
252 * not yet authenticated. After this limit, connections are rejected */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
253 /* The first setting is per-IP, to avoid denial of service */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
254 #define MAX_UNAUTH_PER_IP 5 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
255 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
256 /* And then a global limit to avoid chewing memory if connections |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
257 * come from many IPs */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
258 #define MAX_UNAUTH_CLIENTS 30 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
259 |
1445
a3a96dbf9a58
Use MAX_AUTH_TRIES rather than DEFAULT_AUTH_TRIES, don't limit argument range
Matt Johnston <matt@ucc.asn.au>
parents:
1442
diff
changeset
|
260 /* Default maximum number of failed authentication tries (server option) */ |
a3a96dbf9a58
Use MAX_AUTH_TRIES rather than DEFAULT_AUTH_TRIES, don't limit argument range
Matt Johnston <matt@ucc.asn.au>
parents:
1442
diff
changeset
|
261 /* -T server option overrides */ |
1295
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
262 #define MAX_AUTH_TRIES 10 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
263 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
264 /* The default file to store the daemon's process ID, for shutdown |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
265 scripts etc. This can be overridden with the -P flag */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
266 #define DROPBEAR_PIDFILE "/var/run/dropbear.pid" |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
267 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
268 /* The command to invoke for xauth when using X11 forwarding. |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
269 * "-q" for quiet */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
270 #define XAUTH_COMMAND "/usr/bin/xauth -q" |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
271 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
272 /* if you want to enable running an sftp server (such as the one included with |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
273 * OpenSSH), set the path below. If the path isn't defined, sftp will not |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
274 * be enabled */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
275 #define SFTPSERVER_PATH "/usr/libexec/sftp-server" |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
276 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
277 /* This is used by the scp binary when used as a client binary. If you're |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
278 * not using the Dropbear client, you'll need to change it */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
279 #define DROPBEAR_PATH_SSH_PROGRAM "/usr/bin/dbclient" |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
280 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
281 /* Whether to log commands executed by a client. This only logs the |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
282 * (single) command sent to the server, not what a user did in a |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
283 * shell/sftp session etc. */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
284 #define LOG_COMMANDS 0 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
285 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
286 /* Window size limits. These tend to be a trade-off between memory |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
287 usage and network performance: */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
288 /* Size of the network receive window. This amount of memory is allocated |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
289 as a per-channel receive buffer. Increasing this value can make a |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
290 significant difference to network performance. 24kB was empirically |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
291 chosen for a 100mbit ethernet network. The value can be altered at |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
292 runtime with the -W argument. */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
293 #define DEFAULT_RECV_WINDOW 24576 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
294 /* Maximum size of a received SSH data packet - this _MUST_ be >= 32768 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
295 in order to interoperate with other implementations */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
296 #define RECV_MAX_PAYLOAD_LEN 32768 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
297 /* Maximum size of a transmitted data packet - this can be any value, |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
298 though increasing it may not make a significant difference. */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
299 #define TRANS_MAX_PAYLOAD_LEN 16384 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
300 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
301 /* Ensure that data is transmitted every KEEPALIVE seconds. This can |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
302 be overridden at runtime with -K. 0 disables keepalives */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
303 #define DEFAULT_KEEPALIVE 0 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
304 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
305 /* If this many KEEPALIVES are sent with no packets received from the |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
306 other side, exit. Not run-time configurable - if you have a need |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
307 for runtime configuration please mail the Dropbear list */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
308 #define DEFAULT_KEEPALIVE_LIMIT 3 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
309 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
310 /* Ensure that data is received within IDLE_TIMEOUT seconds. This can |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
311 be overridden at runtime with -I. 0 disables idle timeouts */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
312 #define DEFAULT_IDLE_TIMEOUT 0 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
313 |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
314 /* The default path. This will often get replaced by the shell */ |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
315 #define DEFAULT_PATH "/usr/bin:/bin" |
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
316 |
1494
da095983a60b
Move DEBUG_TRACE to default_options
Matt Johnston <matt@ucc.asn.au>
parents:
1488
diff
changeset
|
317 /* Include verbose debug output, enabled with -v at runtime. |
da095983a60b
Move DEBUG_TRACE to default_options
Matt Johnston <matt@ucc.asn.au>
parents:
1488
diff
changeset
|
318 * This will add a reasonable amount to your executable size. */ |
da095983a60b
Move DEBUG_TRACE to default_options
Matt Johnston <matt@ucc.asn.au>
parents:
1488
diff
changeset
|
319 #define DEBUG_TRACE 0 |
da095983a60b
Move DEBUG_TRACE to default_options
Matt Johnston <matt@ucc.asn.au>
parents:
1488
diff
changeset
|
320 |
1295
750ec4ec4cbe
Convert #ifdef to #if, other build changes
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
321 #endif /* DROPBEAR_DEFAULT_OPTIONS_H_ */ |