Roger Dingledine
c1dc17e6e2
put in initial support for ".nickname.exit" addresses, to let alice
...
decide what exit node to use; based on a patch by geoff goodell.
needs more work: e.g. it goes bananas building new circuits when the
chosen exit node's exit policy rejects the connection.
svn:r3015
2004-11-29 08:34:54 +00:00
Nick Mathewson
f7c6ad065e
correct multiple internal spaces
...
svn:r3004
2004-11-28 09:14:07 +00:00
Nick Mathewson
6f5dbefa7e
Normalize space: add one between every control keyword and control clause.
...
svn:r3003
2004-11-28 09:05:49 +00:00
Roger Dingledine
7c9a707900
remove emacs droppings, since nick says he doesn't need them anymore
...
svn:r2989
2004-11-26 04:00:55 +00:00
Roger Dingledine
d7fb38cfe3
update unit tests to reflect changed interface
...
svn:r2952
2004-11-23 08:36:26 +00:00
Nick Mathewson
22dba27d8d
Normalize a few more kinds of whitespace. We now dislike:
...
- func (args)
- if (x){
This doesn't normalize if(x), for(x); while(x), and friends.
svn:r2943
2004-11-22 23:28:26 +00:00
Nick Mathewson
a8f9ba91db
Nobody was using the return values from smartlist_(set|del|del_keeporder), so remove them.
...
svn:r2823
2004-11-12 21:14:06 +00:00
Nick Mathewson
5109de5626
Rename exit_policy to addr_policy, since it gets used for SOCKS and directory connections too. Make all policies get validated in options_validate, and make SOCKS/directory policies get set in options_act.
...
svn:r2819
2004-11-12 19:39:13 +00:00
Nick Mathewson
5a5be93f80
Normalize whitespace; add a "tell me about all the unnormalized whitespace" target; fix a braino in dirserv.c
...
svn:r2758
2004-11-09 20:04:00 +00:00
Nick Mathewson
cd753df7bf
Resolve many XXXs and all DOCDOCs
...
svn:r2755
2004-11-09 18:22:17 +00:00
Nick Mathewson
0059ee5fea
More tests for split
...
svn:r2705
2004-11-07 22:58:16 +00:00
Roger Dingledine
394554cfbf
Clean up copyrights.
...
Break connection_consider_empty_buckets() out of
connection_read_bucket_decrement().
svn:r2698
2004-11-07 01:33:06 +00:00
Roger Dingledine
6c61ed4fb5
Make options no longer a global variable.
...
Now we can try setting an option but back out if it fails to parse, or
if it's disallowed (e.g. changing RunAsDaemon from 1 to 0).
Use parse_line_from_str rather than parse_line_from_file.
svn:r2692
2004-11-06 05:18:11 +00:00
Nick Mathewson
9d604ec615
Add code to read configuration lines from a string as well as a file
...
svn:r2676
2004-11-04 22:29:45 +00:00
Nick Mathewson
451f8b5045
- Implement all of control interface except authentication, setconfig,
...
and actually making the sockets.
- Make sure that identity-based nicknames start with $.
- Use new string_join interface.
svn:r2661
2004-11-03 18:33:07 +00:00
Nick Mathewson
ad4dc74482
Use a stricter set of warnings; make them all pass.
...
svn:r2645
2004-11-02 03:02:17 +00:00
Roger Dingledine
85c79ffbc7
canonicalize "src" and "dest" arg order in crypto.c (and others)
...
svn:r2644
2004-11-02 02:28:51 +00:00
Nick Mathewson
ce5709184b
Pass with -Wstrict-prototypes
...
svn:r2614
2004-10-27 18:16:37 +00:00
Nick Mathewson
44d4516155
Use tor_snprintf, not snprintf
...
svn:r2609
2004-10-27 06:37:34 +00:00
Nick Mathewson
bc62f8e983
Replace sprintf with snprintf
...
svn:r2602
2004-10-27 05:53:07 +00:00
Nick Mathewson
6899b8001a
Check for low _MSC_VER, not high. On windows, always use winsock.
...
svn:r2575
2004-10-20 23:30:38 +00:00
Nick Mathewson
e5049d5aa3
Remove routerinfo_t->is_trusted_dir, and all the twisted machinery used to
...
maintain it.
Have clients default to the nickname "client" in their certificates.
Give a less frightening warning on obsolete (pre-0.0.8) routerinfo_t's.
svn:r2568
2004-10-19 18:19:59 +00:00
Nick Mathewson
b130aa3c8f
Fix segfault in unit tests. (Main program is unaffected)
...
svn:r2559
2004-10-17 15:45:54 +00:00
Roger Dingledine
de65052312
don't assert multiple things in the same tor_assert()
...
svn:r2544
2004-10-16 22:14:52 +00:00
Nick Mathewson
25a046df74
Fix unit tests, make it compile
...
svn:r2543
2004-10-16 21:57:24 +00:00
Nick Mathewson
c5964d6738
Basic string-join functionality
...
svn:r2521
2004-10-14 19:51:47 +00:00
Roger Dingledine
3737566465
make it build on amd64
...
svn:r2486
2004-10-14 03:13:08 +00:00
Roger Dingledine
aebc3a03ba
more int to size_t conversions, fixing one or more amd64 bugs
...
plus a whitespace patch on config.c from vicman
svn:r2482
2004-10-14 02:47:09 +00:00
Nick Mathewson
f7404f6bb9
Use tor_parse_long in more places
...
svn:r2453
2004-10-12 19:33:03 +00:00
Nick Mathewson
79636823b8
Oops, missed one
...
svn:r2445
2004-10-12 16:04:25 +00:00
Nick Mathewson
a91fc48b39
Note byte-order on result for parse_addr_port()
...
svn:r2444
2004-10-12 16:02:15 +00:00
Nick Mathewson
8b037509f3
Add functions to parse addr[:port] consistently
...
svn:r2440
2004-10-12 15:48:30 +00:00
Nick Mathewson
6c970aec94
Turn tor_strpartion into a swiss-army-knife function, so it can terminate or not-terminate appropriately.
...
svn:r2429
2004-10-07 21:37:06 +00:00
Nick Mathewson
c7e8c2098a
Include a dir-signing-key token in directories to tell the parsing entity which key is being used to sign. This is the first step in obsoleting the dirservers file.
...
svn:r2428
2004-10-07 21:10:40 +00:00
Nick Mathewson
ce3162d035
Make base-64-encoded DER work, including workaround for ugly openssl misfeature that makes base64 decoding fail when you strip out the newlines.
...
svn:r2423
2004-10-07 03:11:42 +00:00
Nick Mathewson
2bba65148b
Refactor fingerprint handling: remember hex digests (no spaces) instead of beautified fingerprints
...
svn:r2422
2004-10-06 13:31:48 +00:00
Nick Mathewson
9e8ae9766e
Only check versions against downloaded directories, not cached directories.
...
svn:r2413
2004-10-03 02:37:52 +00:00
Roger Dingledine
d381aa4696
Fix an evil bug: when we failed to write to our log, fputs()
...
gave us a sigpipe, and we logged that we were ignoring it,
causing us to fail to log that, and delete the log entry. Then
when the signal handler exited, we proceeded to delete the log
entry that had already been deleted.
Now we make sure to only log inside our signal handler if we'll
be exit()ing right after.
svn:r2388
2004-09-28 21:14:40 +00:00
Roger Dingledine
a2517b4f07
checking only 0.0.7 and 0.0.8 didn't work, because some dirservers
...
files have really old descriptors for the authdirservers, so we're
asking them in the new format because they're too old.
now we actually compare the version to a cutoff version, and act
appropriately.
also take this chance to use only >=0.0.8 servers for dns resolves,
because of the recent bugs. we'll bump to >=0.0.9pre1 once there are
some servers running that.
svn:r2380
2004-09-27 06:00:43 +00:00
Roger Dingledine
fa0a1ec49f
cleanup: use strcmpstart() in more places
...
svn:r2372
2004-09-23 22:18:50 +00:00
Nick Mathewson
3590eb535a
Add basic wrappers for zlib/gzip
...
svn:r2324
2004-09-02 18:22:51 +00:00
Nick Mathewson
86980cf6e2
Functions to test nickname validity
...
svn:r2269
2004-08-18 04:44:24 +00:00
Nick Mathewson
7cb93e5bb6
Move string-splitting into a separate function
...
svn:r2263
2004-08-17 21:06:36 +00:00
Roger Dingledine
cd3da3fc12
o clients choose nodes proportional to advertised bandwidth
...
o and/or while avoiding unreliable nodes, depending on goals
o 'fascistfirewall' option to pick dirservers on port 80 and ORs on
port 443.
o if a begin failed due to exit policy, but we believe the IP should have been allowed, switch that router to exitpolicy reject *:* until we get our next directory.
svn:r2231
2004-08-15 08:15:12 +00:00
Nick Mathewson
ba7cc463d4
Clean up tempdir after finishing unittests; use tor_temp_$PID instead of tor_temp; quit if tor_temp_$PID exists.
...
svn:r2226
2004-08-11 19:20:24 +00:00
Nick Mathewson
e6c34ad071
Make unittests pass
...
svn:r2205
2004-08-09 04:26:25 +00:00
Nick Mathewson
f6cc218742
Refactor ISO-style (yyyy-mm-dd hh:mm:ss) time parsing into util.c; rename format/parse_rfc1123_time; make rephist remember used bandwidth; published used bandwidth in descriptors in 15-minute chunks. Breaks unittests.
...
svn:r2182
2004-08-07 02:46:16 +00:00
Nick Mathewson
14d5478f29
Add functions to format and parse RFC1123-style times, for HTTP protocol.
...
svn:r2129
2004-08-04 01:11:15 +00:00
Roger Dingledine
aebec8ab9e
stop using atexit() to remove our pid, since it's called
...
immediately when we daemonize.
also drop our retry period for hidserv desc uploads from 10m to 5m
svn:r2111
2004-07-22 22:15:36 +00:00
Nick Mathewson
d07d0a4e6b
Add fingerprint to router format in tests
...
svn:r2106
2004-07-22 20:34:55 +00:00
Roger Dingledine
7459d067a5
now base16_encode() and base32_encode() can't ever fail
...
svn:r2103
2004-07-22 08:30:06 +00:00
Nick Mathewson
2a339b7627
Split uptime into separate field
...
svn:r2067
2004-07-20 21:13:11 +00:00
Nick Mathewson
df3544422c
Change rule from "reject non-recommended versions" to "reject obsolete versions". A version is "obsolete" if it is non-recommended, and at least one recommended version is newer than it.
...
svn:r2052
2004-07-16 23:33:42 +00:00
Nick Mathewson
c458f33ef1
Fix warning
...
svn:r2046
2004-07-15 01:59:18 +00:00
Nick Mathewson
5f7738d4cc
Code to parse tor version numbers so we can do an is-newer-than check.
...
svn:r2044
2004-07-13 19:16:49 +00:00
Roger Dingledine
63256c9e7a
make unit tests pass again
...
but note a bug that i don't know how to address. nick?
svn:r2030
2004-07-12 20:18:05 +00:00
Roger Dingledine
e167eeb18e
add 'advertisedbandwidth' to router descriptor
...
svn:r2028
2004-07-12 18:02:54 +00:00
Nick Mathewson
7d8de8cd10
More digest/nickname fixes
...
svn:r2000
2004-07-02 23:40:03 +00:00
Nick Mathewson
8aec3a7301
Implement several 008pre1 items: needs more testing
...
svn:r1981
2004-06-21 04:37:27 +00:00
Nick Mathewson
dbf9fe57ea
Use intptr_t correctly in test.c; try to resolve ia64 warnings
...
svn:r1963
2004-06-08 19:08:45 +00:00
Nick Mathewson
94782444f8
Check recommended-software string *early*, before actually parsing the directory.
...
svn:r1930
2004-06-01 18:19:01 +00:00
Nick Mathewson
9c3fba5c3b
Not every RSA decrypt should warn on failure.
...
svn:r1853
2004-05-12 19:30:28 +00:00
Nick Mathewson
b45fafa3d0
Split directory/router parsing functionality into separate file from routerlist.c
...
svn:r1846
2004-05-10 17:30:51 +00:00
Nick Mathewson
6cfdc90d92
Use intptr_t when playing with void*s
...
svn:r1795
2004-05-05 20:27:20 +00:00
Nick Mathewson
e6ac85a8cc
Fix compilation warnings on 64-bit platforms
...
svn:r1793
2004-05-05 20:09:06 +00:00
Roger Dingledine
25909c2c29
patches on patches
...
svn:r1763
2004-05-02 03:15:55 +00:00
Nick Mathewson
f6fe336ad4
Documenmt buffers.c; remove function that nobody ever calls.
...
svn:r1760
2004-05-01 22:08:43 +00:00
Nick Mathewson
908ccb9dcd
Handle windows socket errors correctly; comment most of common.
...
svn:r1756
2004-05-01 20:46:28 +00:00
Nick Mathewson
ddb15b8f67
Remove IVs from cipher code, since AES-ctr has none.
...
svn:r1742
2004-04-28 20:31:32 +00:00
Nick Mathewson
f6dbe5a0d4
Refactor crypto error handling to be more like TLS error handling:
...
crypto_perror is a no-no, since an operation can set more than one
error.
Also, fix a bug in the unix crypto_seed_rng: mixing stdio with
/dev/urandom is a bad idea, since fopen can make all kinds of weird
extraneous syscalls (mmap, fcntl, stat64, etc.) and since fread tends
to buffer data in big chunks, thus depleting the entropy pool.
svn:r1717
2004-04-26 18:09:50 +00:00
Roger Dingledine
25d54257fb
use tor_assert
...
remove obsolete BUF_OK macro
svn:r1697
2004-04-25 20:37:37 +00:00
Nick Mathewson
c44016e86e
Merge flagday into main branch.
...
svn:r1683
2004-04-24 22:17:50 +00:00
Nick Mathewson
94f126bca3
Never ever leave ri.platform unset.
...
svn:r1624
2004-04-14 19:51:57 +00:00
Nick Mathewson
9b436c7f7a
remove a stray printf
...
svn:r1575
2004-04-08 20:59:48 +00:00
Nick Mathewson
aa7cfd93e5
Fix base32 implementation; make base32 implementation follow standard; add more tests for base32
...
svn:r1574
2004-04-08 20:56:33 +00:00
Nick Mathewson
d237692396
Fix unit tests (now that platform code works differently)
...
svn:r1573
2004-04-08 20:22:01 +00:00
Nick Mathewson
3d60cd1d61
Delete trailing whitespace and expand tabs; remove unused aes decrypt code
...
svn:r1522
2004-04-07 19:57:40 +00:00
Nick Mathewson
75c19716a8
Put ourself in router list; act accordingly.
...
svn:r1521
2004-04-07 19:46:27 +00:00
Nick Mathewson
2fc106d210
Force hybrid encryption on for key negotiation
...
svn:r1509
2004-04-06 20:55:46 +00:00
Nick Mathewson
137b577bbd
Refactor the heck out of crypto interface: admit that we will stick with one ciphersuite at a time, make const things const, and stop putting openssl in the headers.
...
svn:r1458
2004-04-03 02:40:30 +00:00
Roger Dingledine
8c19d6e3d7
alice can intercept y.onion requests, do a lookup on them via tor,
...
and receive a 404
svn:r1455
2004-04-03 01:59:53 +00:00
Nick Mathewson
cbbd13f789
Add new functions to wrap digest and sign/checksig.
...
svn:r1436
2004-04-01 22:10:33 +00:00
Nick Mathewson
35f531b94f
Add helpful hybrid encryption functions
...
svn:r1423
2004-04-01 03:08:35 +00:00
Nick Mathewson
6ea61d5e0d
Parse and generate service descriptors
...
svn:r1403
2004-03-31 02:07:38 +00:00
Nick Mathewson
6ea95488d2
Add more key manipulation functions, and base32 functions, to crypto
...
svn:r1395
2004-03-30 19:47:32 +00:00
Roger Dingledine
7118c6177d
clean up a few more bugs
...
svn:r1365
2004-03-29 19:57:50 +00:00
Nick Mathewson
6a79b1cb57
Re-enable unit tests for directory generation.
...
svn:r1362
2004-03-29 19:50:59 +00:00
Roger Dingledine
f241fdfc73
there is yet another dns-pending-conn-clobbering bug
...
somewhere
svn:r1354
2004-03-28 04:54:36 +00:00
Nick Mathewson
b0ef4e1143
Use strmap code for client DNS.
...
svn:r1309
2004-03-20 01:21:19 +00:00
Nick Mathewson
9199696182
Add some wrappers around SPLAY_* for the common map-from-string-to-X case.
...
It will probably be less blindingly fast than using SPLAY_* directly, but
only slightly so.
svn:r1306
2004-03-19 22:07:24 +00:00
Roger Dingledine
a346889e94
make directory format tests quiet again
...
svn:r1287
2004-03-15 05:13:25 +00:00
Nick Mathewson
1e5b7bc6f1
New, more flexible directory parsing backend. Uses a bit more RAM, but implements the new spec. Uses more RAM, but not so you would notice.
...
svn:r1235
2004-03-05 05:48:28 +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
b4338ce704
disable buffer tests, until we rewrite them (one of them fails)
...
svn:r1177
2004-02-29 00:15:20 +00:00
Roger Dingledine
b669b1d57c
oh, and make it compile
...
still need to make a decision about per-connection rate limiting
(take it out? update it?)
svn:r984
2004-01-11 07:41:01 +00:00
Roger Dingledine
6a19e64066
remove trailing whitespace
...
svn:r951
2003-12-17 21:09:31 +00:00
Roger Dingledine
961ecf7abf
add H(K|1) to the onionskin reply
...
verify it at the client end
abstract the onionskin handshake lengths
breaks backward compatibility (again)
svn:r941
2003-12-16 08:21:58 +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
8222fe8e4f
clean up some copyrights
...
svn:r907
2003-12-13 22:53:17 +00:00
Roger Dingledine
9e6f4a3029
revamp circuit node selection to use smartlists:
...
* now we know for sure if an acceptable node is available; we
don't have to keep guessing and checking
* we try options.EntryNodes first for picking the first node
svn:r904
2003-12-13 07:01:46 +00:00