Commit Graph

254 Commits

Author SHA1 Message Date
Nick Mathewson
4a3b7496f0 r17639@catbus: nickm | 2008-01-15 19:09:21 -0500
Fix some hard to trigger but nonetheless real memory leaks spotted by an anonymous contributor.  Needs review.  Partial backport candidate.


svn:r13147
2008-01-16 05:27:19 +00:00
Roger Dingledine
1d8a8063b9 clean up copyrights, and assign 2007 copyrights to The Tor Project, Inc
svn:r12786
2007-12-12 21:09:01 +00:00
Roger Dingledine
50f22e858a doc pedant
svn:r9634
2007-02-24 07:50:38 +00:00
Nick Mathewson
11e5656ab7 r11826@catbus: nickm | 2007-02-16 14:58:38 -0500
Resolve 56 DOCDOC comments.


svn:r9594
2007-02-16 20:01:02 +00:00
Nick Mathewson
759c58151e r11775@catbus: nickm | 2007-02-12 16:39:09 -0500
Update copyright dates.


svn:r9570
2007-02-12 21:39:53 +00:00
Nick Mathewson
fefba95363 r11629@catbus: nickm | 2007-02-02 15:06:17 -0500
Removing the last DOCDOC comment hurt so much that I had to use Doxygen to identify undocumented macros and comments, and add 150 more DOCDOCs to point out where they were.  Oops.  Hey, kids!  Fixing some of these could be your first Tor patch!


svn:r9477
2007-02-02 20:06:43 +00:00
Nick Mathewson
1bf1f9d2fc r9449@Kushana: nickm | 2006-10-31 00:12:02 -0500
Dump breakdown of PK operations when we get a USR2 signal.  This should help us figure out of we are doing some of them for stupid reasons.


svn:r8881
2006-10-31 19:17:07 +00:00
Nick Mathewson
7239262f71 Don't tell anybody, but we're going OO here. This patch splits
circuit_t into origin_circuit_t and or_circuit_t.  I fixed some
segaults; there may be more.  We still need to move more rendezvous
stuff into subtypes.

This is a trial run for splitting up connection_t; if the approach is
insane, please say so soon so we can do something smarter.

Also, this discards the old HALF_OPEN code, which nobody seems to
want.


svn:r6817
2006-07-23 07:37:35 +00:00
Roger Dingledine
aa63a84fe1 the things we do for our windows users.
i hope they appreciate it.


svn:r6004
2006-02-13 09:37:53 +00:00
Roger Dingledine
5f051574d5 Happy new year!
svn:r5949
2006-02-09 05:46:49 +00:00
Roger Dingledine
e05d4e45d2 provide a more useful warn message when our onion queue
gets full.


svn:r5881
2006-01-31 08:17:00 +00:00
Nick Mathewson
878962bee1 Add reasons to DESTROY and RELAY_TRUNCATED cells.
svn:r5734
2006-01-05 21:23:03 +00:00
Nick Mathewson
1af630d32c Bite the bullet and limit all our source lines to 80 characters, the way IBM intended.
svn:r5582
2005-12-14 20:40:40 +00:00
Roger Dingledine
58366ffd24 when we changed from log_fn to debug/info/notice/warn/err,
we screwed up the formatting in wild and unpredictable ways.

fix it before it becomes convention to format logs in wild and
unpredictable ways.

still need to do src/common/ someday.


svn:r5551
2005-12-10 09:36:26 +00:00
Nick Mathewson
e9b66ec906 Document CREATE_FAST better in the code. Move our key expansion algorithm into a separate function in crypto.c
svn:r5530
2005-12-08 17:38:32 +00:00
Nick Mathewson
5d85560d9e Remove last vestiges of old logging interface.
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
f9b0be526e Use LD_BUG as appropriate; convert rend* and router* to new logging interface; use new circ_log_path interface
svn:r5302
2005-10-24 19:39:45 +00:00
Nick Mathewson
1bd3f6cc9a Update more files to new log stuff.
svn:r5286
2005-10-18 22:56:40 +00:00
Peter Palfrader
0d9aedfcea Downgrade a few INFO level logs to DEBUG again. Also add two or three new
logs in cases where a calling function's log was downgraded and we wouldn't
get any log message otherwise.


svn:r5263
2005-10-17 16:21:42 +00:00
Nick Mathewson
ba24193ab5 Make doxygen marginally happier
svn:r5208
2005-10-06 04:33:40 +00:00
Nick Mathewson
18c11eb3bc Be consistent about preferring foo* to struct foo*
svn:r4637
2005-07-22 21:12:10 +00:00
Nick Mathewson
ec83652357 Logic to implement rendezvous/introduction via unknown servers.
- Add a new extend_info_t datatype to hold information needed to
  extend a circuit (addr,port,keyid,onion_key).  Use it in cpath and
  build_state.  Make appropriate functions take or return it instead of
  routerinfo_t or keyid.

- #if 0 needless check in circuit_get_by_edge_conn; if nobody triggers this
  error in 0.1.0.10, nobody will trigger it.

- Implement new hidden service descriptor format, which contains "extend
  info" for introduction points, along with protocol version list.
  - Parse new format.
  - Generate new format
  - Cache old and new formats alongside each other.
  - Directories serve "old" format if asked in old way, "newest available"
    format if asked in new way.
  - Use new format to find introduction points if possible; otherwise fall
    back.  Keep nickname lists and extendinfo lists in sync.
  - Tests for new format.

- Implement new "v2" INTRODUCE cell format.
  - Accept new format
  - Use new format if we have a versioned service descriptor that says the
    server accepts the new format.

- Add documentation for functions and data types.


svn:r4506
2005-06-29 21:46:55 +00:00
Roger Dingledine
a3c66475f3 compile fix by agl, for code that is always commented out
svn:r4427
2005-06-13 17:33:12 +00:00
Nick Mathewson
232861ba42 Docment or add DOCDOC comments to undocumented functions in src/or. Make function definition format uniform.
svn:r4411
2005-06-11 18:52:12 +00:00
Nick Mathewson
0831823763 Change end-of-file NLNL convention. It turns out arma I and I agree.
svn:r4382
2005-06-09 19:03:31 +00:00
Nick Mathewson
10b2208d93 Make Tor compile with no warnings with gcc4.0 on OSX
svn:r4184
2005-05-07 05:55:06 +00:00
Nick Mathewson
ab34901263 New and frightening code to implement fast-path first-hop CREATE_FAST cells. Watch out when we bump the version to 0.1.0.6-rc!
svn:r4162
2005-05-02 22:35:18 +00:00
Nick Mathewson
0e81265359 update copyright notices.
svn:r3982
2005-04-01 20:15:56 +00:00
Roger Dingledine
38f53cff41 forward-port the onion queue thing
svn:r3639
2005-02-20 09:27:48 +00:00
Nick Mathewson
f672577bc6 Free even more things on shutdown. Temporarily move tor_free_all out from #ifdef so it gets tested more.
svn:r3614
2005-02-11 01:26:47 +00:00
Roger Dingledine
9856e328c4 stop logging loudly when a client tries an old onion key. it's
time to give up on that issue, at least for now.


svn:r3479
2005-01-31 04:03:57 +00:00
Roger Dingledine
011ad3cba5 clean up logging,
make it clearer which warns are bugs,
make the control log event match its specification,
point out a bug in how we deal with failure when renewing the tls context.


svn:r3138
2004-12-13 00:44:39 +00:00
Nick Mathewson
7fbd297532 Suggestion from weasel: Make tor --version --version dump the cvs Id of every file.
svn:r3019
2004-11-29 22:25:31 +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
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
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
a42adce362 fix memory leak in router.c; start relying on NULL==(zero bytes)
svn:r2538
2004-10-16 20:38:57 +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
Roger Dingledine
136d4e5739 prefer tor_free to free
plus complain more loudly when we fail to parse a dir we just fetched


svn:r2401
2004-09-29 06:52:36 +00:00
Roger Dingledine
ef561c0e42 Break files apart into more modules
* \file circuitbuild.c
 * \brief The actual details of building circuits.

 * \file circuitlist.c
 * \brief Manage the global circuit list.

 * \file circuituse.c
 * \brief Launch the right sort of circuits, attach streams to them.

 * \file connection_edge.c
 * \brief Handle edge streams.

 * \file onion.c
 * \brief Functions to queue create cells, and handle onionskin
 * parsing and creation.

 * \file relay.c
 * \brief Handle relay cell encryption/decryption, plus packaging and
 * receiving from circuits.


svn:r1863
2004-05-13 07:24:49 +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
81922a125c More doxygenation.
svn:r1832
2004-05-10 04:34:48 +00:00
Roger Dingledine
21e094a5d3 function header comments for onion.c, including doxygen markup
svn:r1826
2004-05-10 02:36:04 +00:00
Roger Dingledine
28f034e10a now assume all routers support rendezvous cells
svn:r1699
2004-04-25 21:32:04 +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
0fca143ea1 Remove onion_pkey from connection, since onion keys can change more often than connections. Also add more log messages
svn:r1693
2004-04-25 19:04:11 +00:00
Nick Mathewson
c44016e86e Merge flagday into main branch.
svn:r1683
2004-04-24 22:17:50 +00:00
Roger Dingledine
01e594e512 clean up some warnings
svn:r1651
2004-04-17 06:34:20 +00:00
Roger Dingledine
49f5e5b4ae handle more purposes in new_route_len
svn:r1618
2004-04-14 05:06:08 +00:00
Roger Dingledine
c5052bec95 normal circs are 3 hops, but rend/intro circs are 4, because
the initiator doesn't get to choose the last hop


svn:r1595
2004-04-12 18:40:14 +00:00
Roger Dingledine
6cf584b765 clean up choose_good_exit_server()
svn:r1542
2004-04-07 23:31:29 +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
789df20e7d There is no need to cast void* to other pointer types.
svn:r1524
2004-04-07 20:11:28 +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
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
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
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
fc4d15baf6 Hide smartlist internals
svn:r1451
2004-04-03 00:58:54 +00:00
Roger Dingledine
fc3d7383e7 router_choose_random_node can take a smartlist of nodes to exclude
svn:r1442
2004-04-02 22:30:39 +00:00
Roger Dingledine
f34e6da3e7 now circuit_get_newest returns an appropriate circ for your purpose
connection_ap_handshake_attach_circuit attaches to a circ of the
right purpose

add a skeletal rendclient.c


svn:r1441
2004-04-02 22:23:15 +00:00
Nick Mathewson
79fc52170e For hidden services: handle INTRODUCE2, send ESTABLISH_INTRO, RENDEZVOUS1.
Also:
- Add a pending final cpath element to build_state
- Rename S_RENDEZVOUSING to S_CONNECT_REND
- Add [CS]_REND_JOINED
- Split out logic to initialize cpath crypto objects.
- Have circuits/cpaths remember the KH element from their handshake, so they
  can use it for other authentication later. (As in ESTABLISH_INTRO)


svn:r1438
2004-04-01 22:21:01 +00:00
Roger Dingledine
05b99bcf7d alice chooses her rendezvous node from all running routers
and she can set preferences in her options


svn:r1433
2004-04-01 20:33:29 +00:00
Roger Dingledine
cc3c4245cb let the circuit-launcher choose the exit node (if he wants)
svn:r1428
2004-04-01 03:44:49 +00:00
Nick Mathewson
93ab51e9ac Make smartlist Do What Arma Expects.
svn:r1401
2004-03-30 22:59:00 +00:00
Nick Mathewson
96a86ef14d Remove maximum-size field from smartlists
svn:r1397
2004-03-30 20:05:52 +00:00
Roger Dingledine
45699bb5ee clean up some 'warn' messages while i'm at it
svn:r1342
2004-03-26 22:28:16 +00:00
Roger Dingledine
c195f69058 isspace and friends take an int. solaris cares.
svn:r1303
2004-03-19 20:50:12 +00:00
Roger Dingledine
208625ae31 clean up some presentation and comments
svn:r1294
2004-03-18 19:22:56 +00:00
Roger Dingledine
de146de0c5 make circuit-building less noisy when a node in your exclude/exit/entrynodes is down
svn:r1206
2004-03-03 03:02:06 +00:00
Roger Dingledine
4716d4d871 bugfix: only warn about an unrouter router after we've fetched a directory
svn:r1178
2004-02-29 01:31:33 +00:00
Roger Dingledine
70c43e152a note bug in assert_connection_ok
svn:r1159
2004-02-28 07:48:28 +00:00
Roger Dingledine
b354ecfecd rename ExcludedNodes config option to ExcludeNodes
svn:r1155
2004-02-28 05:09:37 +00:00
Roger Dingledine
46ffc5984d best_support_idx is obsolete
(also doesn't fix the bug)


svn:r1097
2004-02-17 08:42:25 +00:00
Nick Mathewson
bd14023afd Propagate yes/no/maybe a little farther forward.
svn:r1096
2004-02-17 08:29:22 +00:00
Roger Dingledine
d508a194f7 Let paranoid exit nodes (which default to reject) be exit nodes
Before we resolve the hostname, we don't know whether its IP will                        be accepted or rejected by the exit policy of each host. So we                           were only going with nodes that would certainly accept -- which
was just itys and poblano.

(This bug was hidden until now by the earlier port bug.)

(Actual bugfix pending on Nick's next commit, hopefully.)


svn:r1092
2004-02-17 07:45:44 +00:00
Nick Mathewson
17adfa9dfd log when exit situation is hopeless.
svn:r1057
2004-02-04 22:35:58 +00:00
Roger Dingledine
f6f9b1d94d for perf testing, paths are always 3 hops, not "3 or more"
svn:r1030
2004-01-30 23:43:17 +00:00
Roger Dingledine
e05d39d1af fix a per-circuit memory leak
svn:r1029
2004-01-30 21:32:40 +00:00
Roger Dingledine
afdaff63ef turn some knobs, add more debugging
svn:r1023
2004-01-30 19:31:39 +00:00
Roger Dingledine
61723a1f69 small default route when doing speed testing
svn:r1010
2004-01-20 03:12:46 +00:00
Roger Dingledine
db0c27b362 resolve cygwin warnings for pre19
svn:r981
2004-01-08 22:48:18 +00:00
Roger Dingledine
d6ce65afd6 the onionskin challenge length was 30 bytes longer than necessary
(i think ;)


svn:r971
2004-01-05 05:23:03 +00:00
Roger Dingledine
6a19e64066 remove trailing whitespace
svn:r951
2003-12-17 21:09:31 +00:00
Roger Dingledine
aba237e3e2 end-to-end integrity checking now works
initialize digests from shared secrets at handshake
make circuit_send_next_onion_skin use connection_edge_send_command


svn:r948
2003-12-17 05:58:30 +00:00
Roger Dingledine
8712a30e91 move cell size to 512 bytes
move length to 2 bytes, put it in the relay header
remove 4 reserved bytes in cell
add 4 bytes to relay header for the integrity check


svn:r942
2003-12-16 09:48:17 +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
8f573c06c3 start to track the 'unexpected relay cell' warning
svn:r928
2003-12-14 06:50:44 +00:00
Roger Dingledine
1096eae543 add options.ExcludedNodes -- nodes that are never picked in path building
svn:r924
2003-12-14 05:08:28 +00:00
Roger Dingledine
29adf04683 more general cleanup
svn:r915
2003-12-14 00:12:02 +00:00
Roger Dingledine
78a7de300c make options.ExitNodes work
if your best choices happen to include any of your preferred exit nodes,
you choose among just those preferred exit nodes.


svn:r911
2003-12-13 23:32:57 +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
Roger Dingledine
c425f2e0ec use the smartlist to pick random routers, rather than our own idiom
svn:r898
2003-12-13 01:43:21 +00:00
Roger Dingledine
9c66e2bf9a if >=2 circs are being built that handle a given stream,
no need to have new circs handle it too.


svn:r896
2003-12-12 23:03:25 +00:00