]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
10 years agoMerge remote-tracking branch 'origin/maint-0.2.6'
Nick Mathewson [Mon, 15 Jun 2015 14:19:46 +0000 (10:19 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.6'

10 years agoMerge commit '1eb2c0cbd3a9be2650419bd07474770629261f56'
Nick Mathewson [Mon, 15 Jun 2015 14:19:32 +0000 (10:19 -0400)] 
Merge commit '1eb2c0cbd3a9be2650419bd07474770629261f56'

This is an 'ours' merge to leave the version number alone.

10 years agoFix another seccomp2 issue
Nick Mathewson [Mon, 15 Jun 2015 14:13:11 +0000 (10:13 -0400)] 
Fix another seccomp2 issue

Allow pipe() and pipe2() syscalls; we need these when eventfd2()
support is missing. Fixes bug 16363; bugfix on 0.2.6.3-alpha.  Patch
from "teor".

10 years agoMerge remote-tracking branch 'teor/feature15817-clang-sanitizers'
Nick Mathewson [Thu, 11 Jun 2015 14:24:28 +0000 (10:24 -0400)] 
Merge remote-tracking branch 'teor/feature15817-clang-sanitizers'

10 years agoAdd a log message to try to track down #16013
Nick Mathewson [Thu, 11 Jun 2015 13:55:47 +0000 (09:55 -0400)] 
Add a log message to try to track down #16013

10 years agoSpell occurred right
Nick Mathewson [Wed, 10 Jun 2015 18:09:36 +0000 (14:09 -0400)] 
Spell occurred right

10 years agofwd-port 0.2.6.9 changes
Nick Mathewson [Wed, 10 Jun 2015 17:58:20 +0000 (13:58 -0400)] 
fwd-port 0.2.6.9 changes

10 years agoMerge remote-tracking branch 'teor/bug16343-master-key-assert'
Nick Mathewson [Wed, 10 Jun 2015 16:40:32 +0000 (12:40 -0400)] 
Merge remote-tracking branch 'teor/bug16343-master-key-assert'

10 years agoFix clang address of struct member always non-NULL in SSL master key
teor [Wed, 10 Jun 2015 15:06:15 +0000 (01:06 +1000)] 
Fix clang address of struct member always non-NULL in SSL master key

clang complains that the address of struct member in an assert in
SSL_SESSION_get_master_key is always non-NULL.
Instead, check each pointer argument is non-NULL before using it.

Fix on f90a704f1258 from 27 May 2015, not in any released version of tor.

10 years agoUpdate and clarify release checklist
Andrea Shepard [Wed, 10 Jun 2015 15:05:52 +0000 (15:05 +0000)] 
Update and clarify release checklist

10 years agoBump version to 0.2.6.9
Andrea Shepard [Wed, 10 Jun 2015 14:58:33 +0000 (14:58 +0000)] 
Bump version to 0.2.6.9

10 years agoTweak clang sanitizer blacklist for out-of-tree builds, make, ccache
teor [Wed, 10 Jun 2015 14:59:04 +0000 (00:59 +1000)] 
Tweak clang sanitizer blacklist for out-of-tree builds, make, ccache

Avoid using file names and file paths for compatibility with
out-of-tree builds.

Note make and ccache don't track blacklist dependencies,
add workarounds.

10 years agoMerge remote-tracking branch 'teor/feature15817-clang-sanitizers'
Nick Mathewson [Mon, 8 Jun 2015 14:57:25 +0000 (10:57 -0400)] 
Merge remote-tracking branch 'teor/feature15817-clang-sanitizers'

10 years agoMerge remote-tracking branch 'origin/maint-0.2.6'
Nick Mathewson [Mon, 8 Jun 2015 14:33:38 +0000 (10:33 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.6'

10 years agoHSDir flag now requires the Stable flag
David Goulet [Mon, 11 May 2015 15:27:30 +0000 (11:27 -0400)] 
HSDir flag now requires the Stable flag

Fixes #8243

10 years agoEdit contrib/README to document the contrib/clang directory
teor [Fri, 5 Jun 2015 21:56:41 +0000 (07:56 +1000)] 
Edit contrib/README to document the contrib/clang directory

10 years agoAdd instructions for clang sanitizers, static analyzer, and coverity
teor [Fri, 5 Jun 2015 18:04:23 +0000 (04:04 +1000)] 
Add instructions for clang sanitizers, static analyzer, and coverity

Document use of coverity, clang static analyzer, and clang dynamic
undefined behavior and address sanitizers in doc/HACKING.

Add clang dynamic sanitizer blacklist in
contrib/clang/sanitizer_blacklist.txt to exempt known undefined
behavior. Include detailed usage instructions in this blacklist file.

Patch by "teor".

10 years agoMerge remote-tracking branch 'origin/maint-0.2.6'
Nick Mathewson [Thu, 4 Jun 2015 19:02:47 +0000 (15:02 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.6'

10 years agoSet session_group after the port's data structure has been populated.
Yawning Angel [Thu, 4 Jun 2015 13:53:35 +0000 (13:53 +0000)] 
Set session_group after the port's data structure has been populated.

Fixes #16247, patch by "jojelino".

10 years agoMerge remote-tracking branch 'public/bug15760_hard_026_v2'
Nick Mathewson [Tue, 2 Jun 2015 19:08:14 +0000 (15:08 -0400)] 
Merge remote-tracking branch 'public/bug15760_hard_026_v2'

10 years agoA few more minor OpenSSL 1.1 fixes.
Yawning Angel [Tue, 2 Jun 2015 18:58:57 +0000 (18:58 +0000)] 
A few more minor OpenSSL 1.1 fixes.

 * Use `TLS_method()` instead of the deprecated `SSLv23_method()`
 * Fix one missed conversion to `SSL_CIPHER_get_id()`

10 years agoMerge remote-tracking branch 'teor/bug16115-minor-fixes'
Nick Mathewson [Tue, 2 Jun 2015 18:51:13 +0000 (14:51 -0400)] 
Merge remote-tracking branch 'teor/bug16115-minor-fixes'

10 years agoMerge remote-tracking branch 'origin/maint-0.2.6'
Nick Mathewson [Tue, 2 Jun 2015 18:29:37 +0000 (14:29 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.6'

10 years agoFix sandboxing to work when running as a relay
Peter Palfrader [Tue, 2 Jun 2015 18:06:49 +0000 (20:06 +0200)] 
Fix sandboxing to work when running as a relay

This includes correctly allowing renaming secret_id_key and allowing the
eventfd2 and futex syscalls.  Fixes bug 16244; bugfix on 0.2.6.1-alpha.

10 years agoCheck for NULL values in getinfo_helper_onions
teor [Tue, 2 Jun 2015 17:58:28 +0000 (03:58 +1000)] 
Check for NULL values in getinfo_helper_onions

Fix on 915c7438a77e in Tor 0.2.7.1-alpha.

10 years agoEnsure signing_key is non-NULL before accessing one of its members
teor [Tue, 2 Jun 2015 17:56:05 +0000 (03:56 +1000)] 
Ensure signing_key is non-NULL before accessing one of its members

signing_key can be NULL in ed_key_init_from_file in routerkeys.c.
Discovered by clang 3.7 address sanitizer.

Fix on c03694938ed0, not in any released version of Tor.

10 years agoRemove undefined directive-in-macro in test_util_writepid
teor [Tue, 2 Jun 2015 17:52:31 +0000 (03:52 +1000)] 
Remove undefined directive-in-macro in test_util_writepid

clang 3.7 complains that using a preprocessor directive inside
a macro invocation in test_util_writepid in test_util.c is undefined.

Fix on 79e85313aa61 on 0.2.7.1-alpha.

10 years agoAlways initialise return value in compute_desc_id in rendcommon.c
teor [Tue, 2 Jun 2015 17:48:46 +0000 (03:48 +1000)] 
Always initialise return value in compute_desc_id in rendcommon.c

Fix on e6a581f126ba, released in 0.2.7.1-alpha.

10 years agoSilence unused variable warnings in find_cipher_by_id
teor [Tue, 2 Jun 2015 17:43:46 +0000 (03:43 +1000)] 
Silence unused variable warnings in find_cipher_by_id

Unused variable warnings were still generated under some versions of OpenSSL.
Instead, make sure all variables are used under all versions.

Fix on 496df21c89d1, not in any released version of tor.

10 years agoFix an incorrect comment on spawn_func
teor [Tue, 2 Jun 2015 17:39:34 +0000 (03:39 +1000)] 
Fix an incorrect comment on spawn_func

spawn_func calls pthread_create on unix, not fork

Fix on existing code split out of compat.c into
compat_pthreads.c in c2f0d52b7fb9

10 years agoMerge remote-tracking branch 'public/bug15760_hard_026_v2'
Nick Mathewson [Tue, 2 Jun 2015 17:45:27 +0000 (13:45 -0400)] 
Merge remote-tracking branch 'public/bug15760_hard_026_v2'

Conflicts:
src/common/tortls.c

10 years agoUse autoconf, not OPENSSL_VERSION_NUMBER, to detect SSL_CIPHER_find
Nick Mathewson [Tue, 2 Jun 2015 17:27:55 +0000 (13:27 -0400)] 
Use autoconf, not OPENSSL_VERSION_NUMBER, to detect SSL_CIPHER_find

Repairs build with libressl

10 years agoUse accessor functions for client_random/server_random/master_key
Nick Mathewson [Tue, 26 May 2015 16:09:53 +0000 (12:09 -0400)] 
Use accessor functions for client_random/server_random/master_key

If OpenSSL accepts my patch to introduce these functions, they'll
be a way to help Tor work with OpenSSL 1.1.

10 years agoAdd a master-key-ed25519 line for convenience
Nick Mathewson [Mon, 1 Jun 2015 15:24:55 +0000 (11:24 -0400)] 
Add a master-key-ed25519 line for convenience

10 years agoMore check-spaces fixes
Nick Mathewson [Mon, 1 Jun 2015 14:56:54 +0000 (10:56 -0400)] 
More check-spaces fixes

10 years agoFix a memory leak in routerkeys.c
Nick Mathewson [Mon, 1 Jun 2015 14:45:51 +0000 (10:45 -0400)] 
Fix a memory leak in routerkeys.c

10 years agoFix some memory leaks in ed25519 code and tests
Nick Mathewson [Mon, 1 Jun 2015 14:26:11 +0000 (10:26 -0400)] 
Fix some memory leaks in ed25519 code and tests

10 years agoAppease make check-spaces
Andrea Shepard [Mon, 1 Jun 2015 12:59:14 +0000 (12:59 +0000)] 
Appease make check-spaces

10 years agoFix return-type gcc warning
Sharif Olorin [Sat, 30 May 2015 06:03:50 +0000 (06:03 +0000)] 
Fix return-type gcc warning

find_dl_schedule_and_len caused gcc to spit up with -Werror.

Signed-off-by: Sharif Olorin <sio@tesser.org>
10 years agoAnother memory leak bytes the dust.
Nick Mathewson [Fri, 29 May 2015 20:17:54 +0000 (16:17 -0400)] 
Another memory leak bytes the dust.

10 years agoAttempt to fix keypinning on Windows
Nick Mathewson [Fri, 29 May 2015 18:38:59 +0000 (14:38 -0400)] 
Attempt to fix keypinning on Windows

Not that I would countenance a directory authority on Windows, but
it would be nice if the unit tests passed.

10 years agoFix another int-to-ptr cast.
Nick Mathewson [Fri, 29 May 2015 18:09:11 +0000 (14:09 -0400)] 
Fix another int-to-ptr cast.

10 years agoFix a warning from the clangalyzer.
Nick Mathewson [Fri, 29 May 2015 18:08:51 +0000 (14:08 -0400)] 
Fix a warning from the clangalyzer.

10 years agoFix a sizeof(ptr) mistake in test-memwipe.c
Nick Mathewson [Fri, 29 May 2015 17:50:12 +0000 (13:50 -0400)] 
Fix a sizeof(ptr) mistake in test-memwipe.c

10 years agomore generic scan-build script
Nick Mathewson [Fri, 29 May 2015 17:50:05 +0000 (13:50 -0400)] 
more generic scan-build script

10 years agoMerge remote-tracking branch 'origin/maint-0.2.6'
Nick Mathewson [Thu, 28 May 2015 18:06:01 +0000 (14:06 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.6'

10 years agoFix sandbox use with systemd. bug 16212.
Nick Mathewson [Thu, 28 May 2015 18:05:46 +0000 (14:05 -0400)] 
Fix sandbox use with systemd. bug 16212.

10 years agoAvoid double-free on rend_add_service() failure
Nick Mathewson [Thu, 28 May 2015 17:23:09 +0000 (13:23 -0400)] 
Avoid double-free on rend_add_service() failure

Rend_add_service() frees its argument on failure; no need to free again.

Fixes bug 16228, bugfix on 0.2.7.1-alpha

Found by coverity; this is CID 1301387.

10 years agoThere sure are a lot of these in test_hs.c. CID 1301385
Nick Mathewson [Thu, 28 May 2015 17:17:24 +0000 (13:17 -0400)] 
There sure are a lot of these in test_hs.c. CID 1301385

10 years agoFix a bug in earlier torcert fix, fix another.
Nick Mathewson [Thu, 28 May 2015 17:14:30 +0000 (13:14 -0400)] 
Fix a bug in earlier torcert fix, fix another.

10 years agoAnother test_hs leak. CID 1301383.
Nick Mathewson [Thu, 28 May 2015 17:13:15 +0000 (13:13 -0400)] 
Another test_hs leak. CID 1301383.

10 years agoMemory leak in tor_cert_parse. CID 1301382.
Nick Mathewson [Thu, 28 May 2015 17:11:54 +0000 (13:11 -0400)] 
Memory leak in tor_cert_parse. CID 1301382.

10 years agoMemory leak in tor_cert_parse. CID gi1301381
Nick Mathewson [Thu, 28 May 2015 17:09:00 +0000 (13:09 -0400)] 
Memory leak in tor_cert_parse. CID gi1301381

10 years agoFix leak-on-test-failure in test_routerkeys.c
Nick Mathewson [Thu, 28 May 2015 17:06:30 +0000 (13:06 -0400)] 
Fix leak-on-test-failure in test_routerkeys.c

CID 1301379

10 years agoMemory leak in test_hs_rend_data
Nick Mathewson [Thu, 28 May 2015 17:01:48 +0000 (13:01 -0400)] 
Memory leak in test_hs_rend_data

CID 1301377

10 years agoFix memory leak in test_routerkeys
Nick Mathewson [Thu, 28 May 2015 17:00:25 +0000 (13:00 -0400)] 
Fix memory leak in test_routerkeys

CID 1301376

10 years agoSmall leak in ed_key_init_from_file. CID 1301373
Nick Mathewson [Thu, 28 May 2015 16:52:34 +0000 (12:52 -0400)] 
Small leak in ed_key_init_from_file. CID 1301373

10 years agoMemory leak on error in connection_or_compute_auth_cell_body. CID 1301372
Nick Mathewson [Thu, 28 May 2015 16:51:20 +0000 (12:51 -0400)] 
Memory leak on error in connection_or_compute_auth_cell_body. CID 1301372

10 years agofix memory leak on bad ns convote. CID 1301371.
Nick Mathewson [Thu, 28 May 2015 16:49:39 +0000 (12:49 -0400)] 
fix memory leak on bad ns convote. CID 1301371.

10 years agoFix memory leak on failure to generate EI. CID 1301370.
Nick Mathewson [Thu, 28 May 2015 16:47:31 +0000 (12:47 -0400)] 
Fix memory leak on failure to generate EI. CID 1301370.

10 years agoFix null dereference on key setup error.
Nick Mathewson [Thu, 28 May 2015 16:46:06 +0000 (12:46 -0400)] 
Fix null dereference on key setup error.

CID 1301369

10 years agoUpdate trunnel code.
Nick Mathewson [Thu, 28 May 2015 16:44:52 +0000 (12:44 -0400)] 
Update trunnel code.

This gets the minor change in trunnel 1.4.1, which should avoid
deadcode warnings from Coverity.

10 years agoAvoid dereferencing null on unit test failure for link handshakes.
Nick Mathewson [Thu, 28 May 2015 16:41:00 +0000 (12:41 -0400)] 
Avoid dereferencing null on unit test failure for link handshakes.

This fixes CID 1301368 -- found by coverity

10 years agoFix a bug when we fail to read a cert from a file.
Nick Mathewson [Thu, 28 May 2015 16:30:25 +0000 (12:30 -0400)] 
Fix a bug when we fail to read a cert from a file.

Found by coverity -- CID 1301366.

10 years agoAdd assertions to crypto_dh_dup()
Nick Mathewson [Thu, 28 May 2015 16:27:22 +0000 (12:27 -0400)] 
Add assertions to crypto_dh_dup()

Without these, coverity is annoyed that aren't checking for NULL in bench.c

CID 1293335 -- found by coverity.

10 years agoImpose an upper limit on threads per threadpool.
Nick Mathewson [Thu, 28 May 2015 16:24:29 +0000 (12:24 -0400)] 
Impose an upper limit on threads per threadpool.

Found by Coverity; Fixes CID 1268069

10 years agoBug 12498 needs a changes file.
Nick Mathewson [Thu, 28 May 2015 15:40:20 +0000 (11:40 -0400)] 
Bug 12498 needs a changes file.

10 years agoMerge branch '12498_ed25519_keys_v6'
Nick Mathewson [Thu, 28 May 2015 15:04:33 +0000 (11:04 -0400)] 
Merge branch '12498_ed25519_keys_v6'

Fixed numerous conflicts, and ported code to use new base64 api.

10 years agoDocument some ed25519 key options
Nick Mathewson [Thu, 28 May 2015 14:18:42 +0000 (10:18 -0400)] 
Document some ed25519 key options

10 years agoNote some functions that should move or be merged
Nick Mathewson [Tue, 26 May 2015 20:09:34 +0000 (16:09 -0400)] 
Note some functions that should move or be merged

10 years agoDo not allocate our ed-link crosscert till after tls ctx
Nick Mathewson [Fri, 15 May 2015 15:09:10 +0000 (11:09 -0400)] 
Do not allocate our ed-link crosscert till after tls ctx

We need this to prevent some annoying chutney crash-at-starts

10 years agoGenerate weird certificates correctly
Nick Mathewson [Thu, 28 May 2015 14:47:42 +0000 (10:47 -0400)] 
Generate weird certificates correctly

(Our link protocol assumes that the link cert certifies the TLS key,
and there is an RSA->Ed25519 crosscert)

10 years agoRegenerate ed25519 keys when they will expire soon.
Nick Mathewson [Thu, 28 May 2015 14:44:09 +0000 (10:44 -0400)] 
Regenerate ed25519 keys when they will expire soon.

Also, have testing-level options to set the lifetimes and
expiration-tolerances of all key types, plus a non-testing-level
option to set the lifetime of any auto-generated signing key.

10 years ago# This is a combination of 2 commits.
Nick Mathewson [Sun, 1 Mar 2015 13:36:40 +0000 (14:36 +0100)] 
# This is a combination of 2 commits.
# The first commit's message is:

Regenerate ed25519 keys when they will expire soon.

Also, have testing-level options to set the lifetimes and
expiration-tolerances of all key types, plus a non-testing-level
option to set the lifetime of any auto-generated signing key.

# The 2nd commit message will be skipped:

# fixup! Regenerate ed25519 keys when they will expire soon.

10 years agoOnly load master ed25519 secret keys when we absolutely must.
Nick Mathewson [Sun, 1 Mar 2015 13:05:00 +0000 (14:05 +0100)] 
Only load master ed25519 secret keys when we absolutely must.

10 years agoImplement ed25519 identity collation for voting.
Nick Mathewson [Thu, 13 Nov 2014 15:03:55 +0000 (10:03 -0500)] 
Implement ed25519 identity collation for voting.

This is a new collator type that follows proposal 220 for deciding
which identities to include.  The rule is (approximately):

  If a <ed,rsa> identity is listed by more than half of authorities,
  include it.  And include all <rsa> votes about that node as
  matching.

  Otherwise, if an <*,rsa> or <rsa> identity is listed by more than
  half of the authorities, and no <ed,rsa> has been listed, include
  it.

10 years agoRefactor code that matches up routers with the same identity in votes
Nick Mathewson [Wed, 12 Nov 2014 19:29:05 +0000 (14:29 -0500)] 
Refactor code that matches up routers with the same identity in votes

This makes 'routerstatus collation' into a first-class concept, so
we can change how that works for prop220.

10 years agoCheckpoint some work on voting on ed25519 identities
Nick Mathewson [Wed, 29 Oct 2014 17:36:21 +0000 (13:36 -0400)] 
Checkpoint some work on voting on ed25519 identities

 * Include ed25519 identities in votes
 * Include "no ed25519 identity" in votes
 * Include some commented-out code about identity voting.  (This
   will disappear.)
 * Include some functions for identity voting (These will disappear.)
 * Enforce uniqueness in ed25519 keys within a vote

10 years agoEnforce more correspondence between ri and ei
Nick Mathewson [Fri, 24 Oct 2014 13:19:49 +0000 (09:19 -0400)] 
Enforce more correspondence between ri and ei

In particular, they have to list the same ed25519 certificate, and
the SHA256 digest of the ei needs to match.

10 years agoSign extrainfo documents with ed25519
Nick Mathewson [Thu, 28 May 2015 14:42:22 +0000 (10:42 -0400)] 
Sign extrainfo documents with ed25519

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.

10 years agoRevise makedesc.py: teach it how to emit ed signatures and crosscerts
Nick Mathewson [Wed, 22 Oct 2014 18:19:18 +0000 (14:19 -0400)] 
Revise makedesc.py: teach it how to emit ed signatures and crosscerts

Also, add a trivial ed25519-signed routerinfo to the tests.

10 years agoRefactor link handshake cell type implementations to use trunnel
Nick Mathewson [Fri, 17 Oct 2014 21:06:31 +0000 (17:06 -0400)] 
Refactor link handshake cell type implementations to use trunnel

Unit tests still pass.

10 years agoFix memory leaks in test_link_handshake.c
Nick Mathewson [Fri, 17 Oct 2014 20:30:42 +0000 (16:30 -0400)] 
Fix memory leaks in test_link_handshake.c

10 years agoTests for AUTHENTICATE cell functionality.
Nick Mathewson [Thu, 16 Oct 2014 13:07:50 +0000 (09:07 -0400)] 
Tests for AUTHENTICATE cell functionality.

10 years agoStart testing cell encoders/processers for the v3 handshake.
Nick Mathewson [Wed, 8 Oct 2014 19:39:34 +0000 (15:39 -0400)] 
Start testing cell encoders/processers for the v3 handshake.

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.

10 years agoAdd trunnel-generated items for link handshake code.
Nick Mathewson [Wed, 8 Oct 2014 18:43:33 +0000 (14:43 -0400)] 
Add trunnel-generated items for link handshake code.

This includes the link handshake variations for proposal220.

We'll use this for testing first, and then use it to extend our
current code to support prop220.

10 years agoInclude ed25519 keys in microdescriptors.
Nick Mathewson [Wed, 8 Oct 2014 15:33:59 +0000 (11:33 -0400)] 
Include ed25519 keys in microdescriptors.

10 years agoFix the position-check for ed25519 certs to work with annotations
Nick Mathewson [Wed, 8 Oct 2014 13:13:09 +0000 (09:13 -0400)] 
Fix the position-check for ed25519 certs to work with annotations

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.

10 years agoTie key-pinning logic into directory authority operation
Nick Mathewson [Wed, 8 Oct 2014 12:32:00 +0000 (08:32 -0400)] 
Tie key-pinning logic into directory authority operation

With this patch:
  * Authorities load the key-pinning log at startup.
  * Authorities open a key-pinning log for writing at startup.
  * Authorities reject any router with an ed25519 key where they have
    previously seen that ed25519 key with a different RSA key, or vice
    versa.
  * Authorities warn about, but *do not* reject, RSA-only descriptors
    when the RSA key has previously gone along with an Ed25519 key.
    (We should make this a 'reject' too, but we can't do that until we're
    sure there's no legit reason to downgrade to 0.2.5.)

10 years agoKey-pinning back-end for directory authorities.
Nick Mathewson [Thu, 2 Oct 2014 19:34:23 +0000 (15:34 -0400)] 
Key-pinning back-end for directory authorities.

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.

10 years agoImplement proposal 228: cross-certification with onion keys
Nick Mathewson [Thu, 28 May 2015 14:41:43 +0000 (10:41 -0400)] 
Implement proposal 228: cross-certification with onion keys

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.

10 years agoImplement proposal 228: cross-certification with onion keys
Nick Mathewson [Wed, 1 Oct 2014 15:54:07 +0000 (11:54 -0400)] 
Implement proposal 228: cross-certification with onion keys

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.

10 years agoImplement ed25519-signed descriptors
Nick Mathewson [Wed, 1 Oct 2014 03:36:47 +0000 (23:36 -0400)] 
Implement ed25519-signed descriptors

Now that we have ed25519 keys, we can sign descriptors with them
and check those signatures as documented in proposal 220.

10 years agoprop220: Implement certificates and key storage/creation
Nick Mathewson [Tue, 30 Sep 2014 20:00:17 +0000 (16:00 -0400)] 
prop220: Implement certificates and key storage/creation

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)

10 years agoFIx a couple of mistypes.
rl1987 [Tue, 26 May 2015 18:52:26 +0000 (21:52 +0300)] 
FIx a couple of mistypes.

10 years agoStop looking at session->ciphers when possible
Nick Mathewson [Tue, 26 May 2015 15:05:36 +0000 (11:05 -0400)] 
Stop looking at session->ciphers when possible

If the OpenSSL team accepts my patch to add an
SSL_get_client_ciphers function, this patch will make Tor use it
when available, thereby working better with openssl 1.1.

10 years agoRemove rectify_client_ciphers as needless.
Nick Mathewson [Tue, 26 May 2015 14:56:54 +0000 (10:56 -0400)] 
Remove rectify_client_ciphers as needless.

We previously used this function instead of SSL_set_cipher_list() to
set up a stack of client SSL_CIPHERs for these reasons:

  A) In order to force a particular order of the results.

  B) In order to be able to include dummy entries for ciphers that
     this build of openssl did not support, so we could impersonate
     Firefox harder.

But we no longer do B, since we merged proposal 198 and stopped
lying about what ciphers we know.

And A was actually pointless, since I had misread the implementation
of SSL_set_cipher_list().  It _does_ do some internal sorting, but
that is pre-sorting on the master list of ciphers, not sorting on
the user's preferred order.

10 years agoRevert "Try using SSL_get_ciphers in place of session->ciphers"
Nick Mathewson [Fri, 22 May 2015 14:22:11 +0000 (10:22 -0400)] 
Revert "Try using SSL_get_ciphers in place of session->ciphers"

This reverts commit 67964cfa787461bc56380fe46439fd5c9863bb4f.

It was the cause of #16153, and was not in any released Tor.  We need
a better solution for getting session->ciphers.

10 years agoFix unit tests on MSVC2013.
Nick Mathewson [Tue, 26 May 2015 14:24:21 +0000 (10:24 -0400)] 
Fix unit tests on MSVC2013.

Patch from "NewEraCracker."  Fixes bug16030; bugfix on 0.2.6.2-alpha.

10 years agoMerge remote-tracking branch 'origin/maint-0.2.6'
Nick Mathewson [Tue, 26 May 2015 13:41:30 +0000 (09:41 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.6'