Age | Commit message (Collapse) | Author |
|
Extrainfo documents are now ed-signed just as are router
descriptors, according to proposal 220. This patch also includes
some more tests for successful/failing parsing, and fixes a crash
bug in ed25519 descriptor parsing.
|
|
Also, add a trivial ed25519-signed routerinfo to the tests.
|
|
|
|
|
|
An earlier version of these tests was broken; now they're a nicer,
more robust, more black-box set of tests. The key is to have each
test check a handshake message that is wrong in _one_ way.
|
|
|
|
When there are annotations on a router descriptor, the
ed25519-identity element won't be at position 0 or 1; it will be at
router+1 or router-1.
This patch also adds a missing smartlist function to search a list for
an item with a particular pointer.
|
|
This module implements a key-pinning mechanism to ensure that it's
safe to use RSA keys as identitifers even as we migrate to Ed25519
keys. It remembers, for every Ed25519 key we've seen, what the
associated Ed25519 key is. This way, if we see a different Ed25519
key with that RSA key, we'll know that there's a mismatch.
We persist these entries to disk using a simple format, where each
line has a base64-encoded RSA SHA1 hash, then a base64-endoded
Ed25519 key. Empty lines, misformed lines, and lines beginning with
a # are ignored. Lines beginning with @ are reserved for future
extensions.
|
|
Routers now use TAP and ntor onion keys to sign their identity keys,
and put these signatures in their descriptors. That allows other
parties to be confident that the onion keys are indeed controlled by
the router that generated the descriptor.
|
|
Now that we have ed25519 keys, we can sign descriptors with them
and check those signatures as documented in proposal 220.
|
|
For prop220, we have a new ed25519 certificate type. This patch
implements the code to create, parse, and validate those, along with
code for routers to maintain their own sets of certificates and
keys. (Some parts of master identity key encryption are done, but
the implementation of that isn't finished)
|
|
Fixes #15012; bug not in any released Tor
|
|
|
|
Since resolve_my_address() yields IP address in host order there is
no need to use byteorder functions for conversion.
|
|
|
|
|
|
|
|
Conflicts:
src/or/dirvote.h
src/test/include.am
src/test/test_entrynodes.c
|
|
|
|
We want to use this function in our guardfraction unittests, so make a
test_helpers module and move it there.
|
|
Using kill and wait in this way may have been making windows
builders unhappy.
|
|
|
|
Also remove the unit test mocks that allowed get_options() to be
NULL; that's an invariant violation for get_options().
|
|
|
|
If we guessed a buffer size too small, we never increased the buffer and
tried again
Also simplify the interface of ifreq_to_smartlist a little
|
|
|
|
Thanks weasel :)
Also remove stray debug output
|
|
Weasel notes that exit codes above 128 are for when a script dies from a
signal.
|
|
Fixes part of bug #14478, patch idea suggested by an anonymous
contributor. Thanks!
|
|
Fixes part of bug #14478, patch idea suggested by an anonymous
contributor. Thanks!
|
|
|
|
|
|
Conflicts:
src/or/circuituse.c
src/test/include.am
src/test/test_entrynodes.c
|
|
They have been off-by-default since 0.2.5 and nobody has complained. :)
Also remove the buf_shrink() function, which hasn't done anything
since we first stopped using contiguous memory to store buffers.
Closes ticket 14848.
|
|
Check if each smartlist is NULL before calling SMARTLIST_FOREACH on it.
Bug discovered by the clang static analyzer.
Apple clang 600.0.56 (LLVM 3.5svn) on x86_64-apple-darwin14.1.0.
|
|
Fixes part of bug #14478, patch idea suggested by an anonymous
contributor. Thanks!
|
|
Shell exit values must fall into the range of [0-255], so let's honour
this. In practice, the "exit -1" from the old code set an exit value of
255 on most systems, so let's pick that.
Fixes part of bug #14478, patch idea suggested by an anonymous
contributor. Thanks!
|
|
|
|
|
|
|
|
|
|
Conflicts:
src/test/test.c
|
|
|
|
Conflicts:
src/test/test_dir.c
|
|
|
|
|
|
|
|
|
|
This can run in parallel with the faster ones and the other tests.
|
|
Conflicts:
src/test/include.am
src/test/test.c
|