Andrea Shepard
684bcd886a
Add scheduler channel states unit test
2014-09-30 23:14:58 -07:00
Andrea Shepard
314c2f18ae
Add scheduler/compare_channels unit test
2014-09-30 23:14:58 -07:00
Andrea Shepard
030608d68d
Add scheduler/queue_heuristic unit test
2014-09-30 23:14:58 -07:00
Andrea Shepard
0af88f9096
Initial test_scheduler.c
2014-09-30 23:14:56 -07:00
Andrea Shepard
5e9a88e001
Add channel_tls_num_cells_writeable_method() coverage to channeltls/num_bytes_queued unit test
2014-09-30 23:14:25 -07:00
Andrea Shepard
030b0fe107
Add channeltls/num_bytes_queued unit test
2014-09-30 23:14:25 -07:00
Andrea Shepard
8719f8ff09
Implement tlschan create and overhead estimate unit tests
2014-09-30 23:14:25 -07:00
Andrea Shepard
50d5fb87bd
Initial test_channeltls.c
2014-09-30 23:14:24 -07:00
Andrea Shepard
462eaed43e
Limited unit test for channel_dump_statistics()
2014-09-30 23:14:24 -07:00
Andrea Shepard
5ee25cc185
Add channel/dumpstats unit test
2014-09-30 23:14:24 -07:00
Andrea Shepard
9740a07b8c
Check queueing case in channel/flushmux unit test too
2014-09-30 23:14:23 -07:00
Andrea Shepard
f12f7159a5
Add channel/flushmux unit test
2014-09-30 23:14:22 -07:00
Andrea Shepard
76fcb8cb55
Add channel/incoming unit test
2014-09-30 23:14:02 -07:00
Andrea Shepard
b5d4ef18e1
Add unknown cell queue entry type case to channel/queue_impossible unit test
2014-09-30 23:14:02 -07:00
Andrea Shepard
f7951d318a
Small channel unit test improvements
2014-09-30 23:14:01 -07:00
Andrea Shepard
3b78667d65
Unit test for unusual channel lifecycles
2014-09-30 23:14:01 -07:00
Andrea Shepard
b6d0aaec07
Check some can't-happen cases draining channel cell queues
2014-09-30 23:13:58 -07:00
Andrea Shepard
5992a69dee
Add append_cell_to_circuit_queue() unit test
2014-09-30 23:09:15 -07:00
Andrea Shepard
46ff91b6ec
Add scheduler_channel_has_waiting_cells_mock() and some mock counter queries
2014-09-30 23:09:15 -07:00
Andrea Shepard
bef11b7156
Expose a useful mock from test_channel.c
2014-09-30 23:09:14 -07:00
Andrea Shepard
79b8f14c25
Expose fake channel utility functions in test suite in fakechans.h, and fix a test_channel.c bug
2014-09-30 23:09:14 -07:00
Andrea Shepard
ba294ff2dc
Implement channel flush unit test
2014-09-30 23:09:00 -07:00
Andrea Shepard
37baef0687
Add channel lifecycle test
2014-09-30 23:08:16 -07:00
Andrea Shepard
e00fde1797
Implement two-channel queue estimate test
2014-09-30 22:54:09 -07:00
Andrea Shepard
6e427c30af
Implement channel queue size estimate unit test
2014-09-30 22:54:09 -07:00
Andrea Shepard
6d886787e3
Unit tests for channel_get_cell_queue_entry_size() and channel_write_*() functions
2014-09-30 22:54:02 -07:00
Andrea Shepard
283646fd90
Fix scheduler assertion in circuitmux/destroy_cell_queue unit test
2014-09-30 22:49:36 -07:00
Nick Mathewson
fa80983e52
fixup! Unit tests for router download functions.
...
(Add missing test_routerlist.c that I forgot to add from arlo's branch
last time. Oops.)
2014-09-29 09:59:59 -04:00
Nick Mathewson
15b0bf0aad
Whitespace fixes on 13291 fix
2014-09-29 09:39:21 -04:00
Nick Mathewson
0a985af072
Parenthesize macro arguments for 13291 fix
2014-09-29 09:38:50 -04:00
teor
b827a08284
Stop spawn test failures due to a race condition with SIGCHLD on process exit
...
When a spawned process forks, fails, then exits very quickly, (this
typically occurs when exec fails), there is a race condition between the
SIGCHLD handler updating the process_handle's fields, and checking the
process status in those fields. The update can occur before or after the
spawn tests check the process status.
We check whether the process is running or not running (rather than just
checking if it is running) to avoid this issue.
2014-09-29 09:37:53 -04:00
Nick Mathewson
11ebbf5e88
Merge branch 'bug12971_take2_squashed'
2014-09-29 09:18:03 -04:00
rl1987
c5ad890904
Respond with 'Command not supported' SOCKS5 reply message upon reception of unsupported request.
2014-09-29 09:14:42 -04:00
Nick Mathewson
5e8cc766e6
Merge branch 'ticket961_squashed'
2014-09-29 09:05:18 -04:00
Nick Mathewson
4903ab1caa
Avoid frequent strcmp() calls for AccountingRule
...
Generally, we don't like to parse the same thing over and over; it's
best IMO to do it once at the start of the code.
2014-09-29 09:05:11 -04:00
Nick Mathewson
8527a29966
Add an "AccountingRule" feature to permit limiting bw usage by read+write
...
Patch from "chobe". Closes ticket 961.
2014-09-29 09:05:11 -04:00
Nick Mathewson
b45bfba2ce
Whitespace fixes
2014-09-29 08:48:22 -04:00
teor
ffd92e8ef8
Stop test & bench build failures with --disable-curve25519
...
Ensure test & bench code that references curve25519 is disabled by the
appropriate macros. tor now builds with and without --disable-curve25519.
2014-09-29 12:19:04 +10:00
Nick Mathewson
1c5d680b3d
Merge branch 'ed25519_ref10_squashed'
...
Conflicts:
src/common/include.am
src/ext/README
2014-09-25 15:11:34 -04:00
Nick Mathewson
6dbd451b9f
Add benchmarks for ed25519 functions
2014-09-25 15:08:32 -04:00
Nick Mathewson
9b43a4a122
Add comments to ed25519_vectors.inc
2014-09-25 15:08:32 -04:00
Nick Mathewson
6981341764
Cut the time to run the python ed25519 tests by a factor of ~6
...
I know it's pointless to optimize them, but I just can't let them
spend all that time in expmod() when native python pow() does the same
thing.
2014-09-25 15:08:32 -04:00
Nick Mathewson
7ca470e13c
Add a reference implementation of our ed25519 modifications
...
Also, use it to generate test vectors, and add those test vectors
to test_crypto.c
This is based on ed25519.py from the ed25519 webpage; the kludgy hacks
are my own.
2014-09-25 15:08:32 -04:00
Nick Mathewson
d10e1bdec4
Add the pure-python ed25519 implementation, for testing.
2014-09-25 15:08:31 -04:00
Nick Mathewson
25b1a32ef8
Draft implementation for ed25519 key blinding, as in prop224
...
This implementation allows somebody to add a blinding factor to a
secret key, and a corresponding blinding factor to the public key.
Robert Ransom came up with this idea, I believe. Nick Hopper proved a
scheme like this secure. The bugs are my own.
2014-09-25 15:08:31 -04:00
Nick Mathewson
4caa6fad4c
Add curve25519->ed25519 key conversion per proposal 228
...
For proposal 228, we need to cross-certify our identity with our
curve25519 key, so that we can prove at descriptor-generation time
that we own that key. But how can we sign something with a key that
is only for doing Diffie-Hellman? By converting it to the
corresponding ed25519 point.
See the ALL-CAPS warning in the documentation. According to djb
(IIUC), it is safe to use these keys in the ways that ntor and prop228
are using them, but it might not be safe if we start providing crazy
oracle access.
(Unit tests included. What kind of a monster do you take me for?)
2014-09-25 15:08:31 -04:00
Nick Mathewson
c75e275574
Add encode/decode functions for ed25519 public keys
2014-09-25 15:08:31 -04:00
Nick Mathewson
006e6d3b6f
Another ed25519 tweak: store secret keys in expanded format
...
This will be needed/helpful for the key blinding of prop224, I
believe.
2014-09-25 15:08:31 -04:00
Nick Mathewson
87ba033cd5
Add Ed25519 support, wrappers, and tests.
...
Taken from earlier ed25519 branch based on floodyberry's
ed25519-donna. Tweaked so that it applies to ref10 instead.
2014-09-25 15:08:20 -04:00
Nick Mathewson
764e008092
Merge branch 'libscrypt_trunnel_squashed'
...
Conflicts:
src/test/test_crypto.c
2014-09-25 12:03:41 -04:00