Commit Graph

4314 Commits

Author SHA1 Message Date
Nick Mathewson e066966bf4 Extract tor_malloc and friends to a new module. 2018-06-21 15:20:01 -04:00
Nick Mathewson 999f7984e1 New script to check includes for modularity violations
Includes configuration files to enforce these rules on lib and
common.  Of course, "common" *is* a modularity violation right now,
so these rules aren't as strict as I would like them to be.
2018-06-21 14:05:33 -04:00
Nick Mathewson 3305ae5044 Rectify include paths (automated).
You have no idea how glad I am that this is automated.
2018-06-21 13:20:07 -04:00
Nick Mathewson 5b8f4769dc Move testsupport.h to its own directory 2018-06-21 13:20:07 -04:00
Nick Mathewson e9943d5459 Move responsibility for libdonna out of src/common 2018-06-21 13:19:00 -04:00
Nick Mathewson accf239fa3 Rectify include paths (automated) 2018-06-21 13:19:00 -04:00
Nick Mathewson 25ccfff86a Split crypto and tls libraries into directories
I am calling the crypto library "crypt_ops", since I want
higher-level crypto things to be separated from lower-level ones.
This library will hold only the low-level ones, once we have it
refactored.
2018-06-21 13:14:14 -04:00
Nick Mathewson 49d7c9ce53 Move more compiler-compatibility stuff into compat_compiler.h 2018-06-21 13:14:14 -04:00
Nick Mathewson fa5fda5bbf Rectify include paths (automated) 2018-06-21 13:14:14 -04:00
Nick Mathewson cd8f919553 Move compiler-compatibility headers into their own module
This one has no generated code.
2018-06-21 13:14:14 -04:00
Nick Mathewson d2f4a716e8 Remove unused pubsub module. 2018-06-21 13:14:14 -04:00
Nick Mathewson b420da4cf8 Rectify include paths (automated) 2018-06-21 13:14:14 -04:00
Nick Mathewson 2d20cbf837 Extract compression functions into a new library. 2018-06-21 13:08:25 -04:00
Nick Mathewson 727db7aeb9 Rectify include paths (automated) 2018-06-21 11:03:39 -04:00
Nick Mathewson a403ee6bb3 Move consttime library code into its own directory. 2018-06-21 11:03:39 -04:00
Nick Mathewson 275aff6917 Rectify include paths (automated) 2018-06-21 10:47:11 -04:00
Nick Mathewson 2cfcb7b364 Extract error functionality into a new lowest-level library. 2018-06-21 10:47:11 -04:00
Nick Mathewson da728e36f4 Rectify include paths (automated) 2018-06-21 09:55:16 -04:00
Nick Mathewson 874ba6861a Fix distcheck by naming header properly. 2018-06-21 09:37:32 -04:00
Nick Mathewson 27e456cd72 Merge remote-tracking branch 'rl1987/ticket19979_2' 2018-06-21 08:53:48 -04:00
Nick Mathewson 72a5ae8c66 Merge branch 'maint-0.3.4' 2018-06-21 08:38:21 -04:00
Nick Mathewson 599b53f046 add a bn.h include to crypto_dh.c 2018-06-21 08:34:27 -04:00
Nick Mathewson 8f3712cf6e eol@eof is still the law in 0.3.4 :( 2018-06-20 19:05:11 -04:00
Nick Mathewson f24797a587 Merge branch 'maint-0.3.4' 2018-06-20 17:49:56 -04:00
Nick Mathewson f91ea506f0 Fix clang warnings introduced by 9f2b887c5d 2018-06-20 17:49:06 -04:00
Nick Mathewson c86850c4c9 Don't use any asserts(), even raw, in format_number_sigsafe().
Also explain why.
2018-06-20 16:16:45 -04:00
Nick Mathewson 057d838409 Use raw_assert() in write_all().
This makes tor_log() finally non-circular.
2018-06-20 16:16:45 -04:00
Nick Mathewson 7a2dce9006 Use raw_assert() in central allocation functions.
This is, again, to avoid circularity in the log code.
2018-06-20 16:16:45 -04:00
Nick Mathewson 17ba51a30a Use raw_assert in mutex functions to avoid circularity in logs. 2018-06-20 16:16:45 -04:00
Nick Mathewson bb15dc1ebd Allow raw_assert() to dump stack traces.
It doesn't do this as beautifully as tor_assert(), but it doesn't
depend on any higher-level code.
2018-06-20 16:16:45 -04:00
Nick Mathewson a969ce464d Remove log dependency from backtrace.[ch] 2018-06-20 16:16:45 -04:00
Nick Mathewson 3246c9648c Use compat_compiler to restore macros in torerr.h 2018-06-20 15:08:06 -04:00
Nick Mathewson aa490e971b Split compiler-compatibility parts of compat.h 2018-06-20 15:08:06 -04:00
Nick Mathewson 5ecd1fec15 Move horrible-emergency handling into torerr.[ch]
Previously we had code like this for bad things happening from
signal handlers, but it makes sense to use the same logic to handle
cases when something is happening at a level too low for log.c to be
involved.

My raw_assert*() stuff now uses this code.
2018-06-20 15:08:06 -04:00
Nick Mathewson 8865972a0b Use raw_assert in tor_gettimeofday
We don't want to actually be calling logs when gettimeofday() fails,
since we need gettimeofday() to log.
2018-06-20 10:42:06 -04:00
Nick Mathewson 90aeaa53cd Remove all use of the assert.h header
Nothing in Tor has actually called assert() for some while.
2018-06-20 10:39:07 -04:00
Nick Mathewson ae01864b5d Add raw_assert() variants for cases where we cannot log.
Remove a different raw_assert() macro declared in log.c
2018-06-20 10:36:14 -04:00
Nick Mathewson 9fa73003fc Remove dmalloc support; closes #26426
Dmalloc hasn't seen a release in over a decade, and there are much
better tools to use these days.
2018-06-20 10:21:34 -04:00
Nick Mathewson 0dab29ce10 Run rectify_include_paths.py 2018-06-20 09:35:05 -04:00
Nick Mathewson 257b280776 Simplify AM_CPPFLAGS include setup
We had accumulated a bunch of cruft here.  Now let's only include
src and src/ext.  (exception: src/trunnel is autogenerated code, and
need to include src/trunnel.)

This commit will break the build hard.  The next commit will fix it.
2018-06-20 09:27:04 -04:00
Nick Mathewson fb0019daf9 Update copyrights to 2018. 2018-06-20 08:13:28 -04:00
rl1987 5af29fbb63 When possible, use RFC5869 HKDF implementation from OpenSSL
Also, stop supporting empty HKDF input key material
2018-06-19 19:26:31 +03:00
Nick Mathewson 3640c63498 Merge remote-tracking branch 'ffmancera-1/bug24658-dh_stream' 2018-06-17 20:39:13 -04:00
Nick Mathewson d5e4b6983f Merge remote-tracking branch 'rl1987/bug26282' 2018-06-17 19:32:08 -04:00
Nick Mathewson 8c8ed91aae Merge remote-tracking branch 'rl1987/bug24891' 2018-06-13 09:46:50 -04:00
Nick Mathewson 6230dfaf14 Merge branch 'maint-0.3.3' 2018-06-12 08:18:57 -04:00
Nick Mathewson 7fff99110b Merge branch 'maint-0.3.2' into maint-0.3.3 2018-06-12 08:18:56 -04:00
Nick Mathewson 5d8a927aa3 Merge branch 'maint-0.3.1' into maint-0.3.2 2018-06-12 08:18:56 -04:00
rl1987 39bbb8d9cf Avoid casting smartlist index implicitly 2018-06-04 11:56:37 +03:00
teor 8366be3b51 Silence unused-const-variable warnings in zstd.h on some gcc versions
Fixes bug 26272; bugfix on 0.3.1.1-alpha.
2018-06-02 14:11:04 -07:00