Roger Dingledine
c9d9b9b2a7
we define some big constant arrays but don't use them
...
svn:r1102
2004-02-18 03:17:35 +00:00
Roger Dingledine
c12a6f58b5
fix typo
...
svn:r1007
2004-01-20 02:14:12 +00:00
Nick Mathewson
793c65e60f
Note discrepency between N bytes transmitted over TLS and actual bandwidth use; add 2 functions to help resolve.
...
svn:r986
2004-01-13 01:19:02 +00:00
Nick Mathewson
cacacfe2b1
Integrate new daemon code, adapted from submission by christian grothoff
...
svn:r969
2004-01-03 22:40:49 +00:00
Roger Dingledine
bc8c6732cb
add crypto_cipher_rewind to reverse crypto_cipher_advance
...
svn:r957
2003-12-23 07:43:05 +00:00
Roger Dingledine
eb730c41c8
clean tabs, trailing whitespace
...
svn:r952
2003-12-17 21:14:13 +00:00
Roger Dingledine
389eb48690
document an openssl gotcha
...
svn:r947
2003-12-17 05:31:52 +00:00
Roger Dingledine
f3b165fdc0
change crypto_digest_new_env to crypto_new_digest_env
...
(and same with _free_)
to match our conventions
i think our conventions may be getting too ad hoc
svn:r940
2003-12-16 08:13:26 +00:00
Roger Dingledine
e358a362ee
rename digest_copy to digest_dup, make it return, make gcc happier
...
svn:r939
2003-12-16 05:47:21 +00:00
Nick Mathewson
eeae6157ed
Add more fine-grained SHA1 functionality.
...
svn:r937
2003-12-16 05:29:04 +00:00
Nick Mathewson
4885e90490
Make compile warning-free on cygwin
...
svn:r936
2003-12-15 21:35:52 +00:00
Roger Dingledine
a5aa80cc41
make --debuglogfile (or any second log file) work
...
svn:r935
2003-12-14 09:58:43 +00:00
Roger Dingledine
3465c4dee4
make it compile
...
svn:r923
2003-12-14 05:00:09 +00:00
Roger Dingledine
f4cb5d8c93
extend smartlist with _remove() and _subtract()
...
svn:r922
2003-12-14 04:57:47 +00:00
Roger Dingledine
444798dfb9
remove obsolete code
...
svn:r914
2003-12-14 00:11:48 +00:00
Roger Dingledine
4d3d99fa0c
extend smartlist with a few smarter operations
...
svn:r910
2003-12-13 23:32:03 +00:00
Roger Dingledine
8222fe8e4f
clean up some copyrights
...
svn:r907
2003-12-13 22:53:17 +00:00
Roger Dingledine
5458ca39e8
minor tweaks to the smartlist operations
...
svn:r903
2003-12-13 06:56:21 +00:00
Roger Dingledine
1ae84fcbc1
add a 'smartlist' building block that picks random elements from a list
...
svn:r897
2003-12-13 01:42:44 +00:00
Roger Dingledine
d23c66b041
make the license explicit on fakepoll.[ch]
...
svn:r895
2003-12-09 21:37:26 +00:00
Nick Mathewson
ac552573dd
Make router/directory parsing nondestructive and more const-friendly
...
svn:r890
2003-12-08 23:45:37 +00:00
Roger Dingledine
05b9c35173
assert that nobody asks for a random number between 0 and -1
...
svn:r875
2003-12-03 08:08:07 +00:00
Nick Mathewson
5e9ba094bc
Fix incorrect error message
...
svn:r862
2003-11-21 05:55:03 +00:00
Peter Palfrader
9a676b04dd
Check that we can write to the logfile and log a warning to stderr if we can't
...
Move writing of pidfile after daemonizing, and also after setting the [ug]id:
This means that the tor user needs write priviliges to the pidfile location.
It needs it for unlinking the pidfile anyway.
svn:r846
2003-11-19 02:09:43 +00:00
Roger Dingledine
ec02f83f94
add a tor_malloc_zero wrapper: tor_malloc and memset 0
...
svn:r836
2003-11-18 08:20:09 +00:00
Nick Mathewson
dd16a9abcb
Stop leaking X509 certs; those things are _nasty_ on the carpet
...
svn:r833
2003-11-18 06:52:25 +00:00
Roger Dingledine
cc8ce64cb2
fix trivial typo
...
svn:r808
2003-11-13 06:45:59 +00:00
Roger Dingledine
9358381d83
break out the string manipulation routines
...
svn:r804
2003-11-12 19:34:19 +00:00
Nick Mathewson
5e4b9c6b61
Remove minor biasing problem from crypto_pseudo_rand_int
...
svn:r799
2003-11-12 04:28:30 +00:00
Nick Mathewson
785f5cdac8
Make crypto_pseudo_rand* never fail.
...
svn:r797
2003-11-12 04:12:35 +00:00
Roger Dingledine
3d19a9b514
fix a bug in handling clock skew
...
svn:r785
2003-11-11 04:08:30 +00:00
Nick Mathewson
3c4b4c8cac
Check in a working cross-platform timegm
...
svn:r779
2003-11-10 06:28:53 +00:00
Roger Dingledine
a27b570788
bugfix for win32 with lots of users
...
plus general cleanup on switch_id()
svn:r684
2003-10-27 10:26:44 +00:00
Nick Mathewson
faa0f7ffe7
Use daemon(3) function where available.
...
svn:r665
2003-10-23 14:28:44 +00:00
Nick Mathewson
71e5ad714b
resolve warning
...
svn:r664
2003-10-23 14:27:53 +00:00
Nick Mathewson
6b79d8a7e9
Two-pronged attack at my overzealous skew fixes.
...
The problem was that the fixes had us generating TLS certs with a
2-day lifetime on the assumption that we'd rotate fairly often. In
fact, we never rotate our TLS keys.
This patch fixes the situation in 2 ways:
1. It bumps the default lifetime back up to one year until we get
rotation in place.
2. It changes tor_tls_context_new() so that it doesn't leak memory
when you call it more than once.
svn:r663
2003-10-23 14:20:51 +00:00
Steven Hazel
4fef6f4566
switch_id() no longer tries to log the user name when it's calld on
...
Windows, since we don't know whether it's the user or the group that
was set.
svn:r659
2003-10-22 17:25:58 +00:00
Nick Mathewson
7604cfe61b
Clock skew fixes.
...
Allow some slop (currently 3 minutes) when checking certificate validity.
Change certificate lifetime from 1 year to 2 days. Since we
regenerate regularly (we regenerate regularly, right??), this
shouldn't be a problem.
Have directories reject descriptors published too far in the future
(currently 30 minutes). If dirservs don't do this:
0) Today is January 1, 2000.
1) A very skewed server publishes descriptor X with a declared
publication time of August 1, 2000.
2) The directory includes X.
3) Because of certificate lifetime issues, nobody can use the
skewed server.
4) The server fixes its skew, and goes to republish a new descriptor Y
with publication time of January 1, 2000.
5) But because the directory already has a "more recent" descriptor X,
it rejects descriptor "Y" as superseded!
This patch should make step 2 go away.
svn:r658
2003-10-22 16:41:35 +00:00
Steven Hazel
4139c1c86a
- fixed a bug in the id switching code -- setgid has to happen before
...
setuid, because after we setuid we don't have the priviledges we
need to setgid anymore, duh. merged switch_user() and
switch_group() into switch_id(), since that code has to be wound
together.
- return -1 from switch_id() if it's not defined to do anything else.
- moved daemoinize(), write_pidfile(), and switch_id() from main.c to
util.c
svn:r656
2003-10-22 11:21:29 +00:00
Roger Dingledine
069227db5b
introduce new tor_free() macro
...
svn:r643
2003-10-21 09:48:58 +00:00
Roger Dingledine
5f1750a288
include our own timegm() impl, since it's not portable
...
svn:r635
2003-10-20 20:19:59 +00:00
Roger Dingledine
dc85b7af3c
warn, not err
...
svn:r630
2003-10-19 01:15:36 +00:00
Nick Mathewson
0ec2a34a1d
Code to get nicknames from peer certs
...
svn:r627
2003-10-19 00:46:51 +00:00
Roger Dingledine
ec96419109
let tls tolerate reallocing the buf
...
and also remember the params for ssl_write if it returns wantread.
svn:r626
2003-10-19 00:39:48 +00:00
Roger Dingledine
c627ba2632
first steps toward a WANTWRITE SSL_write tls bug fix
...
how exactly the same do the arguments need to be? :(
svn:r625
2003-10-18 08:00:19 +00:00
Roger Dingledine
61e180ceb1
start to track down the 'peer has invalid cert' bug
...
svn:r623
2003-10-18 06:48:46 +00:00
Roger Dingledine
2093f60760
we've been stomping on memory while reading config
...
doesn't seem to have bitten us yet, but let's fix that :)
svn:r619
2003-10-18 01:28:39 +00:00
Roger Dingledine
82aa621b47
rewrite close_logs so it could possibly work
...
remove deadbeef memory-clobber testing (for now)
svn:r616
2003-10-18 00:07:58 +00:00
Nick Mathewson
f32c1c3127
Log TLS errors even harder
...
svn:r604
2003-10-15 23:50:25 +00:00
Nick Mathewson
f81178a312
Add more logging on some ssl errors.
...
svn:r603
2003-10-15 23:42:44 +00:00