aboutsummaryrefslogtreecommitdiff
path: root/src/common
Commit message (Collapse)AuthorAge
* Check in a working cross-platform timegmNick Mathewson2003-11-10
| | | | svn:r779
* bugfix for win32 with lots of usersRoger Dingledine2003-10-27
| | | | | | | plus general cleanup on switch_id() svn:r684
* Use daemon(3) function where available.Nick Mathewson2003-10-23
| | | | svn:r665
* resolve warningNick Mathewson2003-10-23
| | | | svn:r664
* Two-pronged attack at my overzealous skew fixes.Nick Mathewson2003-10-23
| | | | | | | | | | | | | | | 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
* switch_id() no longer tries to log the user name when it's calld onSteven Hazel2003-10-22
| | | | | | | | Windows, since we don't know whether it's the user or the group that was set. svn:r659
* Clock skew fixes.Nick Mathewson2003-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* - fixed a bug in the id switching code -- setgid has to happen beforeSteven Hazel2003-10-22
| | | | | | | | | | | | | | | 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
* introduce new tor_free() macroRoger Dingledine2003-10-21
| | | | svn:r643
* include our own timegm() impl, since it's not portableRoger Dingledine2003-10-20
| | | | svn:r635
* warn, not errRoger Dingledine2003-10-19
| | | | svn:r630
* Code to get nicknames from peer certsNick Mathewson2003-10-19
| | | | svn:r627
* let tls tolerate reallocing the bufRoger Dingledine2003-10-19
| | | | | | | and also remember the params for ssl_write if it returns wantread. svn:r626
* first steps toward a WANTWRITE SSL_write tls bug fixRoger Dingledine2003-10-18
| | | | | | | how exactly the same do the arguments need to be? :( svn:r625
* start to track down the 'peer has invalid cert' bugRoger Dingledine2003-10-18
| | | | svn:r623
* we've been stomping on memory while reading configRoger Dingledine2003-10-18
| | | | | | | doesn't seem to have bitten us yet, but let's fix that :) svn:r619
* rewrite close_logs so it could possibly workRoger Dingledine2003-10-18
| | | | | | | remove deadbeef memory-clobber testing (for now) svn:r616
* Log TLS errors even harderNick Mathewson2003-10-15
| | | | svn:r604
* Add more logging on some ssl errors.Nick Mathewson2003-10-15
| | | | svn:r603
* clean up logging, allow user to specify log filesRoger Dingledine2003-10-15
| | | | | | | | | | | | If DebugLogFile is specified, log to it at -l debug If LogFile is specified, log to it at the -l from the commandline (default info) If no LogFile *and* not a Daemon, then log to stdout. Make conn->s = -1 by default (this might break things) When kill -USR1, prefer to log at INFO, but make sure they always see it. svn:r596
* Build without warnings on OS X.Nick Mathewson2003-10-15
| | | | svn:r595
* Make add_file_log return 0 on success.Nick Mathewson2003-10-15
| | | | svn:r594
* Add tor_realloc to mirror tor_mallocNick Mathewson2003-10-14
| | | | svn:r582
* oops, bugfixRoger Dingledine2003-10-10
| | | | svn:r572
* change WARNING to WARNRoger Dingledine2003-10-10
| | | | svn:r570
* Update LICENSE and copyright dates.Nick Mathewson2003-10-08
| | | | svn:r560
* Clear revents even when no events are received. Also, since everyone gets ↵Nick Mathewson2003-10-07
| | | | | | in exceptions, everyone gets to increment maxfd. svn:r550
* Hoping to find an fd larger than ((unsigned)-1) is probably a lost cause.Nick Mathewson2003-10-07
| | | | svn:r549
* do not ask for whom there's an error, it polls for theeRoger Dingledine2003-10-07
| | | | svn:r548
* some early bugfixesRoger Dingledine2003-10-07
| | | | | | | | | | our log() conflicts with log(3) distribute only the correct files from doc/ and src/config/ sometimes laptops go back in time. i guess that's ok for now. and bump the version number because we're live. svn:r544
* wrap strdup; prefer time() to gettimeofday()Roger Dingledine2003-10-04
| | | | svn:r538
* clean some includesRoger Dingledine2003-10-04
| | | | svn:r535
* Make testcases run again; more sanity checking to descriptor generation.Nick Mathewson2003-10-01
| | | | svn:r532
* Flush after fputsNick Mathewson2003-10-01
| | | | svn:r526
* make log use a larger buffer, for easier debuggingRoger Dingledine2003-09-30
| | | | svn:r515
* bugfixes and features: closer to making dirserv workRoger Dingledine2003-09-29
| | | | | | | | | | | fix a variety of seg faults don't try to list OPs in running-routers write cached-directory to disk when rebuilding the dir on boot, dirservers load approved-routers file on boot, dirservers load cached directory file svn:r508
* more cleanup and rearrangingRoger Dingledine2003-09-29
| | | | | | | still not finished integrating new dirserv stuff svn:r507
* shift read_file_to_str() into util.cRoger Dingledine2003-09-28
| | | | svn:r504
* Add function to wrap SSL_pendingNick Mathewson2003-09-27
| | | | svn:r501
* finish enforcing the log conventionRoger Dingledine2003-09-26
| | | | svn:r494
* make writing descs workRoger Dingledine2003-09-26
| | | | svn:r492
* Add code to parse fingerprint files and compare routers against fingerprint ↵Nick Mathewson2003-09-26
| | | | | | files. svn:r490
* Bugfixes in crypto_pk_write_private_key_to_filenameNick Mathewson2003-09-26
| | | | svn:r489
* Refactor common file code into util.c; add published to descriptorsNick Mathewson2003-09-26
| | | | svn:r487
* various bugfixes and updatesRoger Dingledine2003-09-25
| | | | | | | | | | | | | | | | | | | | redo all the config files for the new format (we'll redo them again soon) fix (another! yuck) segfault in log_fn when input is too large tor_tls_context_new() returns -1 for error, not NULL fix segfault in check_conn_marked() on conn's that die during tls handshake make ORs also initialize conn from router when we're the receiving node make non-dirserver ORs upload descriptor to every dirserver on startup add our local address to the descriptor add Content-Length field to POST command revert the Content-Length search in fetch_from_buf_http() to previous code fix segfault in memmove in fetch_from_buf_http() raise maximum allowed headers/body size in directory.c svn:r484
* Refactor buffers; implement descriptors.Nick Mathewson2003-09-25
| | | | | | | | | | | | | | | | | 'buf_t' is now an opaque type defined in buffers.c . Router descriptors now include all keys; routers generate keys as needed on startup (in a newly defined "data directory"), and generate their own descriptors. Descriptors are now self-signed. Implementation is not complete: descriptors are never published; and upon receiving a descriptor, the directory doesn't do anything with it. At least "routers.or" and orkeygen are now obsolete, BTW. svn:r483
* fix a segfault on truncated log linesRoger Dingledine2003-09-19
| | | | svn:r473
* More fine-grained logging messages on ZeroReturn/Syscall error casesNick Mathewson2003-09-16
| | | | svn:r467
* Add backend support for multiple logfiles, including console logs.Nick Mathewson2003-09-16
| | | | | | | | | Also optimize logging by formatting messages in memory before sending them through stdio. (It turns out (according to gprof) that logging performance matters.) svn:r463
* Cipher lists need to be colon separated. Also make initialization more ↵Nick Mathewson2003-09-15
| | | | | | bulletproof svn:r459