Commit Graph

2689 Commits

Author SHA1 Message Date
Nick Mathewson
ce51a30adc Remove the last tab in non-contributed code
svn:r1503
2004-04-06 03:46:37 +00:00
Nick Mathewson
257d509b91 Document stuff, reduce magic numbers, add emacs magic
svn:r1502
2004-04-06 03:44:36 +00:00
Nick Mathewson
34633c1122 add more constants
svn:r1488
2004-04-05 20:52:16 +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
84b9e90d5f i2d_RSAPublicKey advances the pointer it receives past the ASN1-encoded string.
svn:r1478
2004-04-05 17:10:48 +00:00
Nick Mathewson
82cde03ddc Make it build on linux
svn:r1468
2004-04-03 04:08:54 +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
d93ff0b82f Handle rendezvous relay cells
svn:r1464
2004-04-03 03:37:11 +00:00
Nick Mathewson
7451de5d97 Loops work better when they terminate. Non-terminating loops are easier
to diagnose when they don't trash the stack.


svn:r1460
2004-04-03 02:55:42 +00:00
Nick Mathewson
ffc58cd91a Build without warnings against openssl 0.9.6
svn:r1459
2004-04-03 02:43:09 +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
Nick Mathewson
fc4d15baf6 Hide smartlist internals
svn:r1451
2004-04-03 00:58:54 +00:00
Nick Mathewson
e8345bfced refactor; start adding debugging logs to midpoint rend stuff
svn:r1445
2004-04-02 23:30:54 +00:00
Nick Mathewson
08d748b6b3 Implement rennd_services_init
svn:r1443
2004-04-02 23:01:00 +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
56b3d67149 Separate "generate-DH-key" from "get-DH-key" without breaking old interface
svn:r1431
2004-04-01 20:04:54 +00:00
Nick Mathewson
35f531b94f Add helpful hybrid encryption functions
svn:r1423
2004-04-01 03:08:35 +00:00
Roger Dingledine
d7cb4d0ae6 make changes that ben laurie suggested
(ben, was this what you had in mind?)


svn:r1415
2004-03-31 22:41:25 +00:00
Nick Mathewson
b32440a028 Implement hidserv_XX functions; there is still an XXX in directory_handle_command
svn:r1404
2004-03-31 03:42:56 +00:00
Nick Mathewson
6ea61d5e0d Parse and generate service descriptors
svn:r1403
2004-03-31 02:07:38 +00:00
Nick Mathewson
93ab51e9ac Make smartlist Do What Arma Expects.
svn:r1401
2004-03-30 22:59:00 +00:00
Nick Mathewson
919a8f236e Resolve type-punning warnings
svn:r1399
2004-03-30 22:50:49 +00:00
Nick Mathewson
c31f5505da Jump through a hoop, suppress a warning
svn:r1398
2004-03-30 22:42:26 +00:00
Nick Mathewson
96a86ef14d Remove maximum-size field from smartlists
svn:r1397
2004-03-30 20:05:52 +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
Nick Mathewson
abcf3d9341 Make smartlists start small and grow as needed.
svn:r1394
2004-03-30 19:25:43 +00:00
Roger Dingledine
0864d3f484 add in a 'notice' log level
svn:r1383
2004-03-30 03:15:23 +00:00
Nick Mathewson
b69f5f3e1b Add an autoconf test for whether unaligned int access is permitted.
It works on macos, and works correctly when I twiddle the test code to
generate a spurious segfault.  Will it work anywhere else?


svn:r1329
2004-03-21 04:14:06 +00:00
Nick Mathewson
0d8feba6d8 Add macros and functions to wrap memcpy/alignment logic.
svn:r1326
2004-03-21 02:01:17 +00:00
Roger Dingledine
d10fcc89ec make uname() more likely to work on solaris
(linux says 0 is success, solaris says 1 is success)


svn:r1322
2004-03-20 21:22:16 +00:00
Nick Mathewson
da9d5ccfda Add initial history-tracking backend code for reputation module. Not called or tested yet.
svn:r1310
2004-03-20 01:48:05 +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
df3f37b84f getpid returns a pid_t. we all know that's an int. but solaris doesn't know.
svn:r1305
2004-03-19 21:34:04 +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
6438a5db08 ship strlcat and strlcpy with the tarball, but don't compile them
svn:r1297
2004-03-19 06:39:52 +00:00
Roger Dingledine
7648c6c0ea define INADDR_NONE so we compile on solaris
svn:r1295
2004-03-18 19:59:39 +00:00
Nick Mathewson
971b002d93 Include strlcpy and strlcat where not available, so our string ops can be less error-prone.
svn:r1289
2004-03-17 07:28:09 +00:00
Roger Dingledine
6a2821a7ff fix a byte order bug
svn:r1277
2004-03-15 04:00:11 +00:00
Roger Dingledine
f55ff5b8d2 teach us to recognize internal IPs
svn:r1271
2004-03-14 18:07:46 +00:00
Roger Dingledine
3ccd545c9a crash when our logs go bad
nick, can you think of a better response here?


svn:r1268
2004-03-14 15:50:00 +00:00
Roger Dingledine
45a3f6b97c more pesky tabs
svn:r1265
2004-03-12 13:02:16 +00:00
Nick Mathewson
976bacae94 Make all the other read/writes into recv/sends, except when they shouldn't be.
svn:r1260
2004-03-11 06:35:03 +00:00
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
Roger Dingledine
069227db5b introduce new tor_free() macro
svn:r643
2003-10-21 09:48:58 +00:00
Roger Dingledine
5f1750a288 include our own timegm() impl, since it's not portable
svn:r635
2003-10-20 20:19:59 +00:00
Roger Dingledine
dc85b7af3c warn, not err
svn:r630
2003-10-19 01:15:36 +00:00
Nick Mathewson
0ec2a34a1d Code to get nicknames from peer certs
svn:r627
2003-10-19 00:46:51 +00:00
Roger Dingledine
ec96419109 let tls tolerate reallocing the buf
and also remember the params for ssl_write if it returns wantread.


svn:r626
2003-10-19 00:39:48 +00:00
Roger Dingledine
c627ba2632 first steps toward a WANTWRITE SSL_write tls bug fix
how exactly the same do the arguments need to be? :(


svn:r625
2003-10-18 08:00:19 +00:00
Roger Dingledine
61e180ceb1 start to track down the 'peer has invalid cert' bug
svn:r623
2003-10-18 06:48:46 +00:00
Roger Dingledine
2093f60760 we've been stomping on memory while reading config
doesn't seem to have bitten us yet, but let's fix that :)


svn:r619
2003-10-18 01:28:39 +00:00
Roger Dingledine
82aa621b47 rewrite close_logs so it could possibly work
remove deadbeef memory-clobber testing (for now)


svn:r616
2003-10-18 00:07:58 +00:00
Nick Mathewson
f32c1c3127 Log TLS errors even harder
svn:r604
2003-10-15 23:50:25 +00:00
Nick Mathewson
f81178a312 Add more logging on some ssl errors.
svn:r603
2003-10-15 23:42:44 +00:00
Roger Dingledine
11a23fc280 clean up logging, allow user to specify log files
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
2003-10-15 18:50:16 +00:00
Nick Mathewson
695920d09f Build without warnings on OS X.
svn:r595
2003-10-15 18:48:48 +00:00
Nick Mathewson
22ef733058 Make add_file_log return 0 on success.
svn:r594
2003-10-15 18:38:38 +00:00
Nick Mathewson
77be56fbdd Add tor_realloc to mirror tor_malloc
svn:r582
2003-10-14 01:11:42 +00:00
Roger Dingledine
8df0eee16a oops, bugfix
svn:r572
2003-10-10 01:50:20 +00:00
Roger Dingledine
36fb8e839d change WARNING to WARN
svn:r570
2003-10-10 01:48:03 +00:00
Nick Mathewson
36939303c9 Update LICENSE and copyright dates.
svn:r560
2003-10-08 02:04:08 +00:00
Nick Mathewson
3d7463d2b3 Clear revents even when no events are received. Also, since everyone gets in exceptions, everyone gets to increment maxfd.
svn:r550
2003-10-07 21:16:04 +00:00
Nick Mathewson
74e6c03cab Hoping to find an fd larger than ((unsigned)-1) is probably a lost cause.
svn:r549
2003-10-07 20:45:16 +00:00
Roger Dingledine
f9f091eb0e do not ask for whom there's an error, it polls for thee
svn:r548
2003-10-07 20:02:45 +00:00
Roger Dingledine
de6cbe53c0 some early bugfixes
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
2003-10-07 16:30:05 +00:00
Roger Dingledine
be874358a4 wrap strdup; prefer time() to gettimeofday()
svn:r538
2003-10-04 03:29:09 +00:00
Roger Dingledine
750b238aea clean some includes
svn:r535
2003-10-04 01:36:11 +00:00
Nick Mathewson
6ac42f5ec0 Make testcases run again; more sanity checking to descriptor generation.
svn:r532
2003-10-01 22:31:13 +00:00
Nick Mathewson
f694ab23f5 Flush after fputs
svn:r526
2003-10-01 00:42:24 +00:00
Roger Dingledine
f0e94dab86 make log use a larger buffer, for easier debugging
svn:r515
2003-09-30 19:53:25 +00:00
Roger Dingledine
3ed7aedc11 bugfixes and features: closer to making dirserv work
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
2003-09-29 23:14:49 +00:00
Roger Dingledine
467d278b8b more cleanup and rearranging
still not finished integrating new dirserv stuff


svn:r507
2003-09-29 07:50:08 +00:00
Roger Dingledine
677707433e shift read_file_to_str() into util.c
svn:r504
2003-09-28 06:47:29 +00:00
Nick Mathewson
798bb6ab3b Add function to wrap SSL_pending
svn:r501
2003-09-27 20:07:40 +00:00
Roger Dingledine
bf10a3c0f1 finish enforcing the log convention
svn:r494
2003-09-26 22:27:24 +00:00
Roger Dingledine
d8f646c44f make writing descs work
svn:r492
2003-09-26 21:26:25 +00:00
Nick Mathewson
febb2251ca Add code to parse fingerprint files and compare routers against fingerprint files.
svn:r490
2003-09-26 20:41:23 +00:00
Nick Mathewson
a3e08a0119 Bugfixes in crypto_pk_write_private_key_to_filename
svn:r489
2003-09-26 18:44:20 +00:00
Nick Mathewson
92acbe12bc Refactor common file code into util.c; add published to descriptors
svn:r487
2003-09-26 18:27:35 +00:00
Roger Dingledine
3b5191d36d various bugfixes and updates
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
2003-09-25 10:42:07 +00:00
Nick Mathewson
3d4ccb781a Refactor buffers; implement descriptors.
'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
2003-09-25 05:17:11 +00:00
Roger Dingledine
e514ac528c fix a segfault on truncated log lines
svn:r473
2003-09-19 09:30:34 +00:00
Nick Mathewson
5f9ac2bdfd More fine-grained logging messages on ZeroReturn/Syscall error cases
svn:r467
2003-09-16 20:53:09 +00:00
Nick Mathewson
7711c2e745 Add backend support for multiple logfiles, including console logs.
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
2003-09-16 17:58:36 +00:00
Nick Mathewson
e4dfc3c8fe Cipher lists need to be colon separated. Also make initialization more bulletproof
svn:r459
2003-09-15 19:38:52 +00:00
Nick Mathewson
633a5ffc0b Fix TLS error logging
svn:r458
2003-09-15 18:37:49 +00:00
Nick Mathewson
408bff4a23 Log protocol errors
svn:r457
2003-09-15 18:18:37 +00:00
Roger Dingledine
e585dad887 fix the cpuworker circ-had-vanished bug (maybe)
still several (many) tls-related bugs outstanding.


svn:r454
2003-09-14 02:58:50 +00:00
Nick Mathewson
001cd08b2e Fix bugs in certificate generation and SSL context creation. Both seem to work now.
svn:r447
2003-09-11 23:26:31 +00:00
Nick Mathewson
5082ee8ae0 Non-debugging messages are nice to log too
svn:r444
2003-09-11 22:13:13 +00:00
Nick Mathewson
529d3bc56f Resolve XXXXs in tortls.c
svn:r443
2003-09-11 21:38:57 +00:00
Nick Mathewson
f5b4ef1fa2 Simplify some code paths in TLS; cut down on memory leaks; use
reasonable ciphers if not everyone has OpenSSL 0.9.7.


svn:r442
2003-09-11 21:12:39 +00:00
Roger Dingledine
0761bc7b83 fix typo that's been bugging me
svn:r440
2003-09-11 20:10:39 +00:00
Nick Mathewson
e22b271895 Add certificate verification functions
svn:r438
2003-09-10 00:47:39 +00:00
Nick Mathewson
9955b265ab Make crypto structures private to crypto.c
svn:r437
2003-09-10 00:47:24 +00:00
Nick Mathewson
67697d5ab1 Add prototypes for functions to check whether the peer certificate is
valid (if it is present); and to get a public key from a peer
certificate (in order to identify the peer).


svn:r436
2003-09-10 00:10:37 +00:00
Roger Dingledine
1a9b5f9de9 another wishlist function for the tls interface
svn:r433
2003-09-08 10:46:19 +00:00
Roger Dingledine
ace475f01c hide the global tls context inside tortls.c
svn:r431
2003-09-08 06:22:19 +00:00
Roger Dingledine
99d1e4931b move variable declarations to top of function
svn:r425
2003-09-05 05:58:21 +00:00
Nick Mathewson
fd20011c26 Add initial interfaces and code for TLS support. Interfaces are right; code needs work and testing.
svn:r424
2003-09-04 16:05:08 +00:00
Roger Dingledine
58c5d5e918 fix formatting in crypto.c for my sanity
svn:r411
2003-08-25 07:06:12 +00:00
Roger Dingledine
2dda97e8fd implemented cpuworkers
please poke at it and report bugs

still needs polishing, and only handles onions now (should handle
OR handshakes too)


svn:r402
2003-08-20 23:05:22 +00:00
Roger Dingledine
d43f145ddf include torint.h in 'make dist'
svn:r401
2003-08-14 21:46:24 +00:00
Nick Mathewson
1777487f4e Tor now builds on win32.
svn:r400
2003-08-14 17:51:36 +00:00
Nick Mathewson
cd3467bb01 Attempt to make sockets code work right on windows.
svn:r398
2003-08-14 17:13:52 +00:00
Nick Mathewson
bbd4032fc1 Make windows happier still
svn:r392
2003-08-12 08:18:13 +00:00
Nick Mathewson
9b12a48428 Stop trying to #include the world in util.c
svn:r390
2003-08-12 07:49:29 +00:00
Nick Mathewson
2cb4f7a473 Adopt socketpair implementation from perl. For now, always use it.
svn:r389
2003-08-12 07:43:15 +00:00
Nick Mathewson
e4a6ea5c46 Add abstraction for fork vs thread.
svn:r387
2003-08-12 07:01:20 +00:00
Nick Mathewson
5c4255595d Dont use explicit paths for orconfig.h -- it messes up the windows build
svn:r386
2003-08-12 06:45:03 +00:00
Nick Mathewson
2aff21f857 Reorder includes so that fakepoll.c gets built when it should
svn:r384
2003-08-12 06:41:40 +00:00
Nick Mathewson
b927c56144 unbork windows line endings
svn:r381
2003-08-12 03:16:15 +00:00
Nick Mathewson
c336c99e60 Start of port to win32. Missing are:
- signal support
  - forking for DNS farm
  - changes for async IO
  - daemonizing

In other words, some files still don't build, and the ones that do build,
do nonblocking IO incorrectly.

I'm also not checking in the project files till I have a good place
for them.


svn:r380
2003-08-12 03:08:41 +00:00
Nick Mathewson
5126f203f2 Work on systems with broken AC_CHECK_TYPE
svn:r379
2003-08-11 23:21:51 +00:00
Nick Mathewson
58e2edfb24 Who would have thought that some systems define intfoo_t, but not uintfoo_t? Cygwin is such a system.
svn:r378
2003-08-11 21:16:13 +00:00
Nick Mathewson
7284c25b34 Cope better on platforms that define some of intFOO_t in sys/types.h or elsewhere
svn:r377
2003-08-11 20:50:30 +00:00
Nick Mathewson
5267518455 autoconf around missing stdint.h
svn:r376
2003-08-11 20:40:21 +00:00
Nick Mathewson
f12fdd62aa Be smarter about getting key matter from DH.
Formerly, once we had g^xy, we took the last N bytes from g^xy.

Now, we take SHA(g^xy || [0]) || SHA1(g^xy || [1]) || ... , in order
to use all bits from g^xy equally, and generate as much key material
as we need.


svn:r370
2003-07-30 19:10:20 +00:00
Nick Mathewson
300984c057 Add AES counter-mode support to the crypt library
svn:r362
2003-06-30 19:18:32 +00:00
Nick Mathewson
a0f1588318 Add a the public-domain AES implementation, with a minimal counter-mode wrapper.
svn:r361
2003-06-30 19:18:12 +00:00
Roger Dingledine
6c9e3762b5 clean up sev_to_string hack in log.c
svn:r355
2003-06-25 04:47:54 +00:00
Roger Dingledine
23b1586c26 clean up a broken comment in crypto.c
svn:r351
2003-06-24 21:34:19 +00:00
Roger Dingledine
d8af672bb6 correct log()'s comment
svn:r350
2003-06-24 05:18:12 +00:00
Nick Mathewson
03544caca7 Make cvsignores reflect build process
svn:r341
2003-06-21 19:09:09 +00:00
Nick Mathewson
efbcd71b9b Remove false warnings from printf checks
svn:r340
2003-06-21 19:03:22 +00:00
Roger Dingledine
968d31162b fix typos, streamline
svn:r337
2003-06-18 07:44:48 +00:00
Roger Dingledine
8d4cd5d604 remove obsolete ss.h
svn:r336
2003-06-18 07:42:13 +00:00
Nick Mathewson
95e5384af3 Change many files to new log_fn format
svn:r333
2003-06-17 22:18:26 +00:00
Nick Mathewson
6965a4696c Have GCC catch errors in format strings
svn:r332
2003-06-17 22:14:44 +00:00
Nick Mathewson
5fd033a8e8 Come up with a less macro-happy, even more portable log_fn implementation
svn:r331
2003-06-17 21:36:44 +00:00
Nick Mathewson
b9480620c6 Make log_fn work on apples with no workarounds needed in main code
svn:r330
2003-06-17 21:15:25 +00:00
Nick Mathewson
769c78a395 Use fread instead of fgets for binary data
svn:r328
2003-06-17 20:19:41 +00:00
Nick Mathewson
9182537238 Fix the periodic bug that would make handshaking fail.
The culprit: sometimes DH_calculate_key returns less than DH_KEY_LEN bytes;
we needed to check the return value.


svn:r322
2003-06-14 01:30:53 +00:00
Nick Mathewson
71b158bf2f Fix MacOS build
svn:r320
2003-06-14 01:28:25 +00:00
Nick Mathewson
d21c0feb5a Add RNG seeding
svn:r318
2003-06-13 21:13:37 +00:00
Roger Dingledine
e75dc941a7 don't complain as much when using openssl 0.9.7a
svn:r308
2003-06-10 20:50:56 +00:00
Roger Dingledine
59029a3eed replace malloc with tor_malloc; remove broken/unused crypto_pk_set_key
svn:r292
2003-05-20 06:37:34 +00:00
Nick Mathewson
c94d42fa41 Fail less spectacularly on macos
svn:r291
2003-05-09 11:46:39 +00:00
Nick Mathewson
fb435daa28 Fix build on linux; macos is still messed up
svn:r290
2003-05-09 03:37:18 +00:00
Nick Mathewson
48b0c839b5 One is the language; the other is the compiler
svn:r289
2003-05-09 02:41:27 +00:00
Nick Mathewson
0957ffeb83 work on versioning; new log_fn function
svn:r288
2003-05-09 02:25:37 +00:00
Roger Dingledine
6973ccb59b still removing version.h
svn:r286
2003-05-09 02:14:01 +00:00
Roger Dingledine
bf8ef8e597 obsolete, removed
svn:r284
2003-05-09 02:12:33 +00:00
Nick Mathewson
afc0eb2c71 Tested backends for directory signing and checking. Directory parser completely refactored. Need documentation and integration. Explanitory mail forthcoming.
svn:r271
2003-05-07 18:30:46 +00:00
Nick Mathewson
445cd8f0f1 Decrease DH group length to 1024. (Roger, you may want to read section 1 of the IETF draft: a 1024-bit DH key probably reduces our cipher strength to ~80 bits.)
svn:r269
2003-05-07 02:28:42 +00:00
Nick Mathewson
d0ff485e1b More work on directories. Signed directories not yet tested. No support for checking sigs yet
svn:r268
2003-05-07 02:13:23 +00:00
Nick Mathewson
fcf7bfe290 Refactor directories; add unit tests; add router keyword
svn:r266
2003-05-06 17:38:16 +00:00
Nick Mathewson
6af79f3a03 Basic diffie-helman wrappers with fixed modulus and tests
svn:r257
2003-05-01 00:53:46 +00:00
Nick Mathewson
32a3e704b4 Choose correct abstraction for topic_foo. Abstract random-integer code
svn:r249
2003-04-17 17:10:41 +00:00
Nick Mathewson
598c3069e1 Apply algebra; remove a condition
svn:r246
2003-04-17 02:03:55 +00:00
Nick Mathewson
2da6482f63 tv_udiff: do not modify arguments, and compute results correctly.
svn:r245
2003-04-17 01:59:41 +00:00
Nick Mathewson
d3c0e5ab34 Fix test.h to have once-only evalutation of arguments
svn:r243
2003-04-17 01:55:13 +00:00
Roger Dingledine
fe1aba7f15 more cleanup
svn:r242
2003-04-16 23:22:05 +00:00
Nick Mathewson
33176c70a5 Factor out timeval-related functions.
svn:r237
2003-04-16 17:04:58 +00:00
Nick Mathewson
acc33c18e2 Tests for crypto; more tests for buffers
svn:r234
2003-04-16 15:24:09 +00:00
Nick Mathewson
1fa0fc1487 Introduce a few unit tests (from older code), refactor compression setup/teardown
svn:r232
2003-04-15 19:10:18 +00:00
Roger Dingledine
c2fa6f5c7d let the 'test' binary build from the source distrib
svn:r228
2003-04-08 22:09:18 +00:00
Nick Mathewson
79b77b421d First test added
svn:r226
2003-04-07 13:25:44 +00:00
Nick Mathewson
3a89d27e66 Correct defeatest attitude in crypto_new_cipher_env
svn:r201
2003-03-19 21:27:21 +00:00
Nick Mathewson
2b2eff33c5 Add a missing long cast to log.c for portability
svn:r199
2003-03-19 20:54:39 +00:00
Nick Mathewson
8ff1c3e21f Refactor block ciphers; add 3des
svn:r196
2003-03-19 20:41:15 +00:00
Roger Dingledine
147879ab17 removing more unused files
svn:r141
2002-11-25 01:22:34 +00:00
Roger Dingledine
f50f35f2ec added milliseconds to log lines
svn:r139
2002-11-24 08:45:13 +00:00
Roger Dingledine
00a9e3732e remove popt dependency, consolidate config stuff
reformat parts of onion.c


svn:r136
2002-11-23 06:49:01 +00:00
Nick Mathewson
bef3424bec Add convenience functions to wrap create and init for symmetric ciphers; clean up error handling in onion.c
svn:r131
2002-10-02 20:39:51 +00:00
Roger Dingledine
2fa4b5bb53 don't leak memory on pk ops
svn:r117
2002-09-27 22:13:22 +00:00
Roger Dingledine
253f0f160e laying the groundwork for dynamic router lists
revamped the router reading section

reference counting for crypto pk env's (so we can dup them)

we now read and write pem pk keys from string rather than from FILE*,
  in anticipation of fetching directories over a socket
  (so now on startup we slurp in the whole file, then parse it as a string)

fixed a bug in the proxy side, where you could get some circuits
  wedged if they showed up while the connection was being made


svn:r110
2002-09-24 10:43:57 +00:00
Roger Dingledine
5449fc86db synchronize to the version i've been giving people to test
svn:r104
2002-09-19 20:13:27 +00:00
Roger Dingledine
f9f3e2f120 slight optimization on rsa exponent
use 2**16+1 rather than 2**16 + 2**(-1)


svn:r99
2002-09-05 19:04:47 +00:00
Roger Dingledine
4eb0158f42 the logs now include a timestamp and severity
the implementation is sort of a kludge..you're welcome to fix it up


svn:r94
2002-09-04 00:39:33 +00:00
Nick Mathewson
4c761e4537 Backport to OpenSSL version 0.9.5
svn:r91
2002-09-03 19:16:02 +00:00
Nick Mathewson
fdb31225b7 Port to MacOS X
svn:r88
2002-09-03 18:44:24 +00:00
Nick Mathewson
8878d8cc27 Add function to fake a poll call using select
svn:r87
2002-09-03 18:43:50 +00:00
Matej Pjafjar
01aadefbfc Changed crypto calls to go through common/crypto.[hc] instead of calling OpenSSL directly.
svn:r76
2002-08-22 07:30:03 +00:00
Matej Pjafjar
e01522bbed Added the crypto abstraction to libor. Need to test and change the code to use this instead of OpenSSL.
svn:r74
2002-07-25 08:17:22 +00:00
Matej Pjafjar
5af5a96343 Beginnings of a crypto abstraction layer.
svn:r73
2002-07-24 14:02:39 +00:00
Roger Dingledine
61d10b309f Folded cell.? into src/or
Removed more obsolete files


svn:r61
2002-07-19 18:47:04 +00:00
Roger Dingledine
0a8d58138d changes to support sendme cells
svn:r55
2002-07-18 06:38:32 +00:00
Bruce Montrose
4aeca322b4 bug-fix. poptReadDefaultOptions() should find and load ~/.<cmd>rc files now.
svn:r48
2002-07-15 19:05:12 +00:00
Bruce Montrose
be25ffd5d7 removed loglevel from global namespace. severity level is set using log() with a NULL format argument now. example: log(LOG_ERR,NULL);
svn:r44
2002-07-12 18:14:17 +00:00
Matej Pjafjar
ce934e4974 Bugfix - the list of valid characters in a filename didn't include an n .
svn:r33
2002-07-10 10:11:13 +00:00
Bruce Montrose
62ead018a1 Miscellaneous bug fixes / activated "make check" for src/or
svn:r31
2002-07-09 19:51:41 +00:00
Bruce Montrose
a3609f4d5d Added getoptions() and made minor adjustment to poptReadDefaultOptions()
svn:r25
2002-07-03 16:31:22 +00:00
Roger Dingledine
b34fad4d38 removed onion.c and onion.h from common/
they're now in or/onion.c


svn:r21
2002-07-02 09:17:21 +00:00
Roger Dingledine
bd627daa40 First cut at cleaning out a lot of the extra stuff.
The summary here is that I'm requiring all developers to have
auto* (aclocal, autoconf, automake) installed on their machine.

Since different versions of auto* generate vastly different output,
I'm going to leave its output out of the repository. This means that
whenever you check out a repository, you need to run auto* to generate
a configure file, then run ./configure to get a Makefile, then build.

If you don't have auto* and can't get it, let me know (and I'll try to
convince you to develop on moria).

The benefit here is that while developers have a bit more work to keep
things straight, we can build snapshots that will install just about
anywhere (once we make configure.in work, that is ;)


svn:r12
2002-06-29 00:54:00 +00:00
Felipe Bergo
3840dbcaaf moved configure.ac to configure.in, should work with older autoconfs and automakes
svn:r11
2002-06-28 23:43:00 +00:00
Felipe Bergo
f09e25e9f5 added automake/autoconf support. When in doubt, "aclocal && autoconf && autoheader && automake" from the top dir.
svn:r10
2002-06-28 23:26:42 +00:00
Bruce Montrose
a551f0a6a8 Added poptReadOptions() and poptReadDefaultOptions()
svn:r8
2002-06-28 18:14:55 +00:00
Roger Dingledine
9a928eeb12 Initial revision
svn:r2
2002-06-26 22:45:49 +00:00