/[pkg-mixmaster]/trunk/Mix/Src/config.h
ViewVC logotype

Contents of /trunk/Mix/Src/config.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 91 - (hide annotations) (download)
Wed Jul 10 01:58:49 2002 UTC (10 years, 10 months ago) by rabbi
File MIME type: text/plain
File size: 7013 byte(s)
Added the ability to store the key passphrase in the mix.cfg file instead of
having it compiled into the binary. This offers a number of advantages over the
compiled-in method and still allows for encrypted remote storage of keys.

In order to take advantage of the new changes, the Install script will need to
be modified. As this is being replaced with a proper autoconf system, we're
defering that until later.

The changes we're committing replace PASSPHRASE with PASS_PHRASE, which is read
from the config. If the compiled-in passphrase, PASSPHRASE, is set, that is
used instead. (This is how Mixmaster will function if you use the Install
script.)
1 rabbi 1 /* Mixmaster version 3 -- (C) 1999 Anonymizer Inc.
2    
3     Mixmaster may be redistributed and modified under certain conditions.
4     This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
5     ANY KIND, either express or implied. See the file COPYRIGHT for
6     details.
7    
8     Configuration
9 rabbi 91 $Id: config.h,v 1.5 2002/07/10 01:58:49 rabbi Exp $ */
10 rabbi 1
11    
12     #ifndef _CONFIG_H
13     #define _CONFIG_H
14     #include "version.h"
15    
16     /* Disclaimer to be inserted in all anonymous messages: */
17     #define DISCLAIMER \
18     "Comments: This message did not originate from the Sender address above.\n" \
19     "\tIt was remailed automatically by anonymizing remailer software.\n" \
20     "\tPlease report problems or inappropriate use to the\n" \
21     "\tremailer administrator at <%s>.\n" /* (%s is the complaints address) */
22    
23     /* Additional disclaimer to be inserted in the body of messages with
24     * user-supplied From lines, e.g.
25     * "NOTE: The above From: line has not been authenticated!\n\n" */
26     #define FROMDISCLAIMER ""
27    
28     /* Comment to be inserted when a binary attachment is filtered out: */
29     #define BINDISCLAIMER \
30     "[...]"
31    
32     /* Character set for MIME-encoded mail header lines */
33     #define MIMECHARSET "iso-8859-1"
34     #if 1
35     #define DEFLTENTITY ""
36     #else
37     #define DEFLTENTITY "text/plain; charset=" MIMECHARSET
38     #endif
39    
40     /** Libraries and library functions **********************************/
41    
42     /* Use the OpenSSL crypto library (required) */
43     #define USE_OPENSSL
44     /* Use the RSA cryptosystem? */
45     #define USE_RSA
46     /* Use IDEA algorithm? (See file idea.txt) */
47     #define USE_IDEA
48     /* Support the OpenPGP message format? */
49     #define USE_PGP
50    
51     /* the following are defined in the Makefile */
52     #if 0
53     /* Use the PCRE regular expression library for destination blocking? */
54     #define USE_PCRE
55     /* Use zlib for compression? */
56     #define USE_ZLIB
57     /* Use ncurses? */
58     #define USE_NCURSES
59     /* Use the WIN GUI? */
60     #define USE_WINGUI
61     /* Use sockets to deliver mail */
62     #define USE_SOCK
63     #endif
64    
65     /** System dependencies **********************************************/
66     /* Macros: UNIX for Unix-style systems
67     POSIX for systems with POSIX header files (including DJGPP)
68     MSDOS for 32 bit DOS
69     WIN32 for Windows 95/NT */
70    
71     #if defined(_WIN32) && !defined(WIN32)
72     #define WIN32
73     #endif
74    
75     #if defined(__RSXNT__) && !defined(WIN32)
76     #define WIN32
77     #endif
78    
79     #if !defined(UNIX) && !defined(WIN32) && !defined(MSDOS)
80     #define UNIX
81     #endif
82    
83     #if defined(UNIX) && !defined(POSIX)
84     #define POSIX
85     #endif
86    
87     #ifdef UNIX
88     #define HAVE_UNAME
89     #define HAVE_GECOS
90     #define DEV_URANDOM "/dev/urandom"
91     #ifdef __OpenBSD__
92     #define DEV_RANDOM "/dev/srandom"
93     #else
94     #define DEV_RANDOM "/dev/random"
95     #endif
96     #endif
97    
98     #if defined(POSIX) || defined(USE_SOCK)
99     #define HAVE_GETHOSTNAME
100     #endif
101    
102     #ifdef POSIX
103     #define HAVE_TERMIOS
104     /* not a POSIX function, but avaiable on virtually all Unix systems */
105     #define HAVE_GETTIMEOFDAY
106     #endif
107    
108     #ifdef linux
109     #define HAVE_GETDOMAINNAME
110     #endif
111    
112     #ifdef MSDOS
113     #define SHORTNAMES
114     #ifndef WIN32
115     #define HAVE_GETKEY
116     #undef USE_SOCK
117     #endif
118     #endif
119    
120     #if defined(USE_WINGUI) && !defined(WIN32)
121     #error "The GUI requires Win32!"
122     #endif
123    
124     /** Constants *********************************************************/
125    
126     /* Give up if a file is larger than BUFFER_MAX bytes: */
127     /* #define BUFFER_MAX 64*1024*1024 */
128    
129     #define PATHMAX 512
130     #define LINELEN 128
131     #define BUFSIZE 4096
132    
133     /** file names ********************************************************/
134    
135     #define MIXCONF "mix.cfg" /* mixmaster configuration file */
136     #define DISCLAIMFILE "disclaim.txt"
137     #define FROMDSCLFILE "fromdscl.txt"
138     #define POP3CONF "pop3.cfg"
139     #define HELPFILE "help.txt"
140     #define ABUSEFILE "abuse.txt"
141     #define REPLYFILE "reply.txt"
142     #define USAGEFILE "usage.txt"
143     #define USAGELOG "usage.log"
144     #define BLOCKFILE "blocked.txt"
145     #define ADMKEYFILE "adminkey.txt"
146     #define KEYFILE "key.txt"
147     #define PGPKEY "pgpkey.txt"
148     #define DSAPARAMS "dsaparam.mix"
149     #define DHPARAMS "dhparam.mix"
150     #define MIXRAND "mixrand.bin"
151     #define SECRING "secring.mix"
152     #define PUBRING "pubring.mix"
153     #define IDLOG "id.log"
154     #define STATS "stats.log"
155     /* To enable multiple dest.blk files, edit the following line. */
156     /* Filenames must be seperated by one space. */
157     #define DESTBLOCK "dest.blk rab.blk"
158     #define DESTALLOW "dest.alw"
159     #define SOURCEBLOCK "source.blk"
160     #define HDRFILTER "header.blk"
161     #define REGULAR "time.log"
162     #define POOL "pool" /* remailer pool subdirectory */
163     #define TYPE1LIST "rlist.txt"
164     #define TYPE2REL "mlist.txt"
165     #ifdef SHORTNAMES
166     #define TYPE2LIST "type2.lis"
167     #else
168     #define TYPE2LIST "type2.list"
169     #endif
170    
171     #define PGPREMPUBRING "pubring.pgp"
172     #define PGPREMPUBASC "pubring.asc"
173     #define PGPREMSECRING "secring.pgp"
174     #define NYMSECRING "nymsec.pgp"
175     #define NYMDB "secrets.mix"
176    
177     /* string constants */
178     #define remailer_type "Remailer-Type: Mixmaster "
179     #define begin_remailer "-----BEGIN REMAILER MESSAGE-----"
180     #define end_remailer "-----END REMAILER MESSAGE-----"
181     #define begin_key "-----Begin Mix Key-----"
182     #define end_key "-----End Mix Key-----"
183     #define begin_pgp "-----BEGIN PGP "
184     #define end_pgp "-----END PGP "
185     #define begin_pgpmsg "-----BEGIN PGP MESSAGE-----"
186     #define end_pgpmsg "-----END PGP MESSAGE-----"
187     #define begin_pgpkey "-----BEGIN PGP PUBLIC KEY BLOCK-----"
188     #define end_pgpkey "-----END PGP PUBLIC KEY BLOCK-----"
189     #define begin_pgpsigned "-----BEGIN PGP SIGNED MESSAGE-----"
190     #define begin_pgpsig "-----BEGIN PGP SIGNATURE-----"
191     #define end_pgpsig "-----END PGP SIGNATURE-----"
192     #define info_beginpgp "=====BEGIN PGP MESSAGE====="
193     #define info_endpgp "=====END PGP MESSAGE====="
194     #define info_pgpsig "=====Sig: "
195    
196    
197     /***********************************************************************
198     * The following variables are read from mix.cfg, with default values
199     * defined in mix.c */
200    
201     int REMAIL;
202     int MIX;
203     int PGP;
204     int UNENCRYPTED;
205     int REMIX;
206 rabbi 62 int REPGP;
207 rabbi 1 extern char MIXDIR[];
208     extern char POOLDIR[];
209     extern char SENDMAIL[];
210     extern char SENDANONMAIL[];
211     extern char SMTPRELAY[];
212     extern char NEWS[];
213     extern char MAILtoNEWS[];
214     extern char ORGANIZATION[];
215     extern char MID[];
216     extern char TYPE1[];
217     extern char ERRLOG[];
218     extern char NAME[];
219     extern char ADDRESS[];
220     extern char REMAILERADDR[];
221     extern char ANONADDR[];
222     extern char REMAILERNAME[];
223     extern char ANONNAME[];
224     extern char COMPLAINTS[];
225     extern int AUTOREPLY;
226     extern char HELONAME[];
227     extern char ENVFROM[];
228     extern char SHORTNAME[];
229     extern int POOLSIZE;
230     extern int RATE;
231     extern int MIDDLEMAN;
232     extern int AUTOBLOCK;
233     extern char FORWARDTO[];
234     extern int SIZELIMIT;
235     extern int INFLATEMAX;
236     extern int MAXRANDHOPS;
237     extern int BINFILTER;
238     extern long PACKETEXP;
239     extern long IDEXP;
240     extern int VERBOSE;
241     extern long SENDPOOLTIME;
242     extern int NUMCOPIES;
243     extern char CHAIN[];
244     extern int DISTANCE;
245     extern int MINREL;
246     extern int RELFINAL;
247     extern long MAXLAT;
248     extern char PGPPUBRING[];
249     extern char PGPSECRING[];
250 rabbi 91 extern char PASS_PHRASE[];
251 rabbi 1 extern long POP3TIME;
252     extern int POP3DEL;
253     extern int POP3SIZELIMIT;
254     extern char MAILBOX[];
255     extern char MAILABUSE[];
256     extern char MAILBLOCK[];
257     extern char MAILUSAGE[];
258     extern char MAILANON[];
259     extern char MAILERROR[];
260     extern char MAILBOUNCE[];
261    
262     #endif

  ViewVC Help
Powered by ViewVC 1.1.5