Nick Mathewson
9b4203266e
Make OP work on windows! (Also misc logging tweaks)
...
svn:r1258
2004-03-11 06:19:08 +00:00
Nick Mathewson
59e2c77824
Get entropy in windows.
...
svn:r1257
2004-03-11 05:14:06 +00:00
Nick Mathewson
2f103ccf6f
Some stuff *should* be signed
...
svn:r1251
2004-03-10 06:57:57 +00:00
Nick Mathewson
0e5a134709
Fix DOS line endings; autoconfize checks for strptime and inet_aton
...
svn:r1248
2004-03-09 22:09:13 +00:00
Nick Mathewson
2da54de968
Make tor build on windows again. More work still needed
...
svn:r1247
2004-03-09 22:01:17 +00:00
Roger Dingledine
20f11f1800
clarifying comment for crypto_pk_get_fingerprint
...
svn:r1243
2004-03-08 00:11:37 +00:00
Roger Dingledine
08346f13f0
make parse_line_from_file fail rather than warn for malformed lines
...
svn:r1193
2004-03-02 04:59:52 +00:00
Nick Mathewson
5072488a95
make 'make test' exit(1) if a test fails.
...
svn:r1190
2004-03-01 06:45:32 +00:00
Roger Dingledine
5cf0b6224b
bugfix: stop trying to write to a stderr that may not be there
...
also, tell start_daemon our desired cwd
svn:r1170
2004-02-28 23:21:29 +00:00
Nick Mathewson
67a273962a
On OSX, decline to use the built-in select-baed poll wrapper, since it seems to sometimes not work.
...
svn:r1114
2004-02-20 23:41:45 +00:00
Roger Dingledine
f202d38191
patch from vicman to publish less platform information
...
svn:r1111
2004-02-18 21:23:50 +00:00
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