Roger Dingledine
8cf45df230
and now the exciting part: there is now no such thing as doing
...
a client-only tls, that is, one with no certs.
svn:r6558
2006-06-07 06:21:11 +00:00
Roger Dingledine
0bfef523df
simplify the tortls api: we only support being a "server", that
...
is, even tor clients do the same sort of handshake.
this has been true for years, so it's best to get rid of the
stale code.
svn:r6557
2006-06-07 06:10:54 +00:00
Roger Dingledine
7512be0b65
looks like we missed a piece of the 0.1.1.9 paranoia code.
...
hopefully this change is a no-op.
svn:r6556
2006-06-07 02:57:23 +00:00
Roger Dingledine
45065f1466
simplify code now that libevent considers all sockets pollable.
...
what we really mean now is ">= 0", which is clearer to test for.
svn:r6543
2006-06-05 09:08:10 +00:00
Roger Dingledine
266afcd7d5
bandaid for bug 299. this is still a bug, since we don't
...
initialize for hardware acceleration in certain configurations;
but not critical until that is supported.
svn:r6536
2006-06-05 04:29:03 +00:00
Nick Mathewson
853e2d99b6
Add a new warning to our "warn a lot" list: unused parameters. This means we have to explicitly "use" unuseds, but it can catch bugs. (It caught two coding mistakes so far.)
...
svn:r6532
2006-06-04 22:42:13 +00:00
Nick Mathewson
c660a0f6a2
More DNS fixes. Send meaningful TTLs back to the client when
...
possible. Cache at the server side independently from the TTL, to
prevent attackers from probing the server to see who has been asking
for what hostnames. (Hi, Dan Kaminski!)
Also, clean some whitespace.
svn:r6526
2006-06-03 21:41:14 +00:00
Nick Mathewson
86da3e0a0a
Patch based on post by Mike C to or-dev; special-case based on use of MSVC, rather than on MS_WINDOWS, so that mingw builds.
...
svn:r6523
2006-06-03 18:52:31 +00:00
Nick Mathewson
64d487a2d6
Add a basic mmap function, with a "fake-it" wrapper to do read_file_from_str instead. Based on code from Michael Mohr.
...
svn:r6510
2006-05-28 16:54:39 +00:00
Roger Dingledine
7f611f4732
if we're a server and some peer has a broken tls certificate, don't
...
shout about it unless we want to hear about protocol violations.
svn:r6507
2006-05-26 16:32:16 +00:00
Roger Dingledine
731f4086c0
resolve an unused variable
...
svn:r6503
2006-05-26 13:51:45 +00:00
Roger Dingledine
a4cdb834b9
Stop being picky about what the arguments to mapaddress look like.
...
we were refusing names that had $ in them, which people who specify
$key.exit will be sad about. There are likely other examples.
If people can think of reasons why we should be picky, let me know.
svn:r6496
2006-05-25 20:06:09 +00:00
Roger Dingledine
36712a443b
Stop initializing the hardware accelerator engines simply because
...
we overloaded the meaning of the argument to crypto_global_init().
svn:r6490
2006-05-24 00:37:38 +00:00
Roger Dingledine
67a885ecac
Claim a commonname of Tor, rather than TOR, in tls handshakes.
...
Maybe this will help us win the war of names.
svn:r6489
2006-05-24 00:21:55 +00:00
Nick Mathewson
89a8411ace
Throw out this UNALIGNED_INT_ACCESS_OK nonsense. Even where it works, it is often way way slower than doing the right thing. Backport candidate.
...
svn:r6473
2006-05-23 08:23:03 +00:00
Peter Palfrader
f7ba9d77e4
All these headers we get via torint.h
...
svn:r6452
2006-05-10 10:24:17 +00:00
Nick Mathewson
8a13a7cfe8
mainline branch. Remove some more dead XXXs.
...
svn:r6401
2006-04-18 03:58:42 +00:00
Nick Mathewson
1fbc74661f
Remove DER64 functions in trunk: they will never be used again unless the directory authorities switch back to 0.0.9tooearly.
...
svn:r6376
2006-04-10 21:23:00 +00:00
Roger Dingledine
7e3a98b489
"" is not a plausible address for addressmaps.
...
svn:r6299
2006-04-03 00:26:51 +00:00
Peter Palfrader
1fa7b3cef7
Avoid warnings about machine/limits.h on Debian GNU/kFreeBSD
...
svn:r6271
2006-03-29 05:14:12 +00:00
Roger Dingledine
0543900fbf
clean up the traces from tracking the 0.1.1.9-alpha stack-smashing bug.
...
svn:r6240
2006-03-26 06:47:51 +00:00
Roger Dingledine
7871ad9116
failing in a support function is a warn, not an err.
...
svn:r6239
2006-03-26 06:47:08 +00:00
Nick Mathewson
6d9632ba23
Check return value from GetVersionEx (even though the MSDN example doesnt) and zero out the LPOSVERSIONINFOEX struct before getting the version. This may fix the "johnboy" [major=-858993460,minor=-858993460] problem.
...
svn:r6233
2006-03-24 05:26:33 +00:00
Nick Mathewson
15e5cf6088
Fix memory leak when uncompressing concatenated zlib streams. Unit tests and tor client work; looks ok.
...
svn:r6211
2006-03-21 20:31:27 +00:00
Roger Dingledine
6449e2f6d6
ok, commenting that out broke things real bad.
...
leave it, and accept the memory leak for now.
svn:r6201
2006-03-20 02:13:35 +00:00
Roger Dingledine
54ced294df
Resolve a memory leak on clients. This disables some
...
functionality that we might still want. Nick?
svn:r6200
2006-03-20 00:52:22 +00:00
Nick Mathewson
0f0e14c6e3
normalize whitespace.
...
svn:r6173
2006-03-17 04:43:37 +00:00
Roger Dingledine
0e62befab8
add tor_strisprint() back in, this time with comments.
...
svn:r6170
2006-03-15 23:35:55 +00:00
Roger Dingledine
4cd4353847
and remove now-extraneous function
...
svn:r6168
2006-03-15 19:17:46 +00:00
Nick Mathewson
0bc19dddf5
Use INLINE (which we define) instead of __inline (which is nonstandard) in ht.h. Resolves bug 270; maybe sun C will work now.
...
svn:r6153
2006-03-13 15:09:49 +00:00
Nick Mathewson
daea6b21a5
Fix bug in close_logs(): when we close and delete logs, remove them all from the global "logfiles" list. This should fix bug 222.
...
svn:r6145
2006-03-13 00:54:21 +00:00
Nick Mathewson
0c132ee2a1
Instead of listing a set of compilers that prefers __func__ to __FUNCTION__, use autoconf. Also, prefer __func__ in our own code: __func__ is a C99 standard, whereas __FUNCTION__ is not. [Fixes bug 254.]
...
svn:r6144
2006-03-13 00:25:36 +00:00
Nick Mathewson
bd8ffccae7
More cleanups noticed by weasel; also, remove macros that nobody uses.
...
svn:r6143
2006-03-12 23:31:16 +00:00
Nick Mathewson
4d3e709c4b
Use escaped() for remaining cases.
...
svn:r6117
2006-03-11 02:21:30 +00:00
Roger Dingledine
a385b0087f
fix infinite loop
...
svn:r6090
2006-03-06 20:01:46 +00:00
Nick Mathewson
5777ee0e1a
Add some functions to escape values from the network before sending them to the log. Use them everywhere except for routerinfo->plaftorm, routerinfo->contact_info, and rend*.c. (need sleep now)
...
svn:r6087
2006-03-05 09:50:26 +00:00
Nick Mathewson
6a4e304d9e
Allow private:* in routerdescs; not generated yet (because older Tors do not understand it); needs testing.
...
svn:r6086
2006-03-05 05:27:59 +00:00
Peter Palfrader
42f14e8e10
Add function names to log_* on non-gcc
...
svn:r6039
2006-02-18 07:18:14 +00:00
Peter Palfrader
4f5e607389
Finish log function renaming for non-GNUC systems
...
svn:r6034
2006-02-18 02:11:48 +00:00
Roger Dingledine
6ce36ead42
Start the process of converting warn to log_warn and so on.
...
This is needed because Windows already has an err() that we
can't clobber. And we need to be able to make the log functions
a macro so we can print the function's name in the log entry.
svn:r6000
2006-02-13 08:01:59 +00:00
Nick Mathewson
2cc66125b8
try to fix bug with spurious "everything is broken" warning
...
svn:r5994
2006-02-13 00:26:43 +00:00
Nick Mathewson
dba155ecff
Generate 18.0.0.0/8 address policy format in descs when we can; warn when the mask is not reducible to a bit-prefix.
...
svn:r5991
2006-02-12 23:58:22 +00:00
Roger Dingledine
b99f903e34
and don't warn when it happens here either, unless the user
...
wants to hear it.
svn:r5990
2006-02-12 23:44:02 +00:00
Roger Dingledine
53c54b75c9
Correct a function comment. Nick: is this right?
...
svn:r5989
2006-02-12 23:34:03 +00:00
Roger Dingledine
5f051574d5
Happy new year!
...
svn:r5949
2006-02-09 05:46:49 +00:00
Roger Dingledine
28f3765b5a
and maybe some function documentation will help too
...
svn:r5935
2006-02-09 02:59:37 +00:00
Roger Dingledine
6f579deff4
check for EADDRINUSE in a cross-platform way (unless i'm wrong)
...
svn:r5899
2006-02-03 12:25:46 +00:00
Roger Dingledine
418dc7b16e
I believe this resolves bug 234, the mysterious crash on 0.1.1.9
...
and later servers. I'm not sure yet, but better to have it in CVS
while we speculate that it's the fix.
svn:r5895
2006-02-02 10:10:07 +00:00
Peter Palfrader
dbf2e10460
Apply Matt Ghali's --with-syslog-facility patch
...
svn:r5883
2006-02-01 02:15:44 +00:00
Roger Dingledine
f1864dfff3
On systems that don't have getrlimit (like windows), we were artificially
...
constraining ourselves to a max of 1024 connections. Now if there is no
getrlimit, just assume that we can handle the whole 15000 connections.
The better answer is to find a getrlimit equivalent on Windows, but hey,
one step at a time.
svn:r5854
2006-01-23 23:39:13 +00:00
Nick Mathewson
45757dafb7
Split PARANOIA_B into B1 and B2.
...
svn:r5849
2006-01-22 18:22:04 +00:00
Nick Mathewson
241310bbac
Split 0119_PARANOIA into 0119_PARANOIA_[ABC]. A is "this is suspicious, and we have not tried running without this yet". B is "this is suspicious, but the last time we tested, it was okay." C is "How could this possibly be the cause?"
...
svn:r5840
2006-01-17 23:08:38 +00:00
Nick Mathewson
099b9ce2f9
Fix bug 230: add a rollback function to reverse all changes since the last mark_logs_temp(), and move log initialization into the two-phase part of option setting.
...
svn:r5803
2006-01-11 19:40:14 +00:00
Nick Mathewson
55ac4f032c
Add a (diabled by default) option in crypto.h to disable most of the interesting crypto-related changes made on 0.1.1.9. This will help hunt bug 234.
...
svn:r5777
2006-01-10 21:12:06 +00:00
Nick Mathewson
7fc62029d4
Refuse to use RunAsDaemon when torrc is a relative path. Fixes bug 229.
...
svn:r5767
2006-01-10 20:00:20 +00:00
Roger Dingledine
a45b131590
check for integer overflows in more places, when adding elements to
...
smartlists. this could possibly prevent a buffer overflow on malicious
huge inputs. i don't see any, but i haven't looked carefully.
svn:r5695
2006-01-02 04:40:18 +00:00
Nick Mathewson
0da2069643
Clearner fix for timegm assert problem.
...
svn:r5690
2006-01-01 23:13:19 +00:00
Nick Mathewson
04db9de847
Fix assertion-trigger bug found by sjmurdoch
...
svn:r5689
2006-01-01 23:09:19 +00:00
Roger Dingledine
6005e110b9
whitespace fixes
...
svn:r5682
2005-12-31 06:26:10 +00:00
Nick Mathewson
9482b1b9d5
Choose directory servers from routerstatus list, not from routerinfo list. This way, as soon was we have a networkstatus, we can ask a cache to give us routers, rather than needing to ask the directories.
...
svn:r5586
2005-12-14 22:00:58 +00:00
Nick Mathewson
7e6a41af93
Make hashtables use a little less space on 64-bit architectures.
...
svn:r5585
2005-12-14 21:10:06 +00:00
Nick Mathewson
1af630d32c
Bite the bullet and limit all our source lines to 80 characters, the way IBM intended.
...
svn:r5582
2005-12-14 20:40:40 +00:00
Roger Dingledine
9b0a40ec78
crank the max line limit down to 150 chars.
...
svn:r5550
2005-12-10 08:27:01 +00:00
Nick Mathewson
a1bcdb2f76
util.c:1308: error: conflicting types for "is_internal_IP"
...
svn:r5545
2005-12-09 05:15:36 +00:00
Roger Dingledine
c0a6e2232c
let is_internal_IP() know whether you're asking about an IP
...
address for connecting or an IP address for binding, because
in the latter, 0.0.0.0 is a special case.
svn:r5543
2005-12-09 02:45:33 +00:00
Nick Mathewson
e9b66ec906
Document CREATE_FAST better in the code. Move our key expansion algorithm into a separate function in crypto.c
...
svn:r5530
2005-12-08 17:38:32 +00:00
Nick Mathewson
cf5facf3e1
Do not free a constant string.
...
svn:r5527
2005-12-08 04:01:37 +00:00
Roger Dingledine
130d0e4d1d
fix typo noticed by scrimbly
...
svn:r5522
2005-12-07 19:49:18 +00:00
Roger Dingledine
485b2cb4dc
get rid of nick's crazy voodoo dh checking.
...
svn:r5518
2005-12-06 23:09:44 +00:00
Peter Palfrader
1bf56b452e
Remove superfluous strdup
...
svn:r5503
2005-12-05 01:30:11 +00:00
Peter Palfrader
7a70a142f4
Also print usernames, not just numeric UIDs when we tell the user that his data directory has the wrong owner
...
svn:r5502
2005-12-05 01:28:10 +00:00
Roger Dingledine
8b0f1f029c
give a hint when people are running tor as the wrong user, rather than
...
telling them to start chowning random directories.
svn:r5500
2005-12-05 01:07:58 +00:00
Nick Mathewson
ce3cdecb9d
Make more arguments const; do not call hash tables trees.
...
svn:r5487
2005-12-03 02:00:51 +00:00
Nick Mathewson
4a0b6af935
Ive spent about 10 hours benchmarking permutations on our counter-mode implementation. This is the one that flies. (Avoid OpenSSL; optimizze rijndael calling convention to avoid needing to marshall and unmarshall counter.) This should speed up cell encryption by about 27%.
...
svn:r5486
2005-12-01 18:30:39 +00:00
Roger Dingledine
a6da372000
and its header
...
svn:r5478
2005-11-30 22:23:27 +00:00
Roger Dingledine
923ad87470
remove another unused function
...
svn:r5477
2005-11-30 22:19:02 +00:00
Roger Dingledine
77a425d8b2
Remove some functions that were around for hupping log files. We handle
...
them already in do_hup() by marking our log files as temporary and then
rotating them in options_init_from_torrc().
svn:r5473
2005-11-30 06:45:30 +00:00
Nick Mathewson
d56a65c497
Fix some verbose warnings and remove an unneeded include.
...
svn:r5472
2005-11-30 06:38:41 +00:00
Nick Mathewson
9cec3a13f5
remove some functions that are not used; #if0 out some files that are not likely to be used.
...
svn:r5471
2005-11-30 06:27:59 +00:00
Nick Mathewson
6b49a93bd5
Move code to check for zero digests into util.c
...
svn:r5468
2005-11-30 02:47:59 +00:00
Nick Mathewson
72cb64406a
HT_NEXT invalidates the last iterator; fix rmv-related segfault.
...
svn:r5458
2005-11-26 00:42:25 +00:00
Roger Dingledine
b6b1b4f283
Bandaid workaround to make cvs not crash tor clients.
...
This is not a real fix. I didn't look at the rest of the code.
Nick?
svn:r5455
2005-11-25 02:16:10 +00:00
Nick Mathewson
05482a0899
Add functions to return number of elts in associative containers
...
svn:r5448
2005-11-23 07:48:13 +00:00
Nick Mathewson
a39269572f
Replace balanced trees with hash tables: this should make stuff significantly faster.
...
svn:r5441
2005-11-23 04:18:45 +00:00
Roger Dingledine
8182eb69cd
a smidgen more hint when we fail to seed the rng
...
svn:r5438
2005-11-21 01:12:01 +00:00
Nick Mathewson
83d6b0387b
Try to build with OpenSSL 0.9.6. Lets pay attention to see if anybody complains.
...
svn:r5398
2005-11-16 05:22:44 +00:00
Nick Mathewson
6c361468c1
Loops without an increment step can suck, even on windows.
...
svn:r5376
2005-11-15 03:16:32 +00:00
Nick Mathewson
9b432311c4
Make new logging stuff work on windows; fix a couple of windows typos.
...
svn:r5375
2005-11-15 03:05:23 +00:00
Nick Mathewson
e022aa73e6
Hm; looks like the callback business was unnecessary, since DHparams_dup() copies dh->length.
...
svn:r5372
2005-11-14 21:17:38 +00:00
Nick Mathewson
027d0ef18c
Use a callback to set our DH parameters; set SSL_OP_SINGLE_DH_USE.
...
svn:r5371
2005-11-14 19:20:47 +00:00
Nick Mathewson
887178e710
Oops. It looks like there *was* an easy way to make openssl do what we wanted.
...
svn:r5370
2005-11-14 19:18:31 +00:00
Roger Dingledine
ed4f15b2a7
When logging via syslog, include the pid whenever we provide
...
a log entry. Suggested by Todd Fries.
svn:r5366
2005-11-13 22:28:07 +00:00
Roger Dingledine
5ef2927870
correct nick's comment
...
svn:r5360
2005-11-11 21:44:38 +00:00
Nick Mathewson
f14743a975
Note that much of check_dh_key is voodoo; make x in DH be only 320 bits for DH speed improvement: this wants auditing. [We have blessing from Ian on this.] (Note that DH in SSL is not yet affected.)
...
svn:r5359
2005-11-11 20:18:00 +00:00
Roger Dingledine
87e8e7b4fa
using an unsigned int for something that requires at least 3 bytes
...
makes me uncomfortable.
svn:r5340
2005-11-01 06:15:48 +00:00
Roger Dingledine
c68cadc0c8
tor_assert had a misleading comment
...
svn:r5338
2005-11-01 06:12:51 +00:00
Roger Dingledine
a2a4f4ae61
cleanups and a smidgen more docs
...
svn:r5335
2005-11-01 03:47:55 +00:00
Nick Mathewson
3c36a14ba6
Call ERR_remove_state() on the main thread on shutdown,too
...
svn:r5322
2005-10-26 02:20:48 +00:00
Nick Mathewson
9492424d3f
Per comments at the bottom of openssl/FAQ, call even more functions to
...
clean up OpenSSL's toys when it's done playing. (Why isn't there an
OpenSSL_free_everything() function?)
svn:r5321
2005-10-25 19:01:48 +00:00
Nick Mathewson
5d85560d9e
Remove last vestiges of old logging interface.
...
svn:r5317
2005-10-25 18:01:01 +00:00