]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
10 years agoImprove log messages for problems about ed25519 keypinning
Nick Mathewson [Fri, 31 Jul 2015 14:47:39 +0000 (10:47 -0400)] 
Improve log messages for problems about ed25519 keypinning

Fixes 16286; bugfix on 0.2.7.2-alpha.

10 years agoAdd get_max_sockets() and remove dead code
David Goulet [Thu, 30 Jul 2015 18:43:15 +0000 (14:43 -0400)] 
Add get_max_sockets() and remove dead code

The control port was using set_max_file_descriptors() with a limit set to 0
to query the number of maximum socket Tor can use. With the recent changes
to that function, a check was introduced to make sure a user can not set a
value below the amount we reserved for non socket.

This commit adds get_max_sockets() that returns the value of max_sockets so
we can stop using that "setter" function to get the current value.

Finally, the dead code is removed that is the code that checked for limit
equal to 0. From now on, set_max_file_descriptors() should never be used
with a limit set to 0 for a valid use case.

Fixes #16697

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
10 years agowhitespace fix
Nick Mathewson [Thu, 30 Jul 2015 17:17:08 +0000 (13:17 -0400)] 
whitespace fix

10 years agochanges file for callgraph scripts
Nick Mathewson [Thu, 30 Jul 2015 16:35:52 +0000 (12:35 -0400)] 
changes file for callgraph scripts

10 years agoCheck in some scripts I use for callgraph analysis.
Nick Mathewson [Thu, 30 Jul 2015 16:23:28 +0000 (12:23 -0400)] 
Check in some scripts I use for callgraph analysis.

10 years agoWrap windows-only C files in #ifdef _WIN32
Nick Mathewson [Thu, 30 Jul 2015 15:14:15 +0000 (11:14 -0400)] 
Wrap windows-only C files in #ifdef _WIN32

This should make some scripts and IDEs happier.

10 years agoMerge remote-tracking branch 'origin/maint-0.2.6'
Nick Mathewson [Wed, 29 Jul 2015 14:48:29 +0000 (10:48 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.6'

10 years agoMerge remote-tracking branch 'origin/maint-0.2.5' into maint-0.2.6
Nick Mathewson [Wed, 29 Jul 2015 14:48:13 +0000 (10:48 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.5' into maint-0.2.6

10 years agoMerge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5
Nick Mathewson [Wed, 29 Jul 2015 14:47:07 +0000 (10:47 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5

10 years agoMerge remote-tracking branch 'teor/feature14175-chutney-performance-v2'
Nick Mathewson [Wed, 29 Jul 2015 14:36:23 +0000 (10:36 -0400)] 
Merge remote-tracking branch 'teor/feature14175-chutney-performance-v2'

10 years agoUpdate geoip and geoip6 to the July 8 2015 database.
Karsten Loesing [Wed, 29 Jul 2015 13:49:04 +0000 (15:49 +0200)] 
Update geoip and geoip6 to the July 8 2015 database.

10 years agoMerge remote-tracking branch 'linus/bug_11061'
Nick Mathewson [Tue, 28 Jul 2015 18:38:52 +0000 (14:38 -0400)] 
Merge remote-tracking branch 'linus/bug_11061'

10 years agoBump version to 0.2.7.2-alpha-dev
Nick Mathewson [Mon, 27 Jul 2015 17:59:49 +0000 (13:59 -0400)] 
Bump version to 0.2.7.2-alpha-dev

10 years agoFold final entries into changelog tor-0.2.7.2-alpha
Nick Mathewson [Mon, 27 Jul 2015 14:53:09 +0000 (10:53 -0400)] 
Fold final entries into changelog

10 years agotighten and tidy the changelog; pick a date
Nick Mathewson [Mon, 27 Jul 2015 13:40:40 +0000 (09:40 -0400)] 
tighten and tidy the changelog; pick a date

10 years agoMerge remote-tracking branch 'yawning/bug16674'
Nick Mathewson [Mon, 27 Jul 2015 13:15:52 +0000 (09:15 -0400)] 
Merge remote-tracking branch 'yawning/bug16674'

10 years agoAllow a single trailing `.` when validating FQDNs from SOCKS.
Yawning Angel [Mon, 27 Jul 2015 12:58:40 +0000 (12:58 +0000)] 
Allow a single trailing `.` when validating FQDNs from SOCKS.

URI syntax (and DNS syntax) allows for a single trailing `.` to
explicitly distinguish between a relative and absolute
(fully-qualified) domain name. While this is redundant in that RFC 1928
DOMAINNAME addresses are *always* fully-qualified, certain clients
blindly pass the trailing `.` along in the request.

Fixes bug 16674; bugfix on 0.2.6.2-alpha.

10 years agoFix ed25519-donna with SSP on non-x86.
Yawning Angel [Mon, 27 Jul 2015 00:49:11 +0000 (00:49 +0000)] 
Fix ed25519-donna with SSP on non-x86.

The only reason 16 byte alignment is required is for SSE2 load and
store operations, so only align datastructures to 16 byte boundaries
when building with SSE2 support.

This fixes builds with GCC SSP on platforms that don't have special
case code to do dynamic stack re-alignment (everything not x86/x86_64).

Fixes bug #16666.

10 years agoMove the note about non-localhost SOCKSPort usage up to where it belongs.
Linus Nordberg [Fri, 24 Jul 2015 08:11:38 +0000 (10:11 +0200)] 
Move the note about non-localhost SOCKSPort usage up to where it belongs.

I think this section slipped downwards when flags where added.

10 years agoBump version (and explain how)
Nick Mathewson [Thu, 23 Jul 2015 17:48:13 +0000 (13:48 -0400)] 
Bump version (and explain how)

10 years agoRe-run trunnel to capture change for msvc.
Nick Mathewson [Thu, 23 Jul 2015 16:05:06 +0000 (12:05 -0400)] 
Re-run trunnel to capture change for msvc.

10 years agoFix a couple more msvc issues, reported by gisle vanem
Nick Mathewson [Thu, 23 Jul 2015 16:01:57 +0000 (12:01 -0400)] 
Fix a couple more msvc issues, reported by gisle vanem

10 years agoA nit found by qwerty1
Nick Mathewson [Thu, 23 Jul 2015 15:41:54 +0000 (11:41 -0400)] 
A nit found by qwerty1

10 years agoChangelog tweaks from harmony
Nick Mathewson [Thu, 23 Jul 2015 15:29:40 +0000 (11:29 -0400)] 
Changelog tweaks from harmony

10 years agoMinor changelog tweaks
George Kadianakis [Thu, 23 Jul 2015 14:43:42 +0000 (17:43 +0300)] 
Minor changelog tweaks

10 years agoEdit changelog entries
Nick Mathewson [Wed, 22 Jul 2015 17:53:51 +0000 (13:53 -0400)] 
Edit changelog entries

10 years agoMove around and reformat items in 0.2.7.2-alpha changelog
Nick Mathewson [Wed, 22 Jul 2015 17:34:54 +0000 (13:34 -0400)] 
Move around and reformat items in 0.2.7.2-alpha changelog

10 years agoMerge branch 'ticket2325_squashed'
Nick Mathewson [Wed, 22 Jul 2015 16:24:21 +0000 (12:24 -0400)] 
Merge branch 'ticket2325_squashed'

10 years agoActually, write the torrc format in ABNF
Nick Mathewson [Tue, 21 Jul 2015 18:40:22 +0000 (14:40 -0400)] 
Actually, write the torrc format in ABNF

This should make it more clear what I meant, if you know how to read ABNF.

(Thanks to rl1987 for correcting numerous issues here)

10 years agoRemove casting of void pointers when handling signals.
cypherpunks [Thu, 2 Jul 2015 07:43:20 +0000 (09:43 +0200)] 
Remove casting of void pointers when handling signals.

10 years agoImprove the workqueue test help message.
cypherpunks [Tue, 21 Jul 2015 10:45:47 +0000 (12:45 +0200)] 
Improve the workqueue test help message.

The workqueue test help message has two issues. First, the message uses 4 space
indentation when 2 space indentation seems more common. Second, the help
message misses some options.

This commit fixes both issues.

10 years agoLimit the number of inflight items to the number of items.
cypherpunks [Tue, 21 Jul 2015 10:43:03 +0000 (12:43 +0200)] 
Limit the number of inflight items to the number of items.

10 years agochanges file for bug16631
Nick Mathewson [Tue, 21 Jul 2015 17:59:25 +0000 (13:59 -0400)] 
changes file for bug16631

10 years agoFix some potential memory leaks in the thread pool code.
cypherpunks [Tue, 7 Jul 2015 08:17:32 +0000 (10:17 +0200)] 
Fix some potential memory leaks in the thread pool code.

10 years agotypo fix; spotted by arma
Nick Mathewson [Mon, 20 Jul 2015 17:02:21 +0000 (13:02 -0400)] 
typo fix; spotted by arma

10 years agoDocument the torrc format as thoroughly as possible
Nick Mathewson [Mon, 20 Jul 2015 16:05:44 +0000 (12:05 -0400)] 
Document the torrc format as thoroughly as possible

Closes ticket 2325

10 years agoMerge remote-tracking branch 'public/bug16162_026'
Nick Mathewson [Mon, 20 Jul 2015 15:01:58 +0000 (11:01 -0400)] 
Merge remote-tracking branch 'public/bug16162_026'

10 years agoUse a more recommended syntax for the systemd unit file
Nick Mathewson [Mon, 20 Jul 2015 15:00:23 +0000 (11:00 -0400)] 
Use a more recommended syntax for the systemd unit file

closes 16162.

10 years agoFix testcases where scrypt APIs are used wrong.
rl1987 [Mon, 20 Jul 2015 09:58:03 +0000 (12:58 +0300)] 
Fix testcases where scrypt APIs are used wrong.

10 years agoAdd the remaining changes items to ChangeLog for 0.2.7.2-alpha
Nick Mathewson [Thu, 16 Jul 2015 20:06:25 +0000 (16:06 -0400)] 
Add the remaining changes items to ChangeLog for 0.2.7.2-alpha

10 years agoMake all changes files work with lintChanges
Nick Mathewson [Thu, 16 Jul 2015 20:04:56 +0000 (16:04 -0400)] 
Make all changes files work with lintChanges

10 years agoStart changelog sections that are straight copies from 0.2.6
Nick Mathewson [Thu, 16 Jul 2015 19:55:54 +0000 (15:55 -0400)] 
Start changelog sections that are straight copies from 0.2.6

10 years agoMerge remote-tracking branch 'public/feature_16580'
Nick Mathewson [Thu, 16 Jul 2015 19:48:41 +0000 (15:48 -0400)] 
Merge remote-tracking branch 'public/feature_16580'

10 years agoMerge remote-tracking branch 'public/ticket16543'
Nick Mathewson [Thu, 16 Jul 2015 19:47:00 +0000 (15:47 -0400)] 
Merge remote-tracking branch 'public/ticket16543'

10 years agoMerge remote-tracking branch 'sysrqb/bug15220_026_sysrqb'
Nick Mathewson [Thu, 16 Jul 2015 19:38:08 +0000 (15:38 -0400)] 
Merge remote-tracking branch 'sysrqb/bug15220_026_sysrqb'

10 years agoAdd my script to dump per-file or per-function coverage
Nick Mathewson [Thu, 16 Jul 2015 15:55:44 +0000 (11:55 -0400)] 
Add my script to dump per-file or per-function coverage

10 years agoBreak some wide lines
Nick Mathewson [Thu, 16 Jul 2015 15:11:21 +0000 (11:11 -0400)] 
Break some wide lines

10 years agoFix most check-spaces issues
Nick Mathewson [Thu, 16 Jul 2015 15:10:14 +0000 (11:10 -0400)] 
Fix most check-spaces issues

10 years agoUse C99 variadic macros when not on GCC.
Nick Mathewson [Wed, 15 Jul 2015 18:43:35 +0000 (14:43 -0400)] 
Use C99 variadic macros when not on GCC.

1) We already require C99.

2) This allows us to support MSVC again (thanks to Gisle Vanem for
   this part)

3) This change allows us to dump some rotten old compatibility code
   from log.c

10 years agoMerge branches 'feature_16582' and 'feature_16581'
Nick Mathewson [Wed, 15 Jul 2015 15:05:33 +0000 (11:05 -0400)] 
Merge branches 'feature_16582' and 'feature_16581'

10 years agoDon't allow INIT_ED_KEY_{NO_REPAIR,NEEDCERT} to be used together.
Nick Mathewson [Wed, 15 Jul 2015 14:45:40 +0000 (10:45 -0400)] 
Don't allow INIT_ED_KEY_{NO_REPAIR,NEEDCERT} to be used together.

We haven't implemented NO_REPAIR for NEEDCERT, and we don't need it:
but it's safest to stop any attempt to use it that way.

10 years agoAdd more EINVAL errno setting on key read failures
Nick Mathewson [Wed, 15 Jul 2015 14:35:29 +0000 (10:35 -0400)] 
Add more EINVAL errno setting on key read failures

Teor found these.  This is for part of #16582.

10 years agoAdd changes file for 8712; apply it to HSDir flag as well.
Nick Mathewson [Tue, 14 Jul 2015 18:03:30 +0000 (14:03 -0400)] 
Add changes file for 8712; apply it to HSDir flag as well.

10 years agoVote for relays to be fast and stable even when they aren't currently active.
Peter Retzlaff [Sun, 3 May 2015 17:38:13 +0000 (19:38 +0200)] 
Vote for relays to be fast and stable even when they aren't currently active.

10 years agoChange the name for the keypinning file; delete the old one if found
Nick Mathewson [Tue, 14 Jul 2015 15:33:35 +0000 (11:33 -0400)] 
Change the name for the keypinning file; delete the old one if found

This is a brute-force fix for #16580, wherein #16530 caused some
routers to do bad things with the old keypinning journal.

10 years agoAdd more consistency checks in load_ed_keys
Nick Mathewson [Tue, 14 Jul 2015 15:27:49 +0000 (11:27 -0400)] 
Add more consistency checks in load_ed_keys

Make sure that signing certs are signed by the right identity key,
to prevent a recurrence of #16530.  Also make sure that the master
identity key we find on disk matches the one we have in RAM, if we
have one.

This is for #16581.

10 years agoDo more consistency checks in ed_key_init_from_file()
Nick Mathewson [Tue, 14 Jul 2015 15:10:13 +0000 (11:10 -0400)] 
Do more consistency checks in ed_key_init_from_file()

When there is a signing key and the certificate lists a key, make
sure that the certificate lists the same signing key.

When there are public key and secret key stored in separate files,
make sure they match.

Use the right file name when we load an encrypted secret key and
then find a problem with it.

This is part of 16581.

10 years agoIf loading an ed25519 master key fails with errno != ENOENT, give up.
Nick Mathewson [Tue, 14 Jul 2015 14:36:39 +0000 (10:36 -0400)] 
If loading an ed25519 master key fails with errno != ENOENT, give up.

This implements feature 16582: if we get EMFILE or something when
loading our master key, we should not at that point attempt to
overwrite it.

10 years agoPreserve errno when loading encrypted ed25519 keys.
Nick Mathewson [Tue, 14 Jul 2015 14:23:07 +0000 (10:23 -0400)] 
Preserve errno when loading encrypted ed25519 keys.

10 years agoMake file-reading and key-reading preserve errno
Nick Mathewson [Tue, 14 Jul 2015 14:18:52 +0000 (10:18 -0400)] 
Make file-reading and key-reading preserve errno

This is an important part of #16582.

10 years agoRemove empty rend_service_validate_intro_early function
John Brooks [Tue, 14 Jul 2015 06:28:25 +0000 (02:28 -0400)] 
Remove empty rend_service_validate_intro_early function

10 years agoRename ambiguous introduction point functions
John Brooks [Tue, 14 Jul 2015 06:22:23 +0000 (02:22 -0400)] 
Rename ambiguous introduction point functions

Task #15824

10 years agoTry to convince coverity not to worry about this loop either
Nick Mathewson [Sun, 12 Jul 2015 21:01:17 +0000 (17:01 -0400)] 
Try to convince coverity not to worry about this loop either

10 years agoTry to convince coverity not to worryh about this loop
Nick Mathewson [Sun, 12 Jul 2015 21:00:45 +0000 (17:00 -0400)] 
Try to convince coverity not to worryh about this loop

10 years agoTell coverity to tolerate ed25519_verify
Nick Mathewson [Sun, 12 Jul 2015 20:59:37 +0000 (16:59 -0400)] 
Tell coverity to tolerate ed25519_verify

10 years agoMerge remote-tracking branch 'origin/maint-0.2.6'
Nick Mathewson [Sun, 12 Jul 2015 20:37:59 +0000 (16:37 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.6'

This is an 'ours' merge, to avoid taking the bump to 0.2.6.10-dev

10 years agoBump maint-0.2.6 to 0.2.6.10-dev
Nick Mathewson [Sun, 12 Jul 2015 20:37:20 +0000 (16:37 -0400)] 
Bump maint-0.2.6 to 0.2.6.10-dev

10 years agoForward-port the changelog and releasenotes
Nick Mathewson [Sun, 12 Jul 2015 20:34:30 +0000 (16:34 -0400)] 
Forward-port the changelog and releasenotes

10 years agoOkay, this time it was my fault
Nick Mathewson [Sun, 12 Jul 2015 19:44:43 +0000 (15:44 -0400)] 
Okay, this time it was my fault

10 years agoFine, mingw! fine! are you happy now??
Nick Mathewson [Sun, 12 Jul 2015 19:30:35 +0000 (15:30 -0400)] 
Fine, mingw! fine! are you happy now??

10 years agoThis should be the last SecureZeroMemory fix
Nick Mathewson [Sun, 12 Jul 2015 19:14:43 +0000 (15:14 -0400)] 
This should be the last SecureZeroMemory fix

10 years agoDammit, autoconf!
Nick Mathewson [Sun, 12 Jul 2015 19:02:43 +0000 (15:02 -0400)] 
Dammit, autoconf!

10 years agoDisable -Wstack-protector diagnostics in curve25519-donna-helpers.h
Nick Mathewson [Sun, 12 Jul 2015 18:48:48 +0000 (14:48 -0400)] 
Disable -Wstack-protector diagnostics in curve25519-donna-helpers.h

This was causing a false positive on our arm builders.

10 years agoNth time is maybe the charm for fixing windows readpassword build errors
Nick Mathewson [Sun, 12 Jul 2015 18:34:11 +0000 (14:34 -0400)] 
Nth time is maybe the charm for fixing windows readpassword build errors

10 years agoMerge remote-tracking branch 'origin/maint-0.2.6'
Nick Mathewson [Sun, 12 Jul 2015 17:34:22 +0000 (13:34 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.6'

This is an "ours" merge to avoid bumping the version number in master.

10 years agoBump maint-0.2.6 to 0.2.6.10
Nick Mathewson [Sun, 12 Jul 2015 17:33:47 +0000 (13:33 -0400)] 
Bump maint-0.2.6 to 0.2.6.10

10 years agonote some dead code in set_max_file_descriptors
Nick Mathewson [Sat, 11 Jul 2015 20:53:32 +0000 (16:53 -0400)] 
note some dead code in set_max_file_descriptors

10 years agoFix a leak in test_microdesc (CID 1311631)
Nick Mathewson [Sat, 11 Jul 2015 20:47:21 +0000 (16:47 -0400)] 
Fix a leak in test_microdesc (CID 1311631)

10 years agoTry one more one more time to get tor-ci-windows working
Nick Mathewson [Fri, 10 Jul 2015 13:57:22 +0000 (09:57 -0400)] 
Try one more one more time to get tor-ci-windows working

Apparently its mingw headers are missing some stuff.

10 years agoAttempt yet again to make the tor-ci-windows builder happy
Nick Mathewson [Fri, 10 Jul 2015 13:16:32 +0000 (09:16 -0400)] 
Attempt yet again to make the tor-ci-windows builder happy

10 years agoRemove the HidServDirV2 and VoteOnHidServDirectoriesV2 options
Nick Mathewson [Fri, 10 Jul 2015 13:03:56 +0000 (09:03 -0400)] 
Remove the HidServDirV2 and VoteOnHidServDirectoriesV2 options

(Mark them as obsolete)

Closes 16543.

10 years agoFix missing-macro errors
Nick Mathewson [Thu, 9 Jul 2015 20:34:51 +0000 (16:34 -0400)] 
Fix missing-macro errors

10 years agoMerge branch 'libscrypt_eq_openssl_squashed'
Nick Mathewson [Thu, 9 Jul 2015 20:31:42 +0000 (16:31 -0400)] 
Merge branch 'libscrypt_eq_openssl_squashed'

10 years agoAdding changes file for 16189.
rl1987 [Tue, 7 Jul 2015 17:58:24 +0000 (20:58 +0300)] 
Adding changes file for 16189.

10 years agoAssert interoperability betweeen libscrypt and OpenSSL EBP_PBE_scrypt().
rl1987 [Tue, 7 Jul 2015 17:18:45 +0000 (20:18 +0300)] 
Assert interoperability betweeen libscrypt and OpenSSL EBP_PBE_scrypt().

Add a new and slow unit test that checks if libscrypt_scrypt() and
EBP_PBE_scrypt() yield the same keys from test vectors.

squash! Assert interoperability betweeen libscrypt and OpenSSL EBP_PBE_scrypt().

squash! Assert interoperability betweeen libscrypt and OpenSSL EBP_PBE_scrypt().

squash! Assert interoperability betweeen libscrypt and OpenSSL EBP_PBE_scrypt().

10 years agoMore windows header stuff. Will it work this time?
Nick Mathewson [Thu, 9 Jul 2015 18:58:16 +0000 (14:58 -0400)] 
More windows header stuff. Will it work this time?

10 years agoFix dumb windows compilation bug in d9052c62
Nick Mathewson [Thu, 9 Jul 2015 17:36:27 +0000 (13:36 -0400)] 
Fix dumb windows compilation bug in d9052c62

10 years agoRepair make dist-check
Nick Mathewson [Thu, 9 Jul 2015 17:03:21 +0000 (13:03 -0400)] 
Repair make dist-check

10 years agoMerge remote-tracking branch 'yawning/feature16467_9663'
Nick Mathewson [Thu, 9 Jul 2015 16:53:55 +0000 (12:53 -0400)] 
Merge remote-tracking branch 'yawning/feature16467_9663'

10 years agoMerge branch 'bug4862_027_04_squashed'
Nick Mathewson [Thu, 9 Jul 2015 16:05:14 +0000 (12:05 -0400)] 
Merge branch 'bug4862_027_04_squashed'

10 years agoFix comments in rendservice.c
David Goulet [Mon, 29 Jun 2015 15:12:25 +0000 (11:12 -0400)] 
Fix comments in rendservice.c

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
10 years agoCount intro circuit and not only established ones
David Goulet [Mon, 15 Jun 2015 21:11:57 +0000 (17:11 -0400)] 
Count intro circuit and not only established ones

When cleaning up extra circuits that we've opened for performance reason, we
need to count all the introduction circuit and not only the established ones
else we can end up with too many introduction points.

This also adds the check for expiring nodes when serving an INTRODUCE cell
since it's possible old clients are still using them before we have time to
close them.

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
10 years agoUpload descriptor when all intro points are ready
David Goulet [Mon, 1 Jun 2015 17:17:37 +0000 (13:17 -0400)] 
Upload descriptor when all intro points are ready

To upload a HS descriptor, this commits makes it that we wait for all
introduction point to be fully established.

Else, the HS ends up uploading a descriptor that may contain intro points
that are not yet "valid" meaning not yet established or proven to work. It
could also trigger three uploads for the *same* descriptor if every intro
points takes more than 30 seconds to establish because of desc_is_dirty
being set at each intro established.

To achieve that, n_intro_points_established varialbe is added to the
rend_service_t object that is incremented when we established introduction
point and decremented when we remove a valid intro point from our list.

The condition to upload a descriptor also changes to test if all intro
points are ready by making sure we have equal or more wanted intro points
that are ready.

The desc_id_dirty flag is kept to be able to still use the
RendInitialPostPeriod option.

This partially fixes #13483.

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
10 years agoReuse intro points that failed but are still valid
David Goulet [Mon, 1 Jun 2015 16:08:13 +0000 (12:08 -0400)] 
Reuse intro points that failed but are still valid

There is a case where if the introduction circuit fails but the node is
still in the consensus, we clean up the intro point and choose an other one.
This commit fixes that by trying to reuse the existing intro point with a
maximum value of retry.

A retry_nodes list is added to rend_services_introduce() and when we remove
an invalid intro points that fits the use case mentionned before, we add the
node to the retry list instead of removing it. Then, we retry on them before
creating new ones.

This means that the requirement to remove an intro point changes from "if no
intro circuit" to "if no intro circuit then if no node OR we've reached our
maximum circuit creation count".

For now, the maximum retries is set to 3 which it completely arbitrary. It
should also at some point be tied to the work done on detecting if our
network is down or not.

Fixes #8239

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
10 years agoRefactor rend_services_introduce()
David Goulet [Fri, 29 May 2015 21:45:45 +0000 (17:45 -0400)] 
Refactor rend_services_introduce()

The reasoning for refactoring this function is that removing the
introduction point adaptative algorithm (#4862) ended up changing quite a
bit rend_services_introduce(). Also, to fix some open issues (#8239, #8864
and #13483), this work had to be done.

First, this removes time_expiring variable in an intro point object and
INTRO_POINT_EXPIRATION_GRACE_PERIOD trickery and use an expiring_nodes list
where intro nodes that should expire are moved to that list and cleaned up
only once the new descriptor is successfully uploaded. The previous scheme
was adding complexity and arbitrary timing to when we expire an intro point.
We keep the intro points until we are sure that the new descriptor is
uploaded and thus ready to be used by clients. For this,
rend_service_desc_has_uploaded() is added to notify the HS subsystem that
the descriptor has been successfully uploaded. The purpose of this function
is to cleanup the expiring nodes and circuits if any.

Secondly, this adds the remove_invalid_intro_points() function in order to
split up rend_services_introduce() a bit with an extra modification to it
that fixes #8864. We do NOT close the circuit nor delete the intro point if
the circuit is still alive but the node was removed from the consensus. Due
to possible information leak, we let the circuit and intro point object
expire instead.

Finally, the whole code flow is simplified and large amount of documentation
has been added to mostly explain the why of things in there.

Fixes #8864

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
10 years agoAlways use the sandbox in tor_open_cloexec
teor [Tue, 7 Jul 2015 16:17:31 +0000 (02:17 +1000)] 
Always use the sandbox in tor_open_cloexec

Use the sandbox in tor_open_cloexec, whether or not O_CLOEXEC is defined.
Patch by "teor". Fix on 0.2.3.1-alpha.

10 years agoCheck if OpenSSL includes scrypt.
rl1987 [Mon, 6 Jul 2015 18:31:01 +0000 (21:31 +0300)] 
Check if OpenSSL includes scrypt.

10 years agoIntegrate and enable ed25519-donna.
Yawning Angel [Mon, 6 Jul 2015 10:11:10 +0000 (10:11 +0000)] 
Integrate and enable ed25519-donna.

The runtime sanity checking is slightly different from the optimized
basepoint stuff in that it uses a given implementation's self tests if
available, and checks if signing/verification works with a test vector
from the IETF EdDSA draft.

The unit tests include a new testcase that will fuzz donna against ref0,
including the blinding and curve25519 key conversion routines.  If this
is something that should be done at runtime (No?), the code can be
stolen from there.

Note: Integrating batch verification is not done yet.

10 years agoIntegrate the accelerated Curve25519 scalar basemult.
Yawning Angel [Mon, 6 Jul 2015 09:57:23 +0000 (09:57 +0000)] 
Integrate the accelerated Curve25519 scalar basemult.

Integration work scavanged from nickm's `ticket8897_9663_v2` branch,
with minor modifications.  Tor will still sanity check the output but
now also attempts to catch extreme breakage by spot checking the
optimized implementation vs known values from the NaCl documentation.

Implements feature 9663.

10 years agoAdd Curve25519->Ed25519 support to ed25519-donna (Not yet used).
Yawning Angel [Mon, 6 Jul 2015 09:48:00 +0000 (09:48 +0000)] 
Add Curve25519->Ed25519 support to ed25519-donna (Not yet used).

This needs to be done to allow for the possibility of removing the
ref10 code at a later date, though it is not performance critical.
When integrated by kludging it into tor, it passes unit tests, and is
twice as fast.