]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
8 years agoAdd test for expected output from encode{,d}_length functions
Nick Mathewson [Fri, 7 Apr 2017 13:47:29 +0000 (09:47 -0400)] 
Add test for expected output from encode{,d}_length functions

8 years agochanges file for 21873
Nick Mathewson [Thu, 6 Apr 2017 15:57:56 +0000 (11:57 -0400)] 
changes file for 21873

8 years agoMerge remote-tracking branch 'arthuredelstein/21873'
Nick Mathewson [Thu, 6 Apr 2017 15:57:14 +0000 (11:57 -0400)] 
Merge remote-tracking branch 'arthuredelstein/21873'

8 years agoMerge branch 'storage_labeled_squashed'
Nick Mathewson [Thu, 6 Apr 2017 15:49:00 +0000 (11:49 -0400)] 
Merge branch 'storage_labeled_squashed'

8 years agoExplain config_line_find() behavior on duplicates.
Nick Mathewson [Thu, 6 Apr 2017 12:53:26 +0000 (08:53 -0400)] 
Explain config_line_find() behavior on duplicates.

8 years agoAdd an assertion to config_line_append().
Nick Mathewson [Thu, 6 Apr 2017 12:50:22 +0000 (08:50 -0400)] 
Add an assertion to config_line_append().

8 years agoAdditional unit tests to improve conscache coverage
Nick Mathewson [Wed, 5 Apr 2017 13:32:25 +0000 (09:32 -0400)] 
Additional unit tests to improve conscache coverage

8 years agoTests for cleanup and reference counting on conscache
Nick Mathewson [Wed, 5 Apr 2017 12:37:33 +0000 (08:37 -0400)] 
Tests for cleanup and reference counting on conscache

8 years agoTests for simple cases of conscache code.
Nick Mathewson [Tue, 4 Apr 2017 17:51:34 +0000 (13:51 -0400)] 
Tests for simple cases of conscache code.

8 years agoAdd a 'consensus cache' type on top of storagedir.
Nick Mathewson [Tue, 4 Apr 2017 13:35:39 +0000 (09:35 -0400)] 
Add a 'consensus cache' type on top of storagedir.

Every file in the cache is labeled.  The labels are held in memory;
the bodies are mapped on demand.

8 years agoUnit tests for labelled storagedir entries
Nick Mathewson [Mon, 3 Apr 2017 19:58:35 +0000 (15:58 -0400)] 
Unit tests for labelled storagedir entries

8 years agoAdd some "labeled storagedir" abstractions.
Nick Mathewson [Wed, 29 Mar 2017 10:55:09 +0000 (12:55 +0200)] 
Add some "labeled storagedir" abstractions.

These add a tiny bit of structure on top of the regular storagedir
abstractions in order to store key-value lists at the head of each
document.

8 years agoMerge branch 'maint-0.3.0'
Nick Mathewson [Thu, 6 Apr 2017 12:32:12 +0000 (08:32 -0400)] 
Merge branch 'maint-0.3.0'

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Thu, 6 Apr 2017 12:32:04 +0000 (08:32 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.2.8' into maint-0.2.9
Nick Mathewson [Thu, 6 Apr 2017 12:31:54 +0000 (08:31 -0400)] 
Merge branch 'maint-0.2.8' into maint-0.2.9

8 years agoMerge branch 'maint-0.2.7-redux' into maint-0.2.8
Nick Mathewson [Thu, 6 Apr 2017 12:31:32 +0000 (08:31 -0400)] 
Merge branch 'maint-0.2.7-redux' into maint-0.2.8

8 years agoMerge branch 'maint-0.2.6' into maint-0.2.7-redux
Nick Mathewson [Thu, 6 Apr 2017 12:31:23 +0000 (08:31 -0400)] 
Merge branch 'maint-0.2.6' into maint-0.2.7-redux

8 years agoMerge branch 'maint-0.2.5' into maint-0.2.6
Nick Mathewson [Thu, 6 Apr 2017 12:31:18 +0000 (08:31 -0400)] 
Merge branch 'maint-0.2.5' into maint-0.2.6

8 years agoMerge branch 'maint-0.2.4' into maint-0.2.5
Nick Mathewson [Thu, 6 Apr 2017 12:31:12 +0000 (08:31 -0400)] 
Merge branch 'maint-0.2.4' into maint-0.2.5

8 years agoUpdate geoip and geoip6 to the April 4 2017 database.
Karsten Loesing [Thu, 6 Apr 2017 08:52:39 +0000 (10:52 +0200)] 
Update geoip and geoip6 to the April 4 2017 database.

8 years agoBug 21873: Clarify KeepAliveIsolateSOCKSAuth behavior
Arthur Edelstein [Thu, 6 Apr 2017 00:19:25 +0000 (17:19 -0700)] 
Bug 21873: Clarify KeepAliveIsolateSOCKSAuth behavior

8 years agoMerge branch 'maint-0.3.0'
Nick Mathewson [Wed, 5 Apr 2017 14:04:42 +0000 (10:04 -0400)] 
Merge branch 'maint-0.3.0'

"ours" merge to avoid the version bump.

8 years agoforward-port the 0.3.0.5-rc changelog
Nick Mathewson [Wed, 5 Apr 2017 14:04:38 +0000 (10:04 -0400)] 
forward-port the 0.3.0.5-rc changelog

8 years agobump to 0.3.0.5-rc-dev
Nick Mathewson [Wed, 5 Apr 2017 14:03:09 +0000 (10:03 -0400)] 
bump to 0.3.0.5-rc-dev

8 years agoMove config line parsing function to confline.c
Nick Mathewson [Fri, 31 Mar 2017 14:27:40 +0000 (10:27 -0400)] 
Move config line parsing function to confline.c

8 years agoMove config_line_t functions from confparse.c into common.
Nick Mathewson [Fri, 31 Mar 2017 14:24:38 +0000 (10:24 -0400)] 
Move config_line_t functions from confparse.c into common.

I'm doing this to storagedir to used config_line_t.

8 years agoMerge branch 'maint-0.3.0'
Nick Mathewson [Tue, 4 Apr 2017 13:43:23 +0000 (09:43 -0400)] 
Merge branch 'maint-0.3.0'

8 years agohs: Expose hs_service.c functions for unit tests
David Goulet [Tue, 4 Apr 2017 12:35:31 +0000 (08:35 -0400)] 
hs: Expose hs_service.c functions for unit tests

In order to avoid src/or/hs_service.o to contain no symbols and thus making
clang throw a warning, the functions are now exposed not just to unit tests.

Signed-off-by: David Goulet <dgoulet@torproject.org>
8 years agoCapture expected log in test_circuitbuild.c
Taylor Yu [Mon, 3 Apr 2017 19:00:33 +0000 (15:00 -0400)] 
Capture expected log in test_circuitbuild.c

Capture the warning for the unhandled circuit purpose test case, both
to clean up the test log and to confirm that it gets logged.

8 years agoMerge branch 'bug13790_rebased'
Nick Mathewson [Mon, 3 Apr 2017 15:58:37 +0000 (11:58 -0400)] 
Merge branch 'bug13790_rebased'

8 years agoTest unhandled purpose in route_len_for_purpose()
Taylor Yu [Tue, 28 Mar 2017 21:35:25 +0000 (17:35 -0400)] 
Test unhandled purpose in route_len_for_purpose()

Check that route_len_for_purpose() (helper for new_route_len())
correctly fails a non-fatal bug assertion if it encounters an
unhandled circuit purpose when it is called with exit node info.

8 years agoRefactor and comment new_route_len()
Taylor Yu [Tue, 28 Mar 2017 21:35:11 +0000 (17:35 -0400)] 
Refactor and comment new_route_len()

Add a new helper function route_len_for_purpose(), which explicitly
lists all of the known circuit purposes for a circuit with a chosen
exit node (unlike previously, where the default route length for a
chosen exit was DEFAULT_ROUTE_LEN + 1 except for two purposes).  Add a
non-fatal assertion for unhandled purposes that conservatively returns
DEFAULT_ROUTE_LEN + 1.

Add copious comments documenting which circuits need an extra hop and
why.

Thanks to nickm and dgoulet for providing background information.

8 years agoAdd tests for new_route_len()
Taylor Yu [Tue, 28 Mar 2017 21:34:54 +0000 (17:34 -0400)] 
Add tests for new_route_len()

8 years agoAdd a release checklist step to highlight changes
Sebastian Hahn [Sun, 26 Mar 2017 00:09:37 +0000 (01:09 +0100)] 
Add a release checklist step to highlight changes

In an effort to better communicate with our users that they might need
to take certain actions when upgrading, we should extract from the
changelog the items that require some action (example: the new version
automatically generates keys, if you want them to be offline - make sure
to create them before upgrading).

8 years agoMerge branch 'maint-0.3.0'
Nick Mathewson [Mon, 3 Apr 2017 13:38:27 +0000 (09:38 -0400)] 
Merge branch 'maint-0.3.0'

("Ours" merge to avoid version bump.)

8 years agoversion bump
Nick Mathewson [Mon, 3 Apr 2017 13:36:42 +0000 (09:36 -0400)] 
version bump

8 years agoMerge branch 'maint-0.3.0'
Nick Mathewson [Mon, 3 Apr 2017 13:29:18 +0000 (09:29 -0400)] 
Merge branch 'maint-0.3.0'

8 years agoMerge remote-tracking branch 'teor/bug21596_030' into maint-0.3.0
Nick Mathewson [Mon, 3 Apr 2017 13:28:33 +0000 (09:28 -0400)] 
Merge remote-tracking branch 'teor/bug21596_030' into maint-0.3.0

8 years agoMerge remote-tracking branch 'public/bug21415_testfix_030' into maint-0.3.0
Nick Mathewson [Mon, 3 Apr 2017 13:27:40 +0000 (09:27 -0400)] 
Merge remote-tracking branch 'public/bug21415_testfix_030' into maint-0.3.0

8 years agoFix utimbuf initialization in storagedir/cleaning test
Nick Mathewson [Wed, 29 Mar 2017 07:10:35 +0000 (09:10 +0200)] 
Fix utimbuf initialization in storagedir/cleaning test

8 years agoFix another 32-bit warning in the spooling code
Nick Mathewson [Wed, 29 Mar 2017 07:07:51 +0000 (09:07 +0200)] 
Fix another 32-bit warning in the spooling code

8 years agoFix i386 compilation from spooling patch. I seem to be good at breaking that.
Nick Mathewson [Tue, 28 Mar 2017 19:41:59 +0000 (21:41 +0200)] 
Fix i386 compilation from spooling patch. I seem to be good at breaking that.

8 years agoMerge branch 'spooling_squashed'
Nick Mathewson [Tue, 28 Mar 2017 17:55:18 +0000 (19:55 +0200)] 
Merge branch 'spooling_squashed'

8 years agoAdd nonfatal asserts for return val of dirserv_flushed_some
Nick Mathewson [Fri, 17 Mar 2017 15:34:41 +0000 (11:34 -0400)] 
Add nonfatal asserts for return val of dirserv_flushed_some

8 years agoImprove documentation for connection_dirserv_flushed_some.
Nick Mathewson [Fri, 17 Mar 2017 15:31:21 +0000 (11:31 -0400)] 
Improve documentation for connection_dirserv_flushed_some.

8 years agoRefactor the directory spool implementation
Nick Mathewson [Mon, 13 Mar 2017 19:38:20 +0000 (15:38 -0400)] 
Refactor the directory spool implementation

The old implementation had duplicated code in a bunch of places, and
it interspersed spool-management with resource management.  The new
implementation should make it easier to add new resource types and
maintain the spooling code.

Closing ticket 21651.

8 years agoMerge remote-tracking branch 'origin/maint-0.3.0'
Nick Mathewson [Mon, 27 Mar 2017 13:44:31 +0000 (15:44 +0200)] 
Merge remote-tracking branch 'origin/maint-0.3.0'

8 years agoFix max sampled size logic when in bridge mode.
George Kadianakis [Mon, 27 Mar 2017 13:08:18 +0000 (15:08 +0200)] 
Fix max sampled size logic when in bridge mode.

When calculating max sampled size, Tor would only count the number of
bridges in torrc, without considering that our state file might already
have sampled bridges in it. This caused problems when people swap
bridges, since the following error would trigger:

         [warn] Not expanding the guard sample any further; just hit the
                maximum sample threshold of 1

8 years agoStoragedir test fix: save strings in binary mode to preserve length
Nick Mathewson [Mon, 27 Mar 2017 13:27:52 +0000 (15:27 +0200)] 
Storagedir test fix: save strings in binary mode to preserve length

8 years agoMerge remote-tracking branch 'ahf/bugs/21757'
Nick Mathewson [Mon, 27 Mar 2017 13:02:48 +0000 (15:02 +0200)] 
Merge remote-tracking branch 'ahf/bugs/21757'

8 years agochanges file for 21788
Nick Mathewson [Mon, 27 Mar 2017 09:01:50 +0000 (11:01 +0200)] 
changes file for 21788

8 years agoMerge remote-tracking branch 'jigsaw52/fix_leak_21788'
Nick Mathewson [Mon, 27 Mar 2017 09:01:01 +0000 (11:01 +0200)] 
Merge remote-tracking branch 'jigsaw52/fix_leak_21788'

8 years agoCheck and cast st_size to size_t in storagedir code
Nick Mathewson [Mon, 27 Mar 2017 08:40:15 +0000 (10:40 +0200)] 
Check and cast st_size to size_t in storagedir code

This prevents an i386 compilation warning and fixes bug 21828. Bug not
in any released Tor.

8 years agoMerge remote-tracking branch 'origin/maint-0.3.0'
Nick Mathewson [Sun, 26 Mar 2017 10:30:45 +0000 (12:30 +0200)] 
Merge remote-tracking branch 'origin/maint-0.3.0'

8 years agoTweak test_entrynodes comment
Nick Mathewson [Sun, 26 Mar 2017 10:30:00 +0000 (12:30 +0200)] 
Tweak test_entrynodes comment

8 years agoMerge branch 'ticket21799' into maint-0.3.0
Nick Mathewson [Sun, 26 Mar 2017 10:28:58 +0000 (12:28 +0200)] 
Merge branch 'ticket21799' into maint-0.3.0

8 years agoAdd calltool cache files to gitignore
Nick Mathewson [Sun, 26 Mar 2017 10:28:00 +0000 (12:28 +0200)] 
Add calltool cache files to gitignore

8 years agoUse update_approx_time() to run a test 100 days in the past.
Nick Mathewson [Thu, 23 Mar 2017 09:44:43 +0000 (10:44 +0100)] 
Use update_approx_time() to run a test 100 days in the past.

Fixes bug21799.

8 years agoFix very small memory leak #21788
Daniel Pinto [Mon, 20 Mar 2017 01:03:05 +0000 (01:03 +0000)] 
Fix very small memory leak #21788

Leak caused by clean_up_backtrace_handler not being called
on shutdown.

8 years ago21151: document datadir default decently.
Nick Mathewson [Fri, 17 Mar 2017 16:10:43 +0000 (12:10 -0400)] 
21151: document datadir default decently.

8 years agoMerge branch 'ahf_bugs_21641_squashed'
Nick Mathewson [Fri, 17 Mar 2017 15:16:24 +0000 (11:16 -0400)] 
Merge branch 'ahf_bugs_21641_squashed'

8 years agoCheck onion key consensus parameters every hour.
Alexander Færøy [Fri, 17 Mar 2017 04:27:31 +0000 (05:27 +0100)] 
Check onion key consensus parameters every hour.

This patch changes the way we decide when to check for whether it's time
to rotate and/or expiry our onion keys. Due to proposal #274 we can now
have the keys rotate at different frequencies than before and we thus
do the check once an hour when our Tor daemon is running in server mode.

This should allow us to quickly notice if the network consensus
parameter have changed while we are running instead of having to wait
until the current parameters timeout value have passed.

See: See: https://bugs.torproject.org/21641

8 years agoAdd periodic timer for expiring old onion keys.
Alexander Færøy [Fri, 10 Mar 2017 12:00:20 +0000 (13:00 +0100)] 
Add periodic timer for expiring old onion keys.

This patch adds a new timer that is executed when it is time to expire
our current set of old onion keys. Because of proposal #274 this can no
longer be assumed to be at the same time we rotate our onion keys since
they will be updated less frequently.

See: https://bugs.torproject.org/21641

8 years agoAdd API to query the current onion key grace period.
Alexander Færøy [Fri, 10 Mar 2017 11:56:36 +0000 (12:56 +0100)] 
Add API to query the current onion key grace period.

This patch adds an API to get the current grace period, in days, defined
as the consensus parameter "onion-key-grace-period-days".

As per proposal #274 the values for "onion-key-grace-period-days" is a
default value of 7 days, a minimum value of 1 day, and a maximum value
defined by other consensus parameter "onion-key-rotation-days" also
defined in days.

See: https://bugs.torproject.org/21641

8 years agoMake MIN_ONION_KEY_LIFETIME a consensus parameter defined value.
Alexander Færøy [Fri, 10 Mar 2017 11:18:52 +0000 (12:18 +0100)] 
Make MIN_ONION_KEY_LIFETIME a consensus parameter defined value.

This patch turns `MIN_ONION_KEY_LIFETIME` into a new function
`get_onion_key_lifetime()` which gets its value from a network consensus
parameter named "onion-key-rotation-days". This allows us to tune the
value at a later point in time with no code modifications.

We also bump the default onion key lifetime from 7 to 28 days as per
proposal #274.

See: https://bugs.torproject.org/21641

8 years agoSplit strings at newline in tor_get_lines_from_handle().
Alexander Færøy [Fri, 17 Mar 2017 03:18:31 +0000 (04:18 +0100)] 
Split strings at newline in tor_get_lines_from_handle().

This patch fixes a regression described in bug #21757 that first
appeared after commit 6e78ede73f which was an attempt to fix bug #21654.

When switching from buffered I/O to direct file descriptor I/O our
output strings from get_string_from_pipe() might contain newline
characters (\n). In this patch we modify tor_get_lines_from_handle() to
ensure that the function splits the newly read string at the newline
character and thus might return multiple lines from a single call to
get_string_from_pipe().

Additionally, we add a test case to test_util_string_from_pipe() to
ensure that get_string_from_pipe() correctly returns multiple lines in a
single call.

See: https://bugs.torproject.org/21757
See: https://bugs.torproject.org/21654

8 years agoGenerate src/test/fuzz/include.am from a script
Nick Mathewson [Thu, 16 Mar 2017 21:14:10 +0000 (17:14 -0400)] 
Generate src/test/fuzz/include.am from a script

It was very error-prone to maintain this by hand.

8 years agoMerge branch 'storagedir_squashed'
Nick Mathewson [Thu, 16 Mar 2017 20:03:13 +0000 (16:03 -0400)] 
Merge branch 'storagedir_squashed'

8 years agoDefine a "storagedir" abstraction to hold numerous similar files
Nick Mathewson [Fri, 10 Mar 2017 18:22:01 +0000 (13:22 -0500)] 
Define a "storagedir" abstraction to hold numerous similar files

We could use one of these for holding "junk" descriptors and
unparseable things -- but we'll _need_ it for having cached
consensuses and diffs between them.

8 years agoNow, resolve a new 64-bit warning in compat_threads.c
Nick Mathewson [Thu, 16 Mar 2017 19:34:57 +0000 (15:34 -0400)] 
Now, resolve a new 64-bit warning in compat_threads.c

8 years agoconsdiff: Fix 32-bit compilation.
Nick Mathewson [Thu, 16 Mar 2017 19:14:16 +0000 (15:14 -0400)] 
consdiff: Fix 32-bit compilation.

Thanks, jenkins!

8 years agochanges file for consdiff backend
Nick Mathewson [Thu, 16 Mar 2017 19:01:00 +0000 (15:01 -0400)] 
changes file for consdiff backend

8 years agoMerge branch 'prop140_21643_diff_only_squashed'
Nick Mathewson [Thu, 16 Mar 2017 18:58:43 +0000 (14:58 -0400)] 
Merge branch 'prop140_21643_diff_only_squashed'

8 years agoSwitch ed-command parsing to use tor_parse_long.
Nick Mathewson [Thu, 16 Mar 2017 15:21:52 +0000 (11:21 -0400)] 
Switch ed-command parsing to use tor_parse_long.

8 years agoConsdiff: extract router ID hash iteration functions
Nick Mathewson [Thu, 16 Mar 2017 15:04:58 +0000 (11:04 -0400)] 
Consdiff: extract router ID hash iteration functions

There was a frequent block of code that did "find the next router
line, see if we've hit the end of the list, get the ID hash from the
line, and enforce well-ordering."  Per Ahf's review, I'm extracting
it to its own function.

8 years agoMake CONSENSUS_LINE_MAX_LEN a real define
Nick Mathewson [Wed, 15 Mar 2017 20:43:24 +0000 (16:43 -0400)] 
Make CONSENSUS_LINE_MAX_LEN a real define

8 years agoRemove a couple of {\n\n instances
Nick Mathewson [Wed, 15 Mar 2017 20:42:16 +0000 (16:42 -0400)] 
Remove a couple of {\n\n instances

8 years agoUse a better for X outside of base64_compare_table.
Nick Mathewson [Wed, 15 Mar 2017 20:41:29 +0000 (16:41 -0400)] 
Use a better for X outside of base64_compare_table.

8 years agoReindent a few labels.
Nick Mathewson [Wed, 15 Mar 2017 20:24:43 +0000 (16:24 -0400)] 
Reindent a few labels.

8 years agoAvoid all needless memory copies when computing consensus diffs.
Nick Mathewson [Tue, 14 Mar 2017 19:00:39 +0000 (15:00 -0400)] 
Avoid all needless memory copies when computing consensus diffs.

Previously, we operated on smartlists of NUL-terminated strings,
which required us to copy both inputs to produce the NUL-terminated
strings.  Then we copied parts of _those_ inputs to produce an
output smartlist of NUL-terminated strings.  And finally, we
concatenated everything into a final resulting string.

This implementation, instead, uses a pointer-and-extent pattern to
represent each line as a pointer into the original inputs and a
length.  These line objects are then added by reference into the
output. No actual bytes are copied from the original strings until
we finally concatenate the final result together.

Bookkeeping structures and newly allocated strings (like ed
commands) are allocated inside a memarea, to avoid needless mallocs
or complicated should-I-free-this-or-not bookkeeping.

In my measurements, this improves CPU performance by something like
18%.  The memory savings should be much, much higher.

8 years agoSwap memory allocation strategy for lists of lines for diffs
Nick Mathewson [Tue, 7 Mar 2017 23:43:49 +0000 (18:43 -0500)] 
Swap memory allocation strategy for lists of lines for diffs

Now we use a single allocation block for all the lines, rather than
calling strdup on them one at a time.  This should help performance
a tiny bit.

8 years agoFill in the missing documentation on the new functions
Nick Mathewson [Tue, 7 Mar 2017 23:15:25 +0000 (18:15 -0500)] 
Fill in the missing documentation on the new functions

8 years agoProp140: Fix a crash bug.
Nick Mathewson [Tue, 7 Mar 2017 21:06:03 +0000 (16:06 -0500)] 
Prop140: Fix a crash bug.

Found while fuzzing: this could occur if we tried to copy a
nonexistent "line 0" while applying a diff.

8 years agoAdd fuzzers for consensus diff backend code
Nick Mathewson [Tue, 7 Mar 2017 20:07:27 +0000 (15:07 -0500)] 
Add fuzzers for consensus diff backend code

This takes two fuzzers: one which generates a diff and makes sure it
works, and one which applies a diff.

So far, they won't crash, but there's a bug in my
string-manipulation code someplace that I'm having to work around,
related to the case where you have a blank line at the end of a
file, or where you diff a file with itself.

8 years agoMake consensus diff sha3 operations mockable.
Nick Mathewson [Tue, 7 Mar 2017 19:12:53 +0000 (14:12 -0500)] 
Make consensus diff sha3 operations mockable.

(We'll want this for fuzzing)

8 years agoString-based API for consensus diffs.
Nick Mathewson [Tue, 7 Mar 2017 18:45:32 +0000 (13:45 -0500)] 
String-based API for consensus diffs.

Also, add very strict split/join functions, and totally forbid
nonempty files that end with somethig besides a newline.  This
change is necessary to ensure that diff/apply are actually reliable
inverse operations.

8 years agoFix an abstraction violation.
Nick Mathewson [Tue, 7 Mar 2017 18:15:43 +0000 (13:15 -0500)] 
Fix an abstraction violation.

Don't alias the insides of smartlist_t; that way lies madness.

8 years agoUse "const" in consdiff.[ch]
Nick Mathewson [Tue, 7 Mar 2017 18:11:38 +0000 (13:11 -0500)] 
Use "const" in consdiff.[ch]

8 years agoprop140: Use sha3-256, not sha2-256
Nick Mathewson [Tue, 7 Mar 2017 18:02:00 +0000 (13:02 -0500)] 
prop140: Use sha3-256, not sha2-256

This is a protocol update from recent prop140 changes.

Also, per #21673, we need to check the entire document, including
signatures.

8 years agoAdd a couple more cases to reach 100% coverage.
Nick Mathewson [Tue, 7 Mar 2017 17:30:13 +0000 (12:30 -0500)] 
Add a couple more cases to reach 100% coverage.

8 years agoCover two more failing cases with unit tests
Nick Mathewson [Tue, 7 Mar 2017 17:04:45 +0000 (12:04 -0500)] 
Cover two more failing cases with unit tests

8 years agoFix an unreachable memory leak.
Nick Mathewson [Tue, 7 Mar 2017 16:47:19 +0000 (11:47 -0500)] 
Fix an unreachable memory leak.

Also add a missing newline.

8 years agoRemove digest[12]_hex
Nick Mathewson [Tue, 7 Mar 2017 16:42:24 +0000 (11:42 -0500)] 
Remove digest[12]_hex

8 years agoTweak&test log messages on apply_diff
Nick Mathewson [Tue, 7 Mar 2017 16:36:07 +0000 (11:36 -0500)] 
Tweak&test log messages on apply_diff

8 years agoFixes when applying diffs: Allow 2-line diffs, fix bogus free
Nick Mathewson [Tue, 7 Mar 2017 16:35:50 +0000 (11:35 -0500)] 
Fixes when applying diffs: Allow 2-line diffs, fix bogus free

The 2-line diff changs is needed to make the unit tests actually
test the cases that they thought they were testing.

The bogus free was found while testing those cases

8 years agoMark some warnings as bugs, and as (hopefully) unreachable.
Nick Mathewson [Tue, 7 Mar 2017 16:13:40 +0000 (11:13 -0500)] 
Mark some warnings as bugs, and as (hopefully) unreachable.

8 years agoCheck for expected warnings in apply_ed_diff
Nick Mathewson [Tue, 7 Mar 2017 16:08:51 +0000 (11:08 -0500)] 
Check for expected warnings in apply_ed_diff

8 years agoFix some logging on failed apply_ed_diff
Nick Mathewson [Tue, 7 Mar 2017 16:08:18 +0000 (11:08 -0500)] 
Fix some logging on failed apply_ed_diff

8 years agoNo need to end a log message with newline.
Nick Mathewson [Tue, 7 Mar 2017 15:48:03 +0000 (10:48 -0500)] 
No need to end a log message with newline.

8 years agotest operator cleanup
Nick Mathewson [Tue, 7 Mar 2017 15:46:24 +0000 (10:46 -0500)] 
test operator cleanup