Commit Graph

915 Commits

Author SHA1 Message Date
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
Roger Dingledine
3b97a54226 when rend_cache_store warns, give more detail
svn:r1572
2004-04-08 20:13:28 +00:00
Nick Mathewson
aa2189b406 note which preexisting or connection we found.
svn:r1571
2004-04-08 19:49:55 +00:00
Roger Dingledine
eb9f5a561e circuit-level sendmes weren't working, because the exit
thought it was an exit.

i overhauled the edge_type mechanism. hopefully this will help.


svn:r1570
2004-04-08 09:41:28 +00:00
Roger Dingledine
8e686d0c72 we added more AP conns, oops
svn:r1569
2004-04-08 07:25:54 +00:00
Roger Dingledine
4122e2de11 stop being so eager to have rend_cache_store reject the
service descriptor


svn:r1566
2004-04-08 05:08:27 +00:00
Nick Mathewson
bb46d782ab Be endianly-correct for rendezvous functionality
svn:r1565
2004-04-08 04:47:39 +00:00
Roger Dingledine
15de201041 log which intro points we picked
svn:r1564
2004-04-08 04:36:13 +00:00
Nick Mathewson
2a01e3ad10 Launch intro services after launching connections; allow ORs to build circuits through as-yet-unconnectd ORs
svn:r1562
2004-04-08 03:53:39 +00:00
Roger Dingledine
299df7117c don't try to circuit_log_path if you're at the exit edge of a circ
svn:r1561
2004-04-08 03:30:47 +00:00
Nick Mathewson
ede1d3e42d Invert strcasecmp check for supports-rendezvous
svn:r1560
2004-04-08 03:21:15 +00:00
Roger Dingledine
3e7c8a40bc bugfix: alice would crash if bob advertised 0 intro points
svn:r1559
2004-04-08 03:18:03 +00:00
Nick Mathewson
40f7324eea Allow service descriptors with no intro points
svn:r1557
2004-04-08 03:02:50 +00:00
Nick Mathewson
8351847afd Nothing is good enough for you, is it?
svn:r1556
2004-04-08 02:50:34 +00:00
Nick Mathewson
14e31fbd71 Use CIRCUIT_IS_ORIGIN in favor of boolean circ->cpath
svn:r1555
2004-04-08 02:24:06 +00:00
Roger Dingledine
ad2192c90f only call circuit_build_failed when we're circ's origin
svn:r1554
2004-04-08 02:22:26 +00:00
Roger Dingledine
36d7cc8529 make the max buf size 10 megabytes, not 1 megabyte
need to implement flexible buffer sizes soon


svn:r1553
2004-04-08 02:19:35 +00:00
Roger Dingledine
4d194ef13f clean up rend_client_get_random_intro
svn:r1552
2004-04-08 02:11:49 +00:00
Nick Mathewson
46c82e7dbe Set rend_query on exiting streams
svn:r1551
2004-04-08 02:10:43 +00:00
Roger Dingledine
584350feb8 don't log info when we asked for log warn
svn:r1548
2004-04-08 01:59:31 +00:00
Nick Mathewson
60772ec90c Split out major functionality of circuit_get_best; rephrase a few booleans
svn:r1547
2004-04-08 01:55:21 +00:00
Nick Mathewson
eaf7c61ebc Do not crash when no desc is found
svn:r1546
2004-04-08 01:54:02 +00:00
Roger Dingledine
9d38311ae3 allow for directories >8192 bytes
svn:r1545
2004-04-08 01:47:33 +00:00
Roger Dingledine
6cf584b765 clean up choose_good_exit_server()
svn:r1542
2004-04-07 23:31:29 +00:00
Roger Dingledine
63cde97253 don't try to build intro circs until you've fetched the directory
svn:r1541
2004-04-07 22:48:06 +00:00
Roger Dingledine
e79a578fec if the rend desc cache entry was fetched more than 15 mins ago,
then try to fetch a new one. but if the new fetch fails, use the
old one.


svn:r1540
2004-04-07 22:41:00 +00:00
Nick Mathewson
09e66bbd14 Freeing the same variable twice in rapid succession can sometimes cause a double-free
svn:r1539
2004-04-07 22:25:37 +00:00
Nick Mathewson
6649645f09 Insert a *copy* of our routerinfo into the routerlist.
svn:r1538
2004-04-07 22:18:57 +00:00
Nick Mathewson
b1537e7943 Rebuild and re-upload service descriptors every 15 minutes
svn:r1537
2004-04-07 22:06:54 +00:00
Nick Mathewson
b07b2cef29 Remember when we received which service desc.
svn:r1536
2004-04-07 22:00:54 +00:00
Nick Mathewson
4d14b786da Make sure we have our own keys before we initialize our routerlist
svn:r1535
2004-04-07 21:44:46 +00:00
Nick Mathewson
10b48fee28 Generating data does no good if you make no use of it
svn:r1534
2004-04-07 21:44:24 +00:00
Nick Mathewson
8169da5c30 Don't use Tor version 0.0.5 for intro/rendezvous points. (We don't need
to worry about 0.0.4 or earlier, because nobody is running them any more.)


svn:r1533
2004-04-07 21:36:03 +00:00
Roger Dingledine
93801ac40d don't pick myself or my twins as hops when building circuits
svn:r1531
2004-04-07 21:12:54 +00:00
Nick Mathewson
2633d353d7 Carefully increment failure counts when appropriate
svn:r1530
2004-04-07 20:59:38 +00:00
Roger Dingledine
4df06ab5bb let bob replenish his intro points and republish service desc
as necessary


svn:r1528
2004-04-07 20:47:50 +00:00
Roger Dingledine
505797e998 expire open-but-not-yet-acked circs if they're too old
svn:r1526
2004-04-07 20:38:23 +00:00
Roger Dingledine
650d483bea convince ourselves that circuit_failed doesn't have to be any smarter
svn:r1525
2004-04-07 20:23:59 +00:00
Nick Mathewson
789df20e7d There is no need to cast void* to other pointer types.
svn:r1524
2004-04-07 20:11:28 +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
Roger Dingledine
4a9587a486 we were uploading our server descriptor to each the dirservers
when we boot, and then also on the first iteration of the main loop


svn:r1520
2004-04-07 19:30:22 +00:00
Roger Dingledine
3c683a9e7c let alice reuse recent rendjoin circs
svn:r1519
2004-04-07 19:22:55 +00:00
Roger Dingledine
1f0769c470 mark a rend circ dirty when you attach to it
svn:r1518
2004-04-07 19:14:45 +00:00
Roger Dingledine
cf67520e95 when counting how many being-built circs will handle a stream,
don't count ones that are too old


svn:r1517
2004-04-07 19:14:33 +00:00
Roger Dingledine
90caa94662 routerinfo->addr is host order
svn:r1515
2004-04-07 06:17:27 +00:00
Nick Mathewson
fdb58e8ea3 Set routerinfo->addr properly for own routerinfo; do casei routerinfo compare
svn:r1514
2004-04-06 22:23:12 +00:00
Nick Mathewson
f24519e4b9 Set correct address and port mappings on outgoing rendezvous connections
svn:r1513
2004-04-06 22:05:49 +00:00
Roger Dingledine
95f0e36f08 alice just fetched bob's hidden webpage.
yay.


svn:r1512
2004-04-06 21:52:01 +00:00
Roger Dingledine
d473cf7ee9 set the circ windows on the middle hop of the rend circs
svn:r1511
2004-04-06 21:25:11 +00:00
Nick Mathewson
8b371c2aa5 router_choose_random_node wants a smartlist of routers, not of nicknames.
svn:r1510
2004-04-06 21:19:59 +00:00
Nick Mathewson
2fc106d210 Force hybrid encryption on for key negotiation
svn:r1509
2004-04-06 20:55:46 +00:00
Nick Mathewson
40a5d6055e Stupid sizeof operator!
svn:r1508
2004-04-06 20:45:44 +00:00
Nick Mathewson
2446996f97 Remove vestigial variable
svn:r1507
2004-04-06 20:42:25 +00:00
Roger Dingledine
5eca39cdb4 checkpoint commit: rend closer to working, still not there yet
svn:r1506
2004-04-06 20:25:18 +00:00
Nick Mathewson
ef438b894c Set handshake_state to NULL before appending cpath hops
svn:r1505
2004-04-06 20:23:58 +00:00
Nick Mathewson
6290d027c9 Continue attack on magic numbers; use new crypto wrappers where possible
svn:r1504
2004-04-06 20:16:12 +00:00
Nick Mathewson
257d509b91 Document stuff, reduce magic numbers, add emacs magic
svn:r1502
2004-04-06 03:44:36 +00:00
Roger Dingledine
6e6cbaad95 fix the bob-can't-decode-relays bug
now alice can send the begin and bob can receive it.


svn:r1499
2004-04-05 23:40:59 +00:00
Roger Dingledine
077f133257 don't detach-and-retry rendezvous streams
svn:r1498
2004-04-05 22:43:01 +00:00
Nick Mathewson
0f74b68edd make router_get_by_nickname consider this router.
svn:r1497
2004-04-05 22:22:42 +00:00
Roger Dingledine
2bb18e62cb make rend apconn send to the right cpath layer
and fix circuit_log_path to know about rend circs


svn:r1496
2004-04-05 22:01:35 +00:00
Nick Mathewson
62b7ae6c9d More symbolic constants for checking rendezvous1 cell lengths
svn:r1495
2004-04-05 21:40:22 +00:00
Nick Mathewson
283593ca1b Use correct payload lengths when sending RENDEZVOUS1 cells
svn:r1494
2004-04-05 21:39:47 +00:00
Nick Mathewson
d371dda8f9 Spec conformance: KH|"INTRODUCE" is only for establishing intro pt
svn:r1493
2004-04-05 21:39:18 +00:00
Nick Mathewson
536a9b6c28 Add a missing offset
svn:r1492
2004-04-05 21:31:53 +00:00
Nick Mathewson
5033c366e1 Use symbolic constants; make padding types match.
svn:r1491
2004-04-05 21:15:14 +00:00
Nick Mathewson
04e8dc9026 Implement response to RENDEZVOUS2 cell.
svn:r1490
2004-04-05 20:53:50 +00:00
Nick Mathewson
b1a8b208ca Make init_cpath_crypto able to handle both sides of handshake, by adding a "reverse" flag
svn:r1489
2004-04-05 20:53:04 +00:00
Nick Mathewson
2d3aea40a4 It's amazing how wrong things look when you invert the booleans on your
sanity checks.


svn:r1487
2004-04-05 20:34:58 +00:00
Nick Mathewson
7b1939db2d Slightly more helpful msg on mismatched service pk digest in INTRODUCE2 cell
svn:r1486
2004-04-05 20:33:29 +00:00
Nick Mathewson
eafb8186e5 Do first half of Alice-side of DH handshake.
svn:r1485
2004-04-05 20:30:53 +00:00
Roger Dingledine
27126e5007 oaep uses 42 more bytes -- stop clobbering buffers
also maybe fix some constants here and there -- nick?


svn:r1484
2004-04-05 18:22:00 +00:00
Roger Dingledine
92bb5b2860 strdup the intro point when you pick it, so you
don't free it and then return it


svn:r1483
2004-04-05 17:56:34 +00:00
Roger Dingledine
ac84512489 complain early if we get an unrecognized nickname from
bob's rend service descriptor


svn:r1482
2004-04-05 17:51:00 +00:00
Nick Mathewson
12ede0a2c4 use the right variable when comparing hashes; maybe fix "Hash of session" bug
svn:r1481
2004-04-05 17:36:30 +00:00
Nick Mathewson
41387bea08 Expect a 20-byte nul-padded-and-terminated nickname
svn:r1480
2004-04-05 17:28:48 +00:00
Nick Mathewson
1e2b008700 Add some temporary log calls to try to debug the "Hash of session info was not as expected" problem
svn:r1479
2004-04-05 17:20:57 +00:00
Roger Dingledine
cebf16eaf0 if a rend stream has already been attached to a rend circ,
then don't attach it again (and again, and again, and...)


svn:r1477
2004-04-05 15:24:03 +00:00
Roger Dingledine
8a209bc4d3 send a destroy after we send an introduce
svn:r1476
2004-04-05 15:17:34 +00:00
Roger Dingledine
5b6099e8a2 more alice-side infrastructure
handle rendezvous acks,
do rend begin cells right,
send an introduction cell (sort of)
receive a rendezvous2 cell (sort of)


svn:r1475
2004-04-05 07:41:31 +00:00
Roger Dingledine
7793078dff alice can now look up bob's service descriptor,
choose an intro point, connect to it,
choose a rend point, connect to it and establish a cookie,
get an ack from the rendezvous point,
and know when both circs are ready for her.

APConns don't use conn->purpose anymore

don't initiate a renddesc lookup if one is already in progress

also fix a buffer overflow in nickname parsing (only exploitable
by the operator though)


svn:r1471
2004-04-05 00:47:48 +00:00
Nick Mathewson
a9813f0210 Implement acks
svn:r1470
2004-04-03 04:55:22 +00:00
Nick Mathewson
3af1191023 Add func to generate,set,and send rend cookie
svn:r1469
2004-04-03 04:22:22 +00:00
Roger Dingledine
86f2ddc88d nick, can you make and send the rendezvous cookie?
svn:r1467
2004-04-03 04:05:30 +00:00
Nick Mathewson
b3c2b62a14 Make "common" no longer depend on or.h
svn:r1466
2004-04-03 04:05:12 +00:00
Nick Mathewson
cb07e2ad27 Strdup hates finding 0 bytes.
svn:r1465
2004-04-03 03:39:31 +00:00
Nick Mathewson
d93ff0b82f Handle rendezvous relay cells
svn:r1464
2004-04-03 03:37:11 +00:00
Roger Dingledine
7eaa655b6d publish and fetch the right rendezvous urls
svn:r1463
2004-04-03 03:33:57 +00:00
Nick Mathewson
ba196a9d17 Use (set|get)_uint(16|32) in lieu of memcpy where reasonable.
svn:r1462
2004-04-03 03:07:25 +00:00
Roger Dingledine
8a1ad2b84e more progress on alice's side
svn:r1461
2004-04-03 03:06:06 +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
4e996a4ce8 tabs
svn:r1456
2004-04-03 02:14:20 +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
88e2a09c22 Startup without crashing.
svn:r1452
2004-04-03 01:11:04 +00:00
Nick Mathewson
fc4d15baf6 Hide smartlist internals
svn:r1451
2004-04-03 00:58:54 +00:00
Roger Dingledine
bbc9484957 fix some bugs; more remain
svn:r1450
2004-04-03 00:55:53 +00:00
Roger Dingledine
06c812c2de remember to lower-case the y in y.onion
svn:r1449
2004-04-03 00:27:33 +00:00