[tor-commits] [chutney/master] Remove all DownloadSchedule torrc options

2018-05-03 Thread teor
commit 57dd950901c51afdc6c9907961467d30081ecb5d
Author: teor 
Date:   Fri May 4 14:04:28 2018 +1000

Remove all DownloadSchedule torrc options

Chutney used to set these options to 0, ...

Tor's default for these options is 0, ...
(Except for ClientBootstrapConsensusAuthorityDownloadSchedule, which
chutney doesn't use.)

Tor 0.2.9 obsoleted these options by moving to exponential backoff,
ignoring every delay in the schedule after the first delay.

Tor 0.3.4 has replaced these options with aliases, so chutney warns that
they aren't real options any more.

Closes #25844.
---
 torrc_templates/bridgeclient.tmpl  |  7 ---
 torrc_templates/client.tmpl| 10 --
 torrc_templates/relay-non-dir.tmpl | 10 --
 3 files changed, 27 deletions(-)

diff --git a/torrc_templates/bridgeclient.tmpl 
b/torrc_templates/bridgeclient.tmpl
index 4c10c54..b524efd 100644
--- a/torrc_templates/bridgeclient.tmpl
+++ b/torrc_templates/bridgeclient.tmpl
@@ -7,10 +7,3 @@ UseBridges 1
 #UseMicrodescriptors 0
 
 ${bridges}
-
-# Like TestingClientDownloadSchedule, but for bridge clients
-# Try to download after:
-# the minimum initial consensus time to start with,
-# a few eager fetches,
-# then half the minimum testing consensus interval
-TestingBridgeDownloadSchedule 0, 5
diff --git a/torrc_templates/client.tmpl b/torrc_templates/client.tmpl
index 3aff6cb..aa86c01 100644
--- a/torrc_templates/client.tmpl
+++ b/torrc_templates/client.tmpl
@@ -1,12 +1,2 @@
 ${include:common.i}
 SocksPort $socksport
-
-#NOTE: Setting TestingClientConsensusDownloadSchedule doesn't
-#  help -- dl_stats.schedule is not DL_SCHED_CONSENSUS
-#  at boostrap time.
-# Try to download after:
-# the minimum initial consensus time to start with,
-# a few eager fetches,
-# then half the minimum testing consensus interval
-TestingClientDownloadSchedule 0, 5
-TestingClientConsensusDownloadSchedule 0, 5
diff --git a/torrc_templates/relay-non-dir.tmpl 
b/torrc_templates/relay-non-dir.tmpl
index 560ebdf..848bc38 100644
--- a/torrc_templates/relay-non-dir.tmpl
+++ b/torrc_templates/relay-non-dir.tmpl
@@ -6,16 +6,6 @@ Address $ip
 # Must be included before exit-v{4,6}.i
 ExitRelay 0
 
-#NOTE: Setting TestingServerConsensusDownloadSchedule doesn't
-#  help -- dl_stats.schedule is not DL_SCHED_CONSENSUS
-#  at boostrap time.
-# Try to download after:
-# the minimum initial consensus time to start with,
-# a few eager fetches,
-# then half the minimum testing consensus interval
-TestingServerDownloadSchedule 0, 5
-TestingServerConsensusDownloadSchedule 0, 5
-
 # These options are set here so they apply to IPv4 and IPv6 Exits
 #
 # Tell Exits to avoid using DNS: otherwise, chutney will fail if DNS fails

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] I should have tested before I pushed.

2018-05-03 Thread nickm
commit 6f8b961a65eea3ed5962da1a7816ad533256d113
Author: Nick Mathewson 
Date:   Thu May 3 20:16:53 2018 -0400

I should have tested before I pushed.
---
 src/rust/include.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/rust/include.am b/src/rust/include.am
index 4bc07b05c..152ac5cc3 100644
--- a/src/rust/include.am
+++ b/src/rust/include.am
@@ -15,8 +15,8 @@ EXTRA_DIST +=\
src/rust/protover/protover.rs \
src/rust/protover/tests/protover.rs \
src/rust/rand/Cargo.toml \
-   src/rust/rand/lib.toml \
-   src/rust/rand/rng.toml \
+   src/rust/rand/lib.rs \
+   src/rust/rand/rng.rs \
src/rust/smartlist/Cargo.toml \
src/rust/smartlist/lib.rs \
src/rust/smartlist/smartlist.rs \

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [stem/master] Add DirectoryAuthority.from_remote()

2018-05-03 Thread atagar
commit 4dfb17200a902ef7c4f4e075da36c833d850be76
Author: Damian Johnson 
Date:   Thu May 3 14:51:31 2018 -0700

Add DirectoryAuthority.from_remote()

Recently teor split tor's directory authority information into its own file,
simplifying parsing a great deal...

  https://gitweb.torproject.org/tor.git/plain/src/or/auth_dirs.inc

Like fallbacks, adding a DirectoryAuthority.from_remote() function which
downloads and parses tor's current authority data. This also makes a
'is Stem's cached dirauth data up to date' test a cinch. ;P

While whipping this up I found a handful of additional things I'd like to
follow this up with...

  * Our stem.descriptor.remote module has grown way too large. When I first
added directory authorities it was just a small constant. But now with
parsing and fallback directories our module's 1707 lines. Way past the
point where we should split things up.

I'll move dirauths and fallbacks to their own files, with aliases for
temporary backward compatability (those aliases will be dropped in
Stem 2.0).

  * This new parser needs unit test coverage. Probably similar to our tests 
for
FallbackDirectory.from_remote().

  * We should replace our get_authorities() function with
DirectoryAuthority.from_cache() for consistancy with the
FallbackDirectory and Manual classes.

  * Now that dirauths note IPv6 ORPorts we should move that attribute from 
the
FallbackDirectory class up to the common Directory parent.
---
 stem/descriptor/remote.py   | 163 +---
 test/integ/descriptor/remote.py |  30 +++-
 test/unit/descriptor/remote.py  |   4 +-
 3 files changed, 183 insertions(+), 14 deletions(-)

diff --git a/stem/descriptor/remote.py b/stem/descriptor/remote.py
index 480297f1..a656e354 100644
--- a/stem/descriptor/remote.py
+++ b/stem/descriptor/remote.py
@@ -167,9 +167,15 @@ LZMA_UNAVAILABLE_MSG = 'LZMA compression requires the lzma 
module (https://docs.
 MAX_FINGERPRINTS = 96
 MAX_MICRODESCRIPTOR_HASHES = 90
 
-GITWEB_FALLBACK_DIR_URL = 
'https://gitweb.torproject.org/tor.git/plain/src/or/fallback_dirs.inc'
+GITWEB_AUTHORITY_URL = 
'https://gitweb.torproject.org/tor.git/plain/src/or/auth_dirs.inc'
+GITWEB_FALLBACK_URL = 
'https://gitweb.torproject.org/tor.git/plain/src/or/fallback_dirs.inc'
 CACHE_PATH = os.path.join(os.path.dirname(__file__), 
'fallback_directories.cfg')
 
+AUTHORITY_NAME = re.compile('"(\S+) orport=(\d+) .*"')
+AUTHORITY_V3IDENT = re.compile('"v3ident=([\dA-F]{40}) "')
+AUTHORITY_IPV6 = re.compile('"ipv6=\[([\da-f:]+)\]:(\d+) "')
+AUTHORITY_ADDR = re.compile('"([\d\.]+):(\d+) ([\dA-F ]{49})",')
+
 FALLBACK_DIV = '/* = */'
 FALLBACK_MAPPING = re.compile('/\*\s+(\S+)=(\S*)\s+\*/')
 
@@ -1088,6 +1094,143 @@ class DirectoryAuthority(Directory):
 self.v3ident = v3ident
 self.is_bandwidth_authority = is_bandwidth_authority
 
+  @staticmethod
+  def from_remote(timeout = 60):
+"""
+Reads and parses tor's latest directory authority data `from
+gitweb.torproject.org
+`_.
+Note that while convenient, this reliance on GitWeb means you should alway
+call with a fallback, such as...
+
+::
+
+  try:
+fallback_directories = DirectoryAuthority.from_remote()
+  except IOError:
+fallback_directories = get_authorities()
+
+Authorities provided through this method will not have a
+**is_bandwidth_authority** value set.
+
+.. versionadded:: 1.7.0
+
+:param int timeout: seconds to wait before timing out the request
+
+:returns: **dict** of **str** nicknames to their
+  :class:`~stem.descriptor.remote.DirectoryAuthority`
+
+:raises: **IOError** if unable to retrieve the directory authorities
+"""
+
+try:
+  lines = str_tools._to_unicode(urllib.urlopen(GITWEB_AUTHORITY_URL, 
timeout = timeout).read()).splitlines()
+except:
+  exc = sys.exc_info()[1]
+  raise IOError("Unable to download tor's directory authorities from %s: 
%s" % (GITWEB_AUTHORITY_URL, exc))
+
+if not lines:
+  raise IOError('%s did not have any content' % GITWEB_AUTHORITY_URL)
+
+results = {}
+
+while lines:
+  section = DirectoryAuthority._pop_section(lines)
+
+  if section:
+try:
+  authority = DirectoryAuthority._from_str('\n'.join(section))
+  results[authority.nickname] = authority
+except ValueError as exc:
+  raise IOError(str(exc))
+
+return results
+
+  @staticmethod
+  def _from_str(content):
+"""
+Parses authority from its textual representation. For example...
+
+::
+
+  "moria1 orport=9101 "
+"v3ident=D586D18309DED4CD6D57C18FDB97EFA96D330566 "
+"128.31.0.39:9131 9695 DFC3 5FFE B861 329B 9F1A B04C 4639 7020 CE31",

[tor-commits] [tor/master] Merge remote-tracking branch 'github/ticket25995'

2018-05-03 Thread nickm
commit 08e525c198c52bb57f154e79326a9b123ef55d91
Merge: 80b9a589b 19b53e264
Author: Nick Mathewson 
Date:   Thu May 3 16:52:09 2018 -0400

Merge remote-tracking branch 'github/ticket25995'

 changes/ticket25995 |  5 +
 src/test/test.c | 19 +++
 2 files changed, 24 insertions(+)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Use a deterministic PRNG in test_circuit_timeout()

2018-05-03 Thread nickm
commit 19b53e264527a1506a21e7b563c47500ac304450
Author: Nick Mathewson 
Date:   Tue May 1 19:34:21 2018 -0400

Use a deterministic PRNG in test_circuit_timeout()

I'd prefer not to do this for randomized tests, but as things stand
with this test, it produces nondeterministic test coverage.

Closes ticket 25995; bugfix on 0.2.2.2-alpha when this test was
introduced.
---
 changes/ticket25995 |  5 +
 src/test/test.c | 19 +++
 2 files changed, 24 insertions(+)

diff --git a/changes/ticket25995 b/changes/ticket25995
new file mode 100644
index 0..855020bd3
--- /dev/null
+++ b/changes/ticket25995
@@ -0,0 +1,5 @@
+  o Minor bugfixes (tests):
+- While running the circuit_timeout test, fix the PRNG to a deterministic
+  AES stream, so that the test coverage from this test will itself be
+  deterministic.  Fixes bug 25995; bugfix on 0.2.2.2-alpha.
+
diff --git a/src/test/test.c b/src/test/test.c
index 2963f169c..3c6e0a45e 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -349,6 +349,18 @@ test_onion_queues(void *arg)
   tor_free(onionskin);
 }
 
+static crypto_cipher_t *crypto_rand_aes_cipher = NULL;
+
+// Mock replacement for crypto_rand: Generates bytes from a provided AES_CTR
+// cipher in crypto_rand_aes_cipher.
+static void
+crypto_rand_deterministic_aes(char *out, size_t n)
+{
+  tor_assert(crypto_rand_aes_cipher);
+  memset(out, 0, n);
+  crypto_cipher_crypt_inplace(crypto_rand_aes_cipher, out, n);
+}
+
 static void
 test_circuit_timeout(void *arg)
 {
@@ -378,6 +390,11 @@ test_circuit_timeout(void *arg)
 
   state = or_state_new();
 
+  // Use a deterministic RNG here, or else we'll get nondeterministic
+  // coverage in some of the circuitstats functions.
+  MOCK(crypto_rand, crypto_rand_deterministic_aes);
+  crypto_rand_aes_cipher = crypto_cipher_new("xyzzyplughplover");
+
   circuitbuild_running_unit_tests();
 #define timeout0 (build_time_t)(30*1000.0)
   initial.Xm = 3000;
@@ -512,6 +529,8 @@ test_circuit_timeout(void *arg)
   circuit_build_times_free_timeouts();
   or_state_free(state);
   teardown_periodic_events();
+  UNMOCK(crypto_rand);
+  crypto_cipher_free(crypto_rand_aes_cipher);
 }
 
 /** Test encoding and parsing of rendezvous service descriptors. */



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge remote-tracking branch 'dgoulet/ticket25914_034_01'

2018-05-03 Thread nickm
commit 80b9a589bb351659252faa9793176ada6c9ce914
Merge: 2f269bfaf 1a181a476
Author: Nick Mathewson 
Date:   Thu May 3 16:48:03 2018 -0400

Merge remote-tracking branch 'dgoulet/ticket25914_034_01'

 src/or/networkstatus.c | 14 +++---
 1 file changed, 3 insertions(+), 11 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Remove dead code in networkstatus.c

2018-05-03 Thread nickm
commit 1a181a476e623cd6c1bc71173bb2d3d769aa1325
Author: David Goulet 
Date:   Wed Apr 25 09:35:32 2018 -0400

Remove dead code in networkstatus.c

We can't end up in the removed else {} condition since we first validate the
flavor we get and then we validate the flavor we parse from the given
consensus which means we can only handle the two flavors of the if/elseif
conditions.

Fixes #25914

Signed-off-by: David Goulet 
---
 src/or/networkstatus.c | 14 +++---
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index b0db0cecb..d545ac120 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -1841,17 +1841,9 @@ networkstatus_set_current_consensus(const char 
*consensus,
   current_valid_after = current_md_consensus->valid_after;
 }
   } else {
-cached_dir_t *cur;
-char buf[128];
-tor_snprintf(buf, sizeof(buf), "cached-%s-consensus", flavor);
-consensus_fname = get_cachedir_fname(buf);
-tor_snprintf(buf, sizeof(buf), "unverified-%s-consensus", flavor);
-unverified_fname = get_cachedir_fname(buf);
-cur = dirserv_get_consensus(flavor);
-if (cur) {
-  current_digests = >digests;
-  current_valid_after = cur->published;
-}
+tor_assert_nonfatal_unreached();
+result = -2;
+goto done;
   }
 
   if (current_digests &&



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Add src/rust/rand to include.am

2018-05-03 Thread nickm
commit 2f269bfaf1d1d89324e8936425bf19bb64bcb06e
Author: Nick Mathewson 
Date:   Thu May 3 16:16:09 2018 -0400

Add src/rust/rand to include.am
---
 src/rust/include.am | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/rust/include.am b/src/rust/include.am
index f1aa0bd5a..4bc07b05c 100644
--- a/src/rust/include.am
+++ b/src/rust/include.am
@@ -14,6 +14,9 @@ EXTRA_DIST +=\
src/rust/protover/lib.rs \
src/rust/protover/protover.rs \
src/rust/protover/tests/protover.rs \
+   src/rust/rand/Cargo.toml \
+   src/rust/rand/lib.toml \
+   src/rust/rand/rng.toml \
src/rust/smartlist/Cargo.toml \
src/rust/smartlist/lib.rs \
src/rust/smartlist/smartlist.rs \

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Move some includes around to try to fix windows builds

2018-05-03 Thread nickm
commit 2d07aef3cc4ed21b7d66602912f74c287f5cb395
Author: Nick Mathewson 
Date:   Thu May 3 16:14:38 2018 -0400

Move some includes around to try to fix windows builds
---
 src/common/crypto_rand.c | 4 ++--
 src/common/crypto_util.c | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/common/crypto_rand.c b/src/common/crypto_rand.c
index 66506235a..5abf0b096 100644
--- a/src/common/crypto_rand.c
+++ b/src/common/crypto_rand.c
@@ -14,13 +14,13 @@
 #ifndef CRYPTO_RAND_PRIVATE
 #define CRYPTO_RAND_PRIVATE
 
+#include "crypto_rand.h"
+
 #ifdef _WIN32
 #include 
 #include 
 #endif /* defined(_WIN32) */
 
-#include "crypto_rand.h"
-
 #include "container.h"
 #include "compat.h"
 #include "compat_openssl.h"
diff --git a/src/common/crypto_util.c b/src/common/crypto_util.c
index c09afe6ee..b0d5b6b2f 100644
--- a/src/common/crypto_util.c
+++ b/src/common/crypto_util.c
@@ -13,14 +13,16 @@
 #ifndef CRYPTO_UTIL_PRIVATE
 #define CRYPTO_UTIL_PRIVATE
 
+#include "crypto_util.h"
+
 #include 
 
 #ifdef _WIN32
+#include 
 #include 
 #include 
 #endif /* defined(_WIN32) */
 
-#include "crypto_util.h"
 #include "util.h"
 
 DISABLE_GCC_WARNING(redundant-decls)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-openpgp-applet_completed] Update translations for tails-openpgp-applet_completed

2018-05-03 Thread translation
commit 2c1314fd38db0c565f1146ffb259d8980659d93a
Author: Translation commit bot 
Date:   Thu May 3 19:18:12 2018 +

Update translations for tails-openpgp-applet_completed
---
 ta/openpgp-applet.pot | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ta/openpgp-applet.pot b/ta/openpgp-applet.pot
index 00862605f..82e53ec43 100644
--- a/ta/openpgp-applet.pot
+++ b/ta/openpgp-applet.pot
@@ -9,8 +9,8 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: ta...@boum.org\n"
 "POT-Creation-Date: 2017-08-05 15:07-0400\n"
-"PO-Revision-Date: 2018-01-23 15:43+\n"
-"Last-Translator: Senthil Kumar \n"
+"PO-Revision-Date: 2018-05-03 18:52+\n"
+"Last-Translator: Selva Makilan <66makila...@gmail.com>\n"
 "Language-Team: Tamil (http://www.transifex.com/otf/torproject/language/ta/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-openpgp-applet] Update translations for tails-openpgp-applet

2018-05-03 Thread translation
commit 17b4b22e34c7c50e6d243d473c78de713e326685
Author: Translation commit bot 
Date:   Thu May 3 19:18:05 2018 +

Update translations for tails-openpgp-applet
---
 ta/openpgp-applet.pot | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ta/openpgp-applet.pot b/ta/openpgp-applet.pot
index 00862605f..82e53ec43 100644
--- a/ta/openpgp-applet.pot
+++ b/ta/openpgp-applet.pot
@@ -9,8 +9,8 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: ta...@boum.org\n"
 "POT-Creation-Date: 2017-08-05 15:07-0400\n"
-"PO-Revision-Date: 2018-01-23 15:43+\n"
-"Last-Translator: Senthil Kumar \n"
+"PO-Revision-Date: 2018-05-03 18:52+\n"
+"Last-Translator: Selva Makilan <66makila...@gmail.com>\n"
 "Language-Team: Tamil (http://www.transifex.com/otf/torproject/language/ta/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] rust: Expose our (P)RNGs in Rust and provide safe wrappers.

2018-05-03 Thread nickm
commit 49639b282602c5389e30f906f535c29ddaa62308
Author: Isis Lovecruft 
Date:   Tue Apr 10 19:05:42 2018 +

rust: Expose our (P)RNGs in Rust and provide safe wrappers.

 * FIXES #24660: https://bugs.torproject.org/24660
---
 src/rust/Cargo.lock  |  18 
 src/rust/Cargo.toml  |   4 +-
 src/rust/external/crypto_rand.rs |  95 
 src/rust/external/lib.rs |   4 +-
 src/rust/rand/Cargo.toml |  24 +
 src/rust/rand/lib.rs |  15 
 src/rust/rand/prng.rs| 184 +++
 src/rust/rand/rng.rs |  94 
 8 files changed, 436 insertions(+), 2 deletions(-)

diff --git a/src/rust/Cargo.lock b/src/rust/Cargo.lock
index 91c0502c6..714e29edc 100644
--- a/src/rust/Cargo.lock
+++ b/src/rust/Cargo.lock
@@ -23,6 +23,23 @@ dependencies = [
 ]
 
 [[package]]
+name = "rand"
+version = "0.0.1"
+dependencies = [
+ "external 0.0.1",
+ "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand_core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tor_allocate 0.0.1",
+ "tor_log 0.1.0",
+ "tor_util 0.0.1",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index;
+
+[[package]]
 name = "smartlist"
 version = "0.0.1"
 dependencies = [
@@ -63,3 +80,4 @@ dependencies = [
 
 [metadata]
 "checksum libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" 
= "f54263ad99207254cf58b5f701ecb432c717445ea2ee8af387334bdd1a03fdff"
+"checksum rand_core 0.1.0 
(registry+https://github.com/rust-lang/crates.io-index)" = 
"0224284424a4b818387b58d59336c288f99b48f69681aa60cc681fe038bbca5d"
diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml
index 4ae8033eb..d47cd6422 100644
--- a/src/rust/Cargo.toml
+++ b/src/rust/Cargo.toml
@@ -1,6 +1,8 @@
 [workspace]
 members = ["tor_util", "protover", "smartlist", "external", "tor_allocate",
-"tor_rust", "tor_log"]
+"tor_rust", "tor_log",
+"rand",
+]
 
 [profile.release]
 debug = true
diff --git a/src/rust/external/crypto_rand.rs b/src/rust/external/crypto_rand.rs
new file mode 100644
index 0..19b9ab281
--- /dev/null
+++ b/src/rust/external/crypto_rand.rs
@@ -0,0 +1,95 @@
+// Copyright (c) 2018, The Tor Project, Inc.
+// Copyright (c) 2018, isis agora lovecruft
+// See LICENSE for licensing information
+
+//! Bindings to external (P)RNG interfaces and utilities in 
+//! src/common/crypto_rand.[ch].
+//!
+//! We wrap our C implementations in src/common/crypto_rand.[ch] here in order
+//! to provide wrappers with native Rust types, and then provide more Rusty
+//! types and and trait implementations in src/rust/crypto/rand/.
+
+use std::time::Duration;
+
+use libc::c_char;
+use libc::c_double;
+use libc::c_int;
+use libc::c_uint;
+use libc::c_void;
+use libc::size_t;
+use libc::time_t;
+use libc::uint8_t;
+use libc::uint64_t;
+
+extern "C" {
+fn crypto_seed_rng() -> c_int;
+fn crypto_strongest_rand(out: *mut uint8_t, out_len: size_t);
+fn crypto_rand_time_range(min: time_t, max: time_t) -> time_t;
+fn crypto_rand_double() -> c_double;
+// fn crypto_random_hostname(min_rand_len: c_int, max_rand_len: c_int,
+//   prefix: *const c_char, suffix: *const c_char) 
-> *mut c_char;
+}
+
+/// Seed OpenSSL's random number generator with bytes from the operating
+/// system.
+///
+/// # Returns
+///
+/// `true` on success; `false` on failure.
+pub fn c_tor_crypto_seed_rng() -> bool {
+let ret: c_int;
+
+unsafe {
+ret = crypto_seed_rng();
+}
+match ret {
+0 => return true,
+_ => return false,
+}
+}
+
+/// Fill the bytes of `dest` with strong random data.
+pub fn c_tor_crypto_strongest_rand(dest:  [u8]) {
+// We'll let the C side panic if the len is larger than
+// MAX_STRONGEST_RAND_SIZE, rather than potentially panicking here.  A
+// paranoid caller should assert on the length of dest *before* calling 
this
+// function.
+unsafe {
+crypto_strongest_rand(dest.as_mut_ptr(), dest.len() as size_t);
+}
+}
+
+/// Get a random time, in seconds since the Unix Epoch.
+///
+/// # Returns
+///
+/// A `std::time::Duration` of seconds since the Unix Epoch.
+pub fn c_tor_crypto_rand_time_range(min: , max: ) -> 
Duration {
+let ret: time_t;
+
+unsafe {
+ret = crypto_rand_time_range(min.as_secs() as time_t, max.as_secs() as 
time_t);
+}
+
+Duration::from_secs(ret as u64)
+}
+
+/// Return a pseudorandom 64-bit float, chosen uniformly from the range [0.0, 
1.0).
+pub fn c_tor_crypto_rand_double() -> f64 {
+unsafe {
+crypto_rand_double()
+}
+}
+
+#[cfg(test)]
+mod test {
+use super::*;
+
+#[test]
+fn test_layout_tor_weak_rng_t() {
+assert_eq!(::std::mem::size_of::(), 0usize,
+   concat!("Size of: ", stringify!(tor_weak_rng_t)));
+

[tor-commits] [tor/master] Update rust dependencies to latest version.

2018-05-03 Thread nickm
commit bd153e46408fa4f9432a5de1b1f5f106f00e34cf
Author: Nick Mathewson 
Date:   Thu May 3 13:55:55 2018 -0400

Update rust dependencies to latest version.
---
 src/ext/rust | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ext/rust b/src/ext/rust
index fbc0c2578..407590647 16
--- a/src/ext/rust
+++ b/src/ext/rust
@@ -1 +1 @@
-Subproject commit fbc0c25785696a25b9cbc09ed645cc8d404ee0f6
+Subproject commit 40759064756f668c25ad1347faa793fc0d6afe8b

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] refactor: Alphabetise some includes in /src/or/*.

2018-05-03 Thread nickm
commit e32fc0806d07b0ff83978132c56f7cbd1a2ad2ce
Author: Isis Lovecruft 
Date:   Fri Apr 6 21:42:15 2018 +

refactor: Alphabetise some includes in /src/or/*.
---
 src/or/addressmap.c  |  2 +-
 src/or/ext_orport.c  |  2 +-
 src/or/hs_client.c   | 28 ++--
 src/or/rendclient.c  |  4 ++--
 src/or/rendcommon.c  |  6 +++---
 src/or/routerparse.c | 16 
 6 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/src/or/addressmap.c b/src/or/addressmap.c
index f691ef9aa..3cd153307 100644
--- a/src/or/addressmap.c
+++ b/src/or/addressmap.c
@@ -23,8 +23,8 @@
 #include "control.h"
 #include "crypto_rand.h"
 #include "dns.h"
-#include "routerset.h"
 #include "nodelist.h"
+#include "routerset.h"
 
 /** A client-side struct to remember requests to rewrite addresses
  * to new addresses. These structs are stored in the hash table
diff --git a/src/or/ext_orport.c b/src/or/ext_orport.c
index 8fff0f955..b842442ca 100644
--- a/src/or/ext_orport.c
+++ b/src/or/ext_orport.c
@@ -20,11 +20,11 @@
 #include "or.h"
 #include "connection.h"
 #include "connection_or.h"
-#include "ext_orport.h"
 #include "control.h"
 #include "config.h"
 #include "crypto_rand.h"
 #include "crypto_util.h"
+#include "ext_orport.h"
 #include "main.h"
 #include "proto_ext_or.h"
 #include "util.h"
diff --git a/src/or/hs_client.c b/src/or/hs_client.c
index f07426052..26e8785d9 100644
--- a/src/or/hs_client.c
+++ b/src/or/hs_client.c
@@ -9,31 +9,31 @@
 #define HS_CLIENT_PRIVATE
 
 #include "or.h"
-#include "hs_circuit.h"
-#include "hs_ident.h"
+#include "circpathbias.h"
+#include "circuitbuild.h"
+#include "circuitlist.h"
+#include "circuituse.h"
+#include "config.h"
+#include "connection.h"
 #include "connection_edge.h"
 #include "container.h"
 #include "crypto_rand.h"
 #include "crypto_util.h"
-#include "rendclient.h"
-#include "hs_descriptor.h"
+#include "directory.h"
 #include "hs_cache.h"
 #include "hs_cell.h"
-#include "config.h"
-#include "directory.h"
+#include "hs_circuit.h"
 #include "hs_client.h"
 #include "hs_control.h"
-#include "router.h"
-#include "routerset.h"
-#include "circuitlist.h"
-#include "circuituse.h"
-#include "connection.h"
-#include "nodelist.h"
-#include "circpathbias.h"
+#include "hs_descriptor.h"
+#include "hs_ident.h"
 #include "hs_ntor.h"
-#include "circuitbuild.h"
 #include "networkstatus.h"
+#include "nodelist.h"
 #include "reasons.h"
+#include "rendclient.h"
+#include "router.h"
+#include "routerset.h"
 
 /* Return a human-readable string for the client fetch status code. */
 static const char *
diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index 61dde8869..7ef12a4fa 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -15,12 +15,13 @@
 #include "config.h"
 #include "connection.h"
 #include "connection_edge.h"
+#include "control.h"
 #include "crypto_rand.h"
 #include "crypto_util.h"
 #include "directory.h"
-#include "hs_common.h"
 #include "hs_circuit.h"
 #include "hs_client.h"
+#include "hs_common.h"
 #include "main.h"
 #include "networkstatus.h"
 #include "nodelist.h"
@@ -31,7 +32,6 @@
 #include "router.h"
 #include "routerlist.h"
 #include "routerset.h"
-#include "control.h"
 
 static extend_info_t *rend_client_get_random_intro_impl(
   const rend_cache_entry_t *rend_query,
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c
index 50ca04838..3a7dfe28f 100644
--- a/src/or/rendcommon.c
+++ b/src/or/rendcommon.c
@@ -16,18 +16,18 @@
 #include "control.h"
 #include "crypto_rand.h"
 #include "crypto_util.h"
+#include "hs_client.h"
 #include "hs_common.h"
+#include "hs_intropoint.h"
+#include "networkstatus.h"
 #include "rendclient.h"
 #include "rendcommon.h"
 #include "rendmid.h"
-#include "hs_intropoint.h"
-#include "hs_client.h"
 #include "rendservice.h"
 #include "rephist.h"
 #include "router.h"
 #include "routerlist.h"
 #include "routerparse.h"
-#include "networkstatus.h"
 
 /** Return 0 if one and two are the same service ids, else -1 or 1 */
 int
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 9967e139f..b00b1c636 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -56,27 +56,27 @@
 #define ROUTERPARSE_PRIVATE
 
 #include "or.h"
-#include "config.h"
 #include "circuitstats.h"
+#include "config.h"
 #include "crypto_util.h"
 #include "dirserv.h"
 #include "dirvote.h"
+#include "entrynodes.h"
+#include "memarea.h"
+#include "microdesc.h"
+#include "networkstatus.h"
 #include "parsecommon.h"
 #include "policies.h"
 #include "protover.h"
 #include "rendcommon.h"
-#include "router.h"
-#include "routerlist.h"
-#include "memarea.h"
-#include "microdesc.h"
-#include "networkstatus.h"
 #include "rephist.h"
+#include "router.h"
 #include "routerkeys.h"
+#include "routerlist.h"
 #include "routerparse.h"
-#include "entrynodes.h"
-#include "torcert.h"
 #include "sandbox.h"
 #include "shared_random.h"
+#include "torcert.h"
 
 #undef log
 #include 




[tor-commits] [tor/master] refactor: Remove unnecessary `#include "crypto.h"` throughout codebase.

2018-05-03 Thread nickm
commit 809f6fae848f53d2096bef1b2e99bcc929872e2a
Author: Isis Lovecruft 
Date:   Fri Apr 6 22:04:50 2018 +

refactor: Remove unnecessary `#include "crypto.h"` throughout codebase.

 * FIXES part of #24658: https://bugs.torproject.org/24658
---
 src/common/aes.c| 1 -
 src/common/crypto_curve25519.c  | 1 -
 src/common/crypto_ed25519.c | 1 -
 src/common/crypto_format.c  | 1 -
 src/ext/ed25519/ref10/randombytes.h | 2 +-
 src/or/hs_cache.h   | 1 -
 src/or/hs_circuit.h | 1 -
 src/or/hs_ident.h   | 1 -
 src/test/test_dir_common.c  | 1 -
 9 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/common/aes.c b/src/common/aes.c
index 5d0841dfa..6033bbe1f 100644
--- a/src/common/aes.c
+++ b/src/common/aes.c
@@ -17,7 +17,6 @@
 #endif
 
 #include 
-#include "crypto.h"
 #include "crypto_openssl_mgt.h"
 
 #if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(1,0,0)
diff --git a/src/common/crypto_curve25519.c b/src/common/crypto_curve25519.c
index becd70669..996d94c6e 100644
--- a/src/common/crypto_curve25519.c
+++ b/src/common/crypto_curve25519.c
@@ -21,7 +21,6 @@
 #include 
 #endif
 #include "container.h"
-#include "crypto.h"
 #include "crypto_curve25519.h"
 #include "crypto_digest.h"
 #include "crypto_format.h"
diff --git a/src/common/crypto_ed25519.c b/src/common/crypto_ed25519.c
index 25e0cd034..9c13e3bdf 100644
--- a/src/common/crypto_ed25519.c
+++ b/src/common/crypto_ed25519.c
@@ -21,7 +21,6 @@
 #include 
 #endif
 
-#include "crypto.h"
 #include "crypto_curve25519.h"
 #include "crypto_digest.h"
 #include "crypto_ed25519.h"
diff --git a/src/common/crypto_format.c b/src/common/crypto_format.c
index a76203207..460e85bac 100644
--- a/src/common/crypto_format.c
+++ b/src/common/crypto_format.c
@@ -15,7 +15,6 @@
 #include 
 #endif
 #include "container.h"
-#include "crypto.h"
 #include "crypto_curve25519.h"
 #include "crypto_digest.h"
 #include "crypto_ed25519.h"
diff --git a/src/ext/ed25519/ref10/randombytes.h 
b/src/ext/ed25519/ref10/randombytes.h
index 8bf31631f..a21dde854 100644
--- a/src/ext/ed25519/ref10/randombytes.h
+++ b/src/ext/ed25519/ref10/randombytes.h
@@ -1,4 +1,4 @@
 /* Added for Tor. */
-#include "crypto.h"
+#include "crypto_rand.h"
 #define randombytes(b, n) \
   (crypto_strongest_rand((b), (n)), 0)
diff --git a/src/or/hs_cache.h b/src/or/hs_cache.h
index a141634cc..0d0085ffd 100644
--- a/src/or/hs_cache.h
+++ b/src/or/hs_cache.h
@@ -11,7 +11,6 @@
 
 #include 
 
-#include "crypto.h"
 #include "crypto_ed25519.h"
 #include "hs_common.h"
 #include "hs_descriptor.h"
diff --git a/src/or/hs_circuit.h b/src/or/hs_circuit.h
index 2f5beaa16..f69137e1d 100644
--- a/src/or/hs_circuit.h
+++ b/src/or/hs_circuit.h
@@ -10,7 +10,6 @@
 #define TOR_HS_CIRCUIT_H
 
 #include "or.h"
-#include "crypto.h"
 #include "crypto_ed25519.h"
 
 #include "hs_service.h"
diff --git a/src/or/hs_ident.h b/src/or/hs_ident.h
index 91ec389aa..8f9da30c3 100644
--- a/src/or/hs_ident.h
+++ b/src/or/hs_ident.h
@@ -21,7 +21,6 @@
 #ifndef TOR_HS_IDENT_H
 #define TOR_HS_IDENT_H
 
-#include "crypto.h"
 #include "crypto_ed25519.h"
 
 #include "hs_common.h"
diff --git a/src/test/test_dir_common.c b/src/test/test_dir_common.c
index fdf43533a..a353ddb79 100644
--- a/src/test/test_dir_common.c
+++ b/src/test/test_dir_common.c
@@ -5,7 +5,6 @@
 
 #include "orconfig.h"
 #define DIRVOTE_PRIVATE
-#include "crypto.h"
 #include "test.h"
 #include "container.h"
 #include "or.h"



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] crypto: Remove unnecessary includes from src/common/crypto.[ch]

2018-05-03 Thread nickm
commit 64e6551b8bb934335251c6965355660ec26e712d
Author: Isis Lovecruft 
Date:   Fri Apr 6 21:37:40 2018 +

crypto: Remove unnecessary includes from src/common/crypto.[ch]

 * FIXES part of #24658: https://bugs.torproject.org/24658
---
 src/common/crypto.c | 3 ---
 src/common/crypto.h | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/src/common/crypto.c b/src/common/crypto.c
index 8d5897e49..9c40243f8 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -36,14 +36,11 @@
 DISABLE_GCC_WARNING(redundant-decls)
 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 
 ENABLE_GCC_WARNING(redundant-decls)
 
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 61a2952d2..dcec90314 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -17,13 +17,10 @@
 
 #include 
 #include "torint.h"
-#include "testsupport.h"
 #include "compat.h"
 #include "util.h"
 #include "crypto_rsa.h"
 
-#include "keccak-tiny/keccak-tiny.h"
-
 /** Length of our symmetric cipher's keys of 128-bit. */
 #define CIPHER_KEY_LEN 16
 /** Length of our symmetric cipher's IV of 128-bit. */



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] rust: Remove mirrored PRNG implementation.

2018-05-03 Thread nickm
commit b5013e841cf1501014ab23e14a4083c105e0d092
Author: Isis Lovecruft 
Date:   Wed Apr 18 20:17:53 2018 +

rust: Remove mirrored PRNG implementation.

Once we need a PRNG, we'll likely want to change the dev-dependency on the 
rand
crate to be a real dependency, and use rand::SmallRng as our PRNG.
---
 src/rust/Cargo.lock  |  12 
 src/rust/rand/Cargo.toml |   3 +
 src/rust/rand/lib.rs |   3 +-
 src/rust/rand/prng.rs| 184 ---
 src/rust/rand/rng.rs |   8 +--
 5 files changed, 19 insertions(+), 191 deletions(-)

diff --git a/src/rust/Cargo.lock b/src/rust/Cargo.lock
index 714e29edc..1480cf796 100644
--- a/src/rust/Cargo.lock
+++ b/src/rust/Cargo.lock
@@ -28,6 +28,7 @@ version = "0.0.1"
 dependencies = [
  "external 0.0.1",
  "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.5.0-pre.0",
  "rand_core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "tor_allocate 0.0.1",
  "tor_log 0.1.0",
@@ -35,6 +36,17 @@ dependencies = [
 ]
 
 [[package]]
+name = "rand"
+version = "0.5.0-pre.0"
+dependencies = [
+ "rand_core 0.1.0",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.1.0"
+
+[[package]]
 name = "rand_core"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index;
diff --git a/src/rust/rand/Cargo.toml b/src/rust/rand/Cargo.toml
index cab71afa7..1b73563c8 100644
--- a/src/rust/rand/Cargo.toml
+++ b/src/rust/rand/Cargo.toml
@@ -18,6 +18,9 @@ tor_allocate = { path = "../tor_allocate" }
 tor_log = { path = "../tor_log" }
 tor_util = { path = "../tor_util" }
 
+[dev-dependencies]
+rand = { version = "=0.5.0-pre.0", default-features = false, path = 
"../../ext/rust/vendor/rand-8c5b0ac51d" }
+
 [lib]
 name = "rand"
 path = "lib.rs"
diff --git a/src/rust/rand/lib.rs b/src/rust/rand/lib.rs
index ee034cf1f..6b3058ad5 100644
--- a/src/rust/rand/lib.rs
+++ b/src/rust/rand/lib.rs
@@ -3,6 +3,8 @@
 // See LICENSE for licensing information
 
 // External dependencies
+#[cfg(test)]
+extern crate rand;
 extern crate rand_core;
 
 // Internal dependencies
@@ -12,4 +14,3 @@ extern crate external;
 extern crate tor_log;
 
 pub mod rng;
-pub mod prng;
diff --git a/src/rust/rand/prng.rs b/src/rust/rand/prng.rs
deleted file mode 100644
index ed3f5161e..0
--- a/src/rust/rand/prng.rs
+++ /dev/null
@@ -1,184 +0,0 @@
-// Copyright (c) 2018, The Tor Project, Inc.
-// Copyright (c) 2018, isis agora lovecruft
-// See LICENSE for licensing information
-
-//! Wrappers for Tor's pseudo-random number generator to provide 
implementations
-//! of `rand_core` traits.
-
-use rand_core::impls;
-#[cfg(test)] use rand_core::CryptoRng;
-use rand_core::Error;
-use rand_core::RngCore;
-use rand_core::SeedableRng;
-
-/// A cryptographically-/insecure/ psuedo-random number generator based
-/// on a mixed congruential generator.
-///
-/// Specifically the PRNG state, `X`, is mutated by the following
-/// discontinuous linear equation:
-///
-/// ```text
-/// X_{i} = (a X_{i-1} + b)   mod n
-/// ```
-///
-/// where, in our case, we reuse the same parameters as OpenBSD and glibc,
-/// `a=1103515245`, `b=12345`, and `n=2147483647`, which should produce a
-/// maximal period over the range `0..u32::MAX`.
-///
-/// # Note
-///
-/// We reimplement the C here, rather than wrapping it, as it's one line of
-/// pure-Rust code (meaning it can also trivially be used in Rust tests without
-/// running into potential linker issues), as opposed to a few lines of 
`unsafe`
-/// calls to C.
-///
-/// # Warning
-///
-/// This should hopefully go without saying, but this PRNG is completely
-/// insecure and should never be used for anything an adversary should be 
unable
-/// to predict.
-//
-// C_RUST_COUPLED: `tor_weak_rng_t` /src/common/util.c
-pub struct TorInsecurePrng {
-state: u32,
-}
-
-impl SeedableRng for TorInsecurePrng {
-type Seed = [u8; 4];
-
-/// Create a new PRNG from a random 32-bit seed.
-//
-// C_RUST_COUPLED: `tor_init_weak_random()` /src/common/util.c
-fn from_seed(seed: Self::Seed) -> Self {
-let mut combined: u32 = seed[0].to_le() as u32;
-
-// Rather than using std::mem::transmute, we'll just bitwise-OR them
-// into each other.
-combined = (seed[1].to_le() as u32) << 8  | combined;
-combined = (seed[2].to_le() as u32) << 16 | combined;
-combined = (seed[2].to_le() as u32) << 24 | combined;
-
-TorInsecurePrng{ state: (combined & 0x7fff).to_le() }
-}
-}
-
-impl TorInsecurePrng {
-/// This is the equivalent function to `tor_weak_random()`.
-//
-// C_RUST_COUPLED: `tor_weak_random()` /src/common/util.c
-pub fn next_i32( self) -> i32 {
-// The C code appears to purposefully overflow the 32-bit state 
integer.
-self.state = (self.state.wrapping_mul(1103515245).wrapping_add(12345) 
& 0x7fff).to_le();
-self.state as i32
-}
-}
-
-
-impl 

[tor-commits] [tor/master] crypto: Alphabetise some #includes in /src/common/crypto*.

2018-05-03 Thread nickm
commit 88190026b3286b32ac22c1bbd999b7f1de2aa79f
Author: Isis Lovecruft 
Date:   Fri Apr 6 21:40:17 2018 +

crypto: Alphabetise some #includes in /src/common/crypto*.

 * FIXES part of #24658: https://bugs.torproject.org/24658
---
 src/common/crypto.c| 4 ++--
 src/common/crypto_curve25519.c | 2 +-
 src/common/crypto_ed25519.c| 3 +--
 src/common/crypto_format.c | 2 +-
 src/common/crypto_pwbox.c  | 4 ++--
 src/common/crypto_rsa.c| 6 +++---
 src/common/crypto_s2k.c| 6 +++---
 src/common/include.am  | 6 +++---
 8 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/src/common/crypto.c b/src/common/crypto.c
index 9c40243f8..ae7b519f9 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -23,14 +23,14 @@
 #endif /* defined(_WIN32) */
 
 #define CRYPTO_PRIVATE
-#include "crypto.h"
 #include "compat_openssl.h"
+#include "crypto.h"
 #include "crypto_curve25519.h"
+#include "crypto_digest.h"
 #include "crypto_ed25519.h"
 #include "crypto_format.h"
 #include "crypto_rand.h"
 #include "crypto_rsa.h"
-#include "crypto_digest.h"
 #include "crypto_util.h"
 
 DISABLE_GCC_WARNING(redundant-decls)
diff --git a/src/common/crypto_curve25519.c b/src/common/crypto_curve25519.c
index 0719c2f85..becd70669 100644
--- a/src/common/crypto_curve25519.c
+++ b/src/common/crypto_curve25519.c
@@ -23,8 +23,8 @@
 #include "container.h"
 #include "crypto.h"
 #include "crypto_curve25519.h"
-#include "crypto_format.h"
 #include "crypto_digest.h"
+#include "crypto_format.h"
 #include "crypto_rand.h"
 #include "crypto_util.h"
 #include "util.h"
diff --git a/src/common/crypto_ed25519.c b/src/common/crypto_ed25519.c
index baddb77dd..25e0cd034 100644
--- a/src/common/crypto_ed25519.c
+++ b/src/common/crypto_ed25519.c
@@ -22,9 +22,8 @@
 #endif
 
 #include "crypto.h"
-
-#include "crypto_digest.h"
 #include "crypto_curve25519.h"
+#include "crypto_digest.h"
 #include "crypto_ed25519.h"
 #include "crypto_format.h"
 #include "crypto_rand.h"
diff --git a/src/common/crypto_format.c b/src/common/crypto_format.c
index c0cade2f5..a76203207 100644
--- a/src/common/crypto_format.c
+++ b/src/common/crypto_format.c
@@ -17,9 +17,9 @@
 #include "container.h"
 #include "crypto.h"
 #include "crypto_curve25519.h"
+#include "crypto_digest.h"
 #include "crypto_ed25519.h"
 #include "crypto_format.h"
-#include "crypto_digest.h"
 #include "crypto_util.h"
 #include "util.h"
 #include "util_format.h"
diff --git a/src/common/crypto_pwbox.c b/src/common/crypto_pwbox.c
index e49ca226e..c2bd1d26c 100644
--- a/src/common/crypto_pwbox.c
+++ b/src/common/crypto_pwbox.c
@@ -9,10 +9,10 @@
  */
 
 #include "crypto.h"
-#include "crypto_s2k.h"
-#include "crypto_pwbox.h"
 #include "crypto_digest.h"
+#include "crypto_pwbox.h"
 #include "crypto_rand.h"
+#include "crypto_s2k.h"
 #include "crypto_util.h"
 #include "di_ops.h"
 #include "util.h"
diff --git a/src/common/crypto_rsa.c b/src/common/crypto_rsa.c
index 0e006b0eb..0a88b0e77 100644
--- a/src/common/crypto_rsa.c
+++ b/src/common/crypto_rsa.c
@@ -9,13 +9,13 @@
  * \brief Block of functions related with RSA utilities and operations.
  **/
 
-#include "crypto_rsa.h"
 #include "crypto.h"
-#include "compat_openssl.h"
 #include "crypto_curve25519.h"
-#include "crypto_format.h"
 #include "crypto_digest.h"
+#include "crypto_format.h"
+#include "compat_openssl.h"
 #include "crypto_rand.h"
+#include "crypto_rsa.h"
 #include "crypto_util.h"
 
 DISABLE_GCC_WARNING(redundant-decls)
diff --git a/src/common/crypto_s2k.c b/src/common/crypto_s2k.c
index 7d7f475b6..8543760ec 100644
--- a/src/common/crypto_s2k.c
+++ b/src/common/crypto_s2k.c
@@ -12,13 +12,13 @@
 
 #define CRYPTO_S2K_PRIVATE
 
-#include "crypto.h"
-#include "util.h"
 #include "compat.h"
-#include "crypto_s2k.h"
+#include "crypto.h"
 #include "crypto_digest.h"
 #include "crypto_rand.h"
+#include "crypto_s2k.h"
 #include "crypto_util.h"
+#include "util.h"
 
 #include 
 
diff --git a/src/common/include.am b/src/common/include.am
index f0cbd0e1d..81ae8fc27 100644
--- a/src/common/include.am
+++ b/src/common/include.am
@@ -115,12 +115,12 @@ LIBOR_CRYPTO_A_SRC = \
   src/common/compress_zstd.c   \
   src/common/crypto.c  \
   src/common/crypto_digest.c \
-  src/common/crypto_rsa.c \
+  src/common/crypto_format.c   \
   src/common/crypto_openssl_mgt.c\
   src/common/crypto_pwbox.c \
   src/common/crypto_rand.c \
+  src/common/crypto_rsa.c \
   src/common/crypto_s2k.c  \
-  src/common/crypto_format.c   \
   src/common/crypto_util.c \
   src/common/tortls.c  \
   src/common/crypto_curve25519.c \
@@ -173,9 +173,9 @@ COMMONHEADERS = \
   src/common/crypto_ed25519.h  \
   src/common/crypto_format.h   \
   src/common/crypto_openssl_mgt.h \
-  src/common/crypto_rsa.h   \
   src/common/crypto_pwbox.h\
   src/common/crypto_rand.h  \
+  src/common/crypto_rsa.h   \
   

[tor-commits] [tor/master] crypto: Refactor (P)RNG functionality into new crypto_rand module.

2018-05-03 Thread nickm
commit fe3aca149191f2eac410caa7113fb6f7e0804d8c
Author: Isis Lovecruft 
Date:   Fri Apr 6 21:23:29 2018 +

crypto: Refactor (P)RNG functionality into new crypto_rand module.

 * ADD new /src/common/crypto_rand.[ch] module.
 * ADD new /src/common/crypto_util.[ch] module (contains the memwipe()
   function, since all crypto_* modules need this).
 * FIXES part of #24658: https://bugs.torproject.org/24658
---
 src/common/address_set.c   |   2 +-
 src/common/compat_libevent.c   |   2 +-
 src/common/crypto.c| 602 +---
 src/common/crypto.h|  36 --
 src/common/crypto_curve25519.c |   2 +
 src/common/crypto_digest.c |   9 +-
 src/common/crypto_ed25519.c|   2 +
 src/common/crypto_format.c |   1 +
 src/common/crypto_pwbox.c  |   2 +
 src/common/crypto_rand.c   | 609 +
 src/common/crypto_rand.h   |  53 ++
 src/common/crypto_rsa.c|   2 +
 src/common/crypto_s2k.c|   2 +
 src/common/crypto_util.c   | 105 
 src/common/crypto_util.h   |  27 +
 src/common/include.am  |   4 +
 src/common/tortls.c|   2 +
 src/common/workqueue.c |   2 +-
 src/ext/ed25519/donna/ed25519-randombytes-custom.h |   2 +-
 src/ext/ed25519/donna/ed25519_tor.c|   2 +
 src/ext/ed25519/ref10/blinding.c   |   2 +-
 src/ext/ed25519/ref10/keypair.c|   3 +
 src/ext/keccak-tiny/keccak-tiny-unrolled.c |   2 +-
 src/or/addressmap.c|   1 +
 src/or/channelpadding.c|   1 +
 src/or/circpathbias.c  |   1 +
 src/or/circuitbuild.c  |   2 +-
 src/or/circuitlist.c   |   2 +
 src/or/circuitstats.c  |   1 +
 src/or/command.c   |   1 +
 src/or/config.c|   2 +
 src/or/connection.c|   1 +
 src/or/connection_edge.c   |   1 +
 src/or/connection_or.c |   2 +
 src/or/conscache.c |   1 +
 src/or/control.c   |   2 +
 src/or/cpuworker.c |   2 +
 src/or/directory.c |   2 +
 src/or/dns.c   |   1 +
 src/or/dos.c   |   1 +
 src/or/entrynodes.c|   1 +
 src/or/ext_orport.c|   2 +
 src/or/hibernate.c |   1 +
 src/or/hs_cache.c  |   1 +
 src/or/hs_cell.c   |   1 +
 src/or/hs_circuit.c|   2 +
 src/or/hs_client.c |   2 +
 src/or/hs_common.c |   2 +
 src/or/hs_control.c|   1 +
 src/or/hs_descriptor.c |   2 +
 src/or/hs_descriptor.h |   1 +
 src/or/hs_ident.c  |   1 +
 src/or/hs_ntor.c   |   1 +
 src/or/hs_service.c|   2 +
 src/or/main.c  |   1 +
 src/or/networkstatus.c |   2 +
 src/or/onion.c |   1 +
 src/or/onion_fast.c|   2 +
 src/or/onion_ntor.c|   1 +
 src/or/onion_tap.c |   2 +
 src/or/proto_socks.c   |   1 +
 src/or/relay.c |   2 +
 src/or/rendclient.c|   2 +
 src/or/rendcommon.c|   2 +
 src/or/rendservice.c   |   2 +
 src/or/rephist.c   |   1 +
 src/or/router.c|   2 +
 src/or/routerkeys.c|   1 +
 src/or/routerlist.c|   1 +
 src/or/routerparse.c   |   1 +
 src/or/shared_random.c |   2 +
 src/or/shared_random_state.c   |   1 +
 src/or/torcert.c   |   2 +-
 src/test/bench.c   |   1 +
 src/test/rend_test_helpers.c   

[tor-commits] [tor/master] crypto: Move declaration of crypto_init_siphash_key() into crypto.h.

2018-05-03 Thread nickm
commit f17ace1460f0de50f32d28e8086fe11032d8cb3f
Author: Isis Lovecruft 
Date:   Wed Apr 18 19:16:32 2018 +

crypto: Move declaration of crypto_init_siphash_key() into crypto.h.

On second thought, this is a global initialisation function and
doesn't conceptually have much to do with getting/using randomnesses.
---
 src/common/crypto.h  | 1 +
 src/common/crypto_rand.h | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/crypto.h b/src/common/crypto.h
index dcec90314..c77355731 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -38,6 +38,7 @@ typedef struct aes_cnt_cipher crypto_cipher_t;
 typedef struct crypto_dh_t crypto_dh_t;
 
 /* global state */
+int crypto_init_siphash_key(void);
 int crypto_early_init(void) ATTR_WUR;
 int crypto_global_init(int hardwareAccel,
const char *accelName,
diff --git a/src/common/crypto_rand.h b/src/common/crypto_rand.h
index c78195633..4eac94f57 100644
--- a/src/common/crypto_rand.h
+++ b/src/common/crypto_rand.h
@@ -29,7 +29,6 @@ uint64_t crypto_rand_uint64(uint64_t max);
 double crypto_rand_double(void);
 struct tor_weak_rng_t;
 void crypto_seed_weak_rng(struct tor_weak_rng_t *rng);
-int crypto_init_siphash_key(void);
 
 char *crypto_random_hostname(int min_rand_len, int max_rand_len,
  const char *prefix, const char *suffix);



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge remote-tracking branch 'isis/bug24660_r1'

2018-05-03 Thread nickm
commit c3b72583709332f051fb61e17f5102d0ada05917
Merge: 94c6eb7d7 94dcd38a1
Author: Nick Mathewson 
Date:   Thu May 3 13:50:18 2018 -0400

Merge remote-tracking branch 'isis/bug24660_r1'

 src/common/address_set.c   |   2 +-
 src/common/aes.c   |   1 -
 src/common/compat_libevent.c   |   2 +-
 src/common/crypto.c| 608 +---
 src/common/crypto.h|  40 +-
 src/common/crypto_curve25519.c |   5 +-
 src/common/crypto_digest.c |   9 +-
 src/common/crypto_ed25519.c|   6 +-
 src/common/crypto_format.c |   4 +-
 src/common/crypto_pwbox.c  |   6 +-
 src/common/crypto_rand.c   | 609 +
 src/common/crypto_rand.h   |  52 ++
 src/common/crypto_rsa.c|   8 +-
 src/common/crypto_s2k.c|   8 +-
 src/common/crypto_util.c   | 105 
 src/common/crypto_util.h   |  27 +
 src/common/include.am  |  10 +-
 src/common/tortls.c|   2 +
 src/common/workqueue.c |   2 +-
 src/ext/ed25519/donna/ed25519-randombytes-custom.h |   2 +-
 src/ext/ed25519/donna/ed25519_tor.c|   2 +
 src/ext/ed25519/ref10/blinding.c   |   2 +-
 src/ext/ed25519/ref10/keypair.c|   3 +
 src/ext/ed25519/ref10/randombytes.h|   2 +-
 src/ext/keccak-tiny/keccak-tiny-unrolled.c |   2 +-
 src/or/addressmap.c|   3 +-
 src/or/channelpadding.c|   1 +
 src/or/circpathbias.c  |   1 +
 src/or/circuitbuild.c  |   2 +-
 src/or/circuitlist.c   |   2 +
 src/or/circuitmux_ewma.c   |   1 +
 src/or/circuitstats.c  |   1 +
 src/or/command.c   |   1 +
 src/or/config.c|   2 +
 src/or/connection.c|   1 +
 src/or/connection_edge.c   |   1 +
 src/or/connection_or.c |   2 +
 src/or/conscache.c |   1 +
 src/or/control.c   |   2 +
 src/or/cpuworker.c |   2 +
 src/or/dirauth/shared_random.c |   6 +-
 src/or/dirauth/shared_random_state.c   |  10 +-
 src/or/directory.c |   2 +
 src/or/dns.c   |   1 +
 src/or/dos.c   |   1 +
 src/or/entrynodes.c|   1 +
 src/or/ext_orport.c|   4 +-
 src/or/hibernate.c |   1 +
 src/or/hs_cache.c  |   1 +
 src/or/hs_cache.h  |   1 -
 src/or/hs_cell.c   |   1 +
 src/or/hs_circuit.c|   2 +
 src/or/hs_circuit.h|   1 -
 src/or/hs_client.c |  30 +-
 src/or/hs_common.c |   2 +
 src/or/hs_control.c|   1 +
 src/or/hs_descriptor.c |   2 +
 src/or/hs_descriptor.h |   1 +
 src/or/hs_ident.c  |   1 +
 src/or/hs_ident.h  |   1 -
 src/or/hs_ntor.c   |   1 +
 src/or/hs_service.c|   2 +
 src/or/main.c  |   1 +
 src/or/networkstatus.c |   2 +
 src/or/onion.c |   1 +
 src/or/onion_fast.c|   2 +
 src/or/onion_ntor.c|   1 +
 src/or/onion_tap.c |   2 +
 src/or/proto_socks.c   |   1 +
 src/or/relay.c |   2 +
 src/or/relay_crypto.c  |   3 +-
 src/or/rendclient.c|   6 +-
 src/or/rendcommon.c|   8 +-
 src/or/rendservice.c   |   2 +
 src/or/rephist.c   |   1 +
 src/or/router.c|   2 +
 src/or/routerkeys.c|   1 +
 src/or/routerlist.c|   1 +
 src/or/routerparse.c 

[tor-commits] [tor/master] rust: Expose crypto_rand() as an impl of rand_core::RngCore.

2018-05-03 Thread nickm
commit 94dcd38a1430061a0bb630ad680a41a78262a55c
Author: Isis Lovecruft 
Date:   Wed May 2 22:12:38 2018 +

rust: Expose crypto_rand() as an impl of rand_core::RngCore.
---
 src/rust/external/crypto_rand.rs | 30 --
 src/rust/rand/rng.rs | 54 ++--
 2 files changed, 63 insertions(+), 21 deletions(-)

diff --git a/src/rust/external/crypto_rand.rs b/src/rust/external/crypto_rand.rs
index 19b9ab281..af1ade016 100644
--- a/src/rust/external/crypto_rand.rs
+++ b/src/rust/external/crypto_rand.rs
@@ -11,23 +11,18 @@
 
 use std::time::Duration;
 
-use libc::c_char;
 use libc::c_double;
 use libc::c_int;
-use libc::c_uint;
-use libc::c_void;
 use libc::size_t;
 use libc::time_t;
 use libc::uint8_t;
-use libc::uint64_t;
 
 extern "C" {
 fn crypto_seed_rng() -> c_int;
+fn crypto_rand(out: *mut uint8_t, out_len: size_t);
 fn crypto_strongest_rand(out: *mut uint8_t, out_len: size_t);
 fn crypto_rand_time_range(min: time_t, max: time_t) -> time_t;
 fn crypto_rand_double() -> c_double;
-// fn crypto_random_hostname(min_rand_len: c_int, max_rand_len: c_int,
-//   prefix: *const c_char, suffix: *const c_char) 
-> *mut c_char;
 }
 
 /// Seed OpenSSL's random number generator with bytes from the operating
@@ -48,7 +43,16 @@ pub fn c_tor_crypto_seed_rng() -> bool {
 }
 }
 
-/// Fill the bytes of `dest` with strong random data.
+/// Fill the bytes of `dest` with random data.
+pub fn c_tor_crypto_rand(dest:  [u8]) {
+unsafe {
+crypto_rand(dest.as_mut_ptr(), dest.len() as size_t);
+}
+}
+
+/// Fill the bytes of `dest` with "strong" random data by hashing
+/// together randomness obtained from OpenSSL's RNG and the operating
+/// system.
 pub fn c_tor_crypto_strongest_rand(dest:  [u8]) {
 // We'll let the C side panic if the len is larger than
 // MAX_STRONGEST_RAND_SIZE, rather than potentially panicking here.  A
@@ -81,15 +85,3 @@ pub fn c_tor_crypto_rand_double() -> f64 {
 }
 }
 
-#[cfg(test)]
-mod test {
-use super::*;
-
-#[test]
-fn test_layout_tor_weak_rng_t() {
-assert_eq!(::std::mem::size_of::(), 0usize,
-   concat!("Size of: ", stringify!(tor_weak_rng_t)));
-assert_eq!(::std::mem::align_of::(), 1usize,
-   concat!("Alignment of ", stringify!(tor_weak_rng_t)));
-}
-}
diff --git a/src/rust/rand/rng.rs b/src/rust/rand/rng.rs
index ea234492e..cfd96c961 100644
--- a/src/rust/rand/rng.rs
+++ b/src/rust/rand/rng.rs
@@ -2,7 +2,7 @@
 // Copyright (c) 2018, isis agora lovecruft
 // See LICENSE for licensing information
 
-//! Wrappers for Tor's random number generator to provide implementations of
+//! Wrappers for Tor's random number generators to provide implementations of
 //! `rand_core` traits.
 
 // This is the real implementation, in use in production, which calls into our 
C
@@ -18,6 +18,7 @@ mod internal {
 use rand_core::impls::next_u32_via_fill;
 use rand_core::impls::next_u64_via_fill;
 
+use external::c_tor_crypto_rand;
 use external::c_tor_crypto_strongest_rand;
 use external::c_tor_crypto_seed_rng;
 
@@ -66,6 +67,53 @@ mod internal {
 
 // C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c
 fn fill_bytes( self, dest:  [u8]) {
+c_tor_crypto_rand(dest);
+}
+
+// C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c
+fn try_fill_bytes( self, dest:  [u8]) -> Result<(), Error> {
+Ok(self.fill_bytes(dest))
+}
+}
+
+/// A CSPRNG which hashes together randomness from OpenSSL's RNG and 
entropy
+/// obtained from the operating system.
+pub struct TorStrongestRng {
+// This private, zero-length field forces the struct to be treated the
+// same as its opaque C couterpart.
+_unused: [u8; 0],
+}
+
+/// Mark `TorRng` as being suitable for cryptographic purposes.
+impl CryptoRng for TorStrongestRng {}
+
+impl TorStrongestRng {
+// C_RUST_COUPLED: `crypto_seed_rng()` /src/common/crypto_rand.c
+#[allow(dead_code)]
+fn new() -> Self {
+if !c_tor_crypto_seed_rng() {
+tor_log_msg!(LogSeverity::Warn, LogDomain::General,
+ "TorStrongestRng::from_seed()",
+ "The RNG could not be seeded!");
+}
+// XXX also log success at info level —isis
+TorStrongestRng{ _unused: [0u8; 0] }
+}
+}
+
+impl RngCore for TorStrongestRng {
+// C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c
+fn next_u32( self) -> u32 {
+next_u32_via_fill(self)
+}
+
+// C_RUST_COUPLED: `crypto_strongest_rand()` /src/common/crypto_rand.c
+fn next_u64( self) -> u64 {
+next_u64_via_fill(self)
+}
+
+// 

[tor-commits] [tor-rust-dependencies/master] Add rand_core-0.1.0.

2018-05-03 Thread nickm
commit 073830a301ab624f7c1ad648027cfd8c6b07fa89
Author: Isis Lovecruft 
Date:   Sat Apr 21 00:01:10 2018 +

Add rand_core-0.1.0.
---
 crates/rand_core-0.1.0/.cargo-checksum.json |   1 +
 crates/rand_core-0.1.0/CHANGELOG.md |  21 ++
 crates/rand_core-0.1.0/Cargo.toml   |  41 +++
 crates/rand_core-0.1.0/LICENSE-APACHE   | 201 ++
 crates/rand_core-0.1.0/LICENSE-MIT  |  25 ++
 crates/rand_core-0.1.0/README.md|  62 
 crates/rand_core-0.1.0/src/error.rs | 163 +
 crates/rand_core-0.1.0/src/impls.rs | 543 
 crates/rand_core-0.1.0/src/le.rs|  70 
 crates/rand_core-0.1.0/src/lib.rs   | 438 ++
 10 files changed, 1565 insertions(+)

diff --git a/crates/rand_core-0.1.0/.cargo-checksum.json 
b/crates/rand_core-0.1.0/.cargo-checksum.json
new file mode 100644
index 000..de1ab60
--- /dev/null
+++ b/crates/rand_core-0.1.0/.cargo-checksum.json
@@ -0,0 +1 @@
+{"files":{"CHANGELOG.md":"add524e5ce5fb184fc37321b5f0af395da8b4747b7337085b9c1ed111f0be696","Cargo.toml":"2c94142ff7115733706f788d86600e988b8cd037305322b37dd0586dabf3da4b","LICENSE-APACHE":"aaff376532ea30a0cd5330b9502ad4a4c8bf769c539c87ffe78819d188a18ebf","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"7af34faa2066872019a746fbdb230033e374d2f9b7a37443c31fee75be1d0cab","src/error.rs":"e243f77fddd537b1d3538057ee4173b1aaabbd8f25d3a1ab03fb4f59629c2d3a","src/impls.rs":"d6c44bc26dc7965977dea4212a7cfb6505cf0360176b3772fac1b6be282a9361","src/le.rs":"d2c029d5d215769eb6136d3678053d013cad49996c67cd6734412b5249869634","src/lib.rs":"3705f608b6347c9944c166ac38d83755e65a7a240ef3037af4534f9e6139a08e"},"package":"0224284424a4b818387b58d59336c288f99b48f69681aa60cc681fe038bbca5d"}
\ No newline at end of file
diff --git a/crates/rand_core-0.1.0/CHANGELOG.md 
b/crates/rand_core-0.1.0/CHANGELOG.md
new file mode 100644
index 000..0358bdc
--- /dev/null
+++ b/crates/rand_core-0.1.0/CHANGELOG.md
@@ -0,0 +1,21 @@
+# Changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
+and this project adheres to [Semantic 
Versioning](https://semver.org/spec/v2.0.0.html).
+
+
+## [0.1.0] - TODO - date
+(Split out of the Rand crate, changes here are relative to rand 0.4.2)
+- `RngCore` and `SeedableRng` are now part of `rand_core`. (#288)
+- Add modules to help implementing RNGs `impl` and `le`. (#209, #228)
+- Add `Error` and `ErrorKind`. (#225)
+- Add `CryptoRng` marker trait. (#273)
+- Add `BlockRngCore` trait. (#281)
+- Add `BlockRng` and `BlockRng64` wrappers to help implementations. (#281, 
#325)
+- Revise the `SeedableRng` trait. (#233)
+- Remove default implementations for `RngCore::next_u64` and 
`RngCore::fill_bytes`. (#288)
+- Add `RngCore::try_fill_bytes`. (#225)
+
+## [0.0.1] - 2017-09-14 (yanked)
+Experimental version as part of the rand crate refactor.
diff --git a/crates/rand_core-0.1.0/Cargo.toml 
b/crates/rand_core-0.1.0/Cargo.toml
new file mode 100644
index 000..9702a4b
--- /dev/null
+++ b/crates/rand_core-0.1.0/Cargo.toml
@@ -0,0 +1,41 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g. crates.io) dependencies
+#
+# If you believe there's an error in this file please file an
+# issue against the rust-lang/cargo repository. If you're
+# editing this file be aware that the upstream Cargo.toml
+# will likely look very different (and much more reasonable)
+
+[package]
+name = "rand_core"
+version = "0.1.0"
+authors = ["The Rust Project Developers"]
+description = "Core random number generator traits and tools for 
implementation.\n"
+homepage = "https://crates.io/crates/rand_core;
+documentation = "https://docs.rs/rand_core;
+readme = "README.md"
+keywords = ["random", "rng"]
+categories = ["algorithms", "no-std"]
+license = "MIT/Apache-2.0"
+repository = "https://github.com/rust-lang-nursery/rand;
+[dependencies.serde]
+version = "1"
+optional = true
+
+[dependencies.serde_derive]
+version = "1"
+optional = true
+
+[features]
+alloc = []
+serde1 = ["serde", "serde_derive"]
+std = ["alloc"]
+[badges.appveyor]
+repository = "alexcrichton/rand"
+
+[badges.travis-ci]
+repository = "rust-lang-nursery/rand"
diff --git a/crates/rand_core-0.1.0/LICENSE-APACHE 
b/crates/rand_core-0.1.0/LICENSE-APACHE
new file mode 100644
index 000..17d7468
--- /dev/null
+++ b/crates/rand_core-0.1.0/LICENSE-APACHE
@@ -0,0 +1,201 @@
+  Apache License
+Version 2.0, January 2004
+ https://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+   

[tor-commits] [tor/master] Merge remote-tracking branch 'dgoulet/ticket25991_034_01'

2018-05-03 Thread nickm
commit 94c6eb7d7f023e50071632e618f003409e5e6489
Merge: 48d8fe533 224c93b97
Author: Nick Mathewson 
Date:   Thu May 3 13:41:34 2018 -0400

Merge remote-tracking branch 'dgoulet/ticket25991_034_01'

 doc/HACKING/Module.md | 111 ++
 doc/include.am|   5 +++
 2 files changed, 116 insertions(+)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] doc: Add missing HACKING/ files to EXTRA_DIST

2018-05-03 Thread nickm
commit 224c93b976bbf3b713a10c8a6ed5a91503a4a52c
Author: David Goulet 
Date:   Wed May 2 14:28:40 2018 -0400

doc: Add missing HACKING/ files to EXTRA_DIST

Apart from adding the newly created Module.md, this commit also adds all the
missing files we have in HACKING/ to the EXTRA_DIST.

Signed-off-by: David Goulet 
---
 doc/include.am | 5 +
 1 file changed, 5 insertions(+)

diff --git a/doc/include.am b/doc/include.am
index 0e8de231e..7942188ea 100644
--- a/doc/include.am
+++ b/doc/include.am
@@ -35,10 +35,15 @@ EXTRA_DIST+= doc/asciidoc-helper.sh \
 doc/TUNING \
 doc/HACKING/README.1st.md  \
 doc/HACKING/CodingStandards.md \
+doc/HACKING/CodingStandardsRust.md \
+doc/HACKING/Fuzzing.md \
 doc/HACKING/GettingStarted.md  \
+doc/HACKING/GettingStartedRust.md  \
 doc/HACKING/HelpfulTools.md\
 doc/HACKING/HowToReview.md \
+doc/HACKING/Module.md  \
 doc/HACKING/ReleasingTor.md\
+doc/HACKING/Tracing.md \
 doc/HACKING/WritingTests.md
 
 docdir = @docdir@



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] doc: Add Module.md explaining Tor modules

2018-05-03 Thread nickm
commit e12d4286bff098e97d7de94cc910b817f470560d
Author: David Goulet 
Date:   Wed May 2 14:24:46 2018 -0400

doc: Add Module.md explaining Tor modules

Initial document that contains guidelines to write a new module in Tor.

Closes #25991

Signed-off-by: David Goulet 
---
 doc/HACKING/Module.md | 111 ++
 1 file changed, 111 insertions(+)

diff --git a/doc/HACKING/Module.md b/doc/HACKING/Module.md
new file mode 100644
index 0..1028a029d
--- /dev/null
+++ b/doc/HACKING/Module.md
@@ -0,0 +1,111 @@
+# Modules in Tor #
+
+This document describes the build system and coding standards when writing a
+module in Tor.
+
+## What is a module? ##
+
+In the context of the tor code base, a module is a subsystem that we can
+selectively enable or disable, at `configure` time.
+
+Currently, there is only one module:
+
+  - Directory Authority subsystem (dirauth)
+
+It is located in its own directory in `src/or/dirauth/`. To disable it, one
+need to pass `--disable-module-dirauth` at configure time. All modules are
+currently enabled by default.
+
+## Build System ##
+
+The changes to the build system are pretty straightforward.
+
+1. Locate in the `configure.ac` file this define: `m4_define(MODULES`. It
+   contains a list (white-space separated) of the module in tor. Add yours to
+   the list.
+
+2. Use the `AC_ARG_ENABLE([module-dirauth]` template for your new module. We
+   use the "disable module" approach instead of enabling them one by one. So,
+   by default, tor will build all the modules.
+
+   This will define the `HAVE_MODULE_` statement which can be used in
+   the C code to conditionally compile things for your module. And the
+   `BUILD_MODULE_` is also defined for automake files (e.g: include.am).
+
+3. In the `src/or/include.am` file, locate the `MODULE_DIRAUTH_SOURCES` value.
+   You need to create your own `_SOURCES` variable for your module and then
+   conditionally add the it to `LIBTOR_A_SOURCES` if you should build the
+   module.
+
+   It is then **very** important to add your SOURCES variable to
+   `src_or_libtor_testing_a_SOURCES` so the tests can build it.
+
+4. Do the same for header files, locate `ORHEADERS +=` which always add all
+   headers of all modules so the symbol can be found for the module entry
+   points.
+
+Finally, your module will automatically be included in the
+`TOR_MODULES_ALL_ENABLED` variable which is used to build the unit tests. They
+always build everything in order to tests everything.
+
+## Coding ##
+
+As mentioned above, a module must be isolated in its own directory (name of
+the module) in `src/or/`.
+
+There are couples of "rules" you want to follow:
+
+* Minimize as much as you can the number of entry points into your module.
+  Less is always better but of course that doesn't work out for every use
+  case. However, it is a good thing to always keep that in mind.
+
+* Do **not** use the `HAVE_MODULE_` define outside of the module code
+  base. Every entry point should have a second definition if the module is
+  disabled. For instance:
+
+  ```
+  #ifdef HAVE_MODULE_DIRAUTH
+
+  int sr_init(int save_to_disk);
+
+  #else /* HAVE_MODULE_DIRAUTH */
+
+  static inline int
+  sr_init(int save_to_disk)
+  {
+(void) save_to_disk;
+return 0;
+  }
+
+  #endif /* HAVE_MODULE_DIRAUTH */
+
+  ```
+
+  The main reason for this approach is to avoid having conditional code
+  everywhere in the code base. It should be centralized as much as possible
+  which helps maintainability but also avoids conditional spaghetti code
+  making the code much more difficult to follow/understand.
+
+* It is possible that you end up with code that needs to be used by the rest
+  of the code base but is still part of your module. As a good example, if you
+  look at `src/or/shared_random_client.c`: it contains code needed by the 
hidden
+  service subsystem but mainly related to the shared random subsystem very
+  specific to the dirauth module.
+
+  This is fine but try to keep it as lean as possible and never use the same
+  filename as the one in the module. For example, this is a bad idea and
+  should never be done:
+
+- `src/or/shared_random.c`
+- `src/or/dirauth/shared_random.c`
+
+* When you include headers from the module, **always** use the full module
+  path in your statement. Example:
+
+  `#include "dirauth/dirvote.h"`
+
+  The main reason is that we do **not** add the module include path by default
+  so it needs to be specified. But also, it helps our human brain understand
+  which part comes from a module or not.
+
+  Even **in** the module itself, use the full include path like above.



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge remote-tracking branch 'dgoulet/ticket25990_034_01'

2018-05-03 Thread nickm
commit 48d8fe533e977c14983f56de0ca572d842b5aadc
Merge: 7f629f7fd 1f739e9b0
Author: Nick Mathewson 
Date:   Thu May 3 13:40:10 2018 -0400

Merge remote-tracking branch 'dgoulet/ticket25990_034_01'

 src/or/config.c|  1 +
 src/or/dirauth/dirvote.c   |  6 --
 src/or/dirauth/mode.h  | 38 ++
 src/or/dirauth/shared_random.c |  1 +
 src/or/directory.c |  3 ++-
 src/or/include.am  |  1 +
 src/or/main.c  |  3 ++-
 src/or/networkstatus.c |  3 ++-
 src/or/nodelist.c  |  2 ++
 src/or/router.c| 10 ++
 src/or/router.h|  1 -
 src/or/routerlist.c|  1 +
 12 files changed, 56 insertions(+), 14 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] dirauth: Move authdir_mode_v3() to module

2018-05-03 Thread nickm
commit 1f739e9b06974566685c662c3526384efd68ed32
Author: David Goulet 
Date:   Wed May 2 13:42:24 2018 -0400

dirauth: Move authdir_mode_v3() to module

This function must return false if the module is not compiled in. In order 
to
do that, we move the authdir_mode_v3() function out of router.c and into the
dirauth module new header file named mode.h.

It is always returning false if we don't have the module.

Closes #25990

Signed-off-by: David Goulet 
---
 src/or/config.c|  1 +
 src/or/dirauth/dirvote.c   |  6 --
 src/or/dirauth/mode.h  | 38 ++
 src/or/dirauth/shared_random.c |  1 +
 src/or/directory.c |  3 ++-
 src/or/include.am  |  1 +
 src/or/main.c  |  3 ++-
 src/or/networkstatus.c |  3 ++-
 src/or/nodelist.c  |  2 ++
 src/or/router.c| 10 ++
 src/or/router.h|  1 -
 src/or/routerlist.c|  1 +
 12 files changed, 56 insertions(+), 14 deletions(-)

diff --git a/src/or/config.c b/src/or/config.c
index a2b84991a..aa32b0aa2 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -112,6 +112,7 @@
 #include "procmon.h"
 
 #include "dirauth/dirvote.h"
+#include "dirauth/mode.h"
 
 #ifdef HAVE_SYSTEMD
 #   if defined(__COVERITY__) && !defined(__INCLUDE_LEVEL__)
diff --git a/src/or/dirauth/dirvote.c b/src/or/dirauth/dirvote.c
index 66a530b6d..cbc3ff782 100644
--- a/src/or/dirauth/dirvote.c
+++ b/src/or/dirauth/dirvote.c
@@ -9,7 +9,6 @@
 #include "dircollate.h"
 #include "directory.h"
 #include "dirserv.h"
-#include "dirvote.h"
 #include "microdesc.h"
 #include "networkstatus.h"
 #include "nodelist.h"
@@ -23,9 +22,12 @@
 #include "routerparse.h"
 #include "entrynodes.h" /* needed for guardfraction methods */
 #include "torcert.h"
-#include "shared_random_state.h"
 #include "voting_schedule.h"
 
+#include "dirauth/dirvote.h"
+#include "dirauth/mode.h"
+#include "dirauth/shared_random_state.h"
+
 /**
  * \file dirvote.c
  * \brief Functions to compute directory consensus, and schedule voting.
diff --git a/src/or/dirauth/mode.h b/src/or/dirauth/mode.h
new file mode 100644
index 0..8a0d3142f
--- /dev/null
+++ b/src/or/dirauth/mode.h
@@ -0,0 +1,38 @@
+/* Copyright (c) 2018, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file mode.h
+ * \brief Standalone header file for directory authority mode.
+ **/
+
+#ifndef TOR_DIRAUTH_MODE_H
+#define TOR_DIRAUTH_MODE_H
+
+#ifdef HAVE_MODULE_DIRAUTH
+
+#include "router.h"
+
+/* Return true iff we believe ourselves to be a v3 authoritative directory
+ * server. */
+static inline int
+authdir_mode_v3(const or_options_t *options)
+{
+  return authdir_mode(options) && options->V3AuthoritativeDir != 0;
+}
+
+#else /* HAVE_MODULE_DIRAUTH */
+
+/* Without the dirauth module, we can't be a v3 directory authority, ever. */
+
+static inline int
+authdir_mode_v3(const or_options_t *options)
+{
+  (void) options;
+  return 0;
+}
+
+#endif /* HAVE_MODULE_DIRAUTH */
+
+#endif /* TOR_MODE_H */
+
diff --git a/src/or/dirauth/shared_random.c b/src/or/dirauth/shared_random.c
index f7ff5c58b..0a89fa8d2 100644
--- a/src/or/dirauth/shared_random.c
+++ b/src/or/dirauth/shared_random.c
@@ -101,6 +101,7 @@
 #include "voting_schedule.h"
 
 #include "dirauth/dirvote.h"
+#include "dirauth/mode.h"
 
 /* String prefix of shared random values in votes/consensuses. */
 static const char previous_srv_str[] = "shared-rand-previous-value";
diff --git a/src/or/directory.c b/src/or/directory.c
index 2c5ee23f3..76caab6a3 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -40,7 +40,6 @@
 #include "routerlist.h"
 #include "routerparse.h"
 #include "routerset.h"
-#include "dirauth/shared_random.h"
 
 #if defined(EXPORTMALLINFO) && defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO)
 #if !defined(OpenBSD)
@@ -49,6 +48,8 @@
 #endif
 
 #include "dirauth/dirvote.h"
+#include "dirauth/mode.h"
+#include "dirauth/shared_random.h"
 
 /**
  * \file directory.c
diff --git a/src/or/include.am b/src/or/include.am
index 9cae7d003..bc0b9d2bf 100644
--- a/src/or/include.am
+++ b/src/or/include.am
@@ -279,6 +279,7 @@ ORHEADERS = \
 ORHEADERS += \
src/or/dirauth/dircollate.h \
src/or/dirauth/dirvote.h\
+   src/or/dirauth/mode.h   \
src/or/dirauth/shared_random.h  \
src/or/dirauth/shared_random_state.h
 
diff --git a/src/or/main.c b/src/or/main.c
index cf0df9ba7..e98432160 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -103,7 +103,6 @@
 #include "routerlist.h"
 #include "routerparse.h"
 #include "scheduler.h"
-#include "dirauth/shared_random.h"
 #include "statefile.h"
 #include "status.h"
 #include "tor_api.h"
@@ -119,6 +118,8 @@
 #include 
 
 #include "dirauth/dirvote.h"

[tor-commits] [tor/release-0.3.3] Merge remote-tracking branch 'catalyst-github/bug25936-033' into maint-0.3.3

2018-05-03 Thread nickm
commit 44626b37f6c6bcc1907cd269b8e9bc77909f9d51
Merge: 1bbe75da6 f0dc6c8e2
Author: Nick Mathewson 
Date:   Thu May 3 13:38:51 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-033' into maint-0.3.3

 .travis.yml | 4 +++-
 Makefile.am | 8 
 2 files changed, 11 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

2018-05-03 Thread nickm
commit 5227754b2f441c93da6436697a19841e9e71246f
Merge: d465bd27e 31865b502
Author: Nick Mathewson 
Date:   Thu May 3 13:38:37 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Merge branch 'maint-0.3.3' into release-0.3.3

2018-05-03 Thread nickm
commit 40456054eadf8a002de66d25cdf1400764a9f8af
Merge: f6890422a 4c6a407b9
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.3.3' into release-0.3.3

 .travis.yml | 4 +++-
 Makefile.am | 8 
 2 files changed, 11 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Merge branch 'maint-0.3.1' into maint-0.3.2

2018-05-03 Thread nickm
commit be5b4415c2dce243a6249e6ca14b65423c9b0746
Merge: 246765342 6361a250f
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-05-03 Thread nickm
commit 6361a250f08421aa1e6db1093aaa488ee24ce77d
Merge: 726f238b7 5227754b2
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Merge branch 'maint-0.3.2' into maint-0.3.3

2018-05-03 Thread nickm
commit 4c6a407b9d9436948dbbecffde32e28380240728
Merge: 44626b37f be5b4415c
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.3.2' into maint-0.3.3




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1

2018-05-03 Thread nickm
commit 726f238b723dfaa88df763bec7e923e99430ea87
Merge: 993e314c6 598210509
Author: Nick Mathewson 
Date:   Thu May 3 13:38:46 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.2] Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1

2018-05-03 Thread nickm
commit 726f238b723dfaa88df763bec7e923e99430ea87
Merge: 993e314c6 598210509
Author: Nick Mathewson 
Date:   Thu May 3 13:38:46 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Merge branch 'bug25936-031' into bug25936-032

2018-05-03 Thread nickm
commit 2edc9cd48457169409841c794832172bc959e63a
Merge: 7c3f87eb4 598210509
Author: Taylor Yu 
Date:   Thu Apr 26 15:58:39 2018 -0500

Merge branch 'bug25936-031' into bug25936-032

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Merge branch 'bug25936-032' into bug25936-033

2018-05-03 Thread nickm
commit f0dc6c8e2a68764b73ea4b3fdb50f74b070c183b
Merge: 58f54a358 2edc9cd48
Author: Taylor Yu 
Date:   Thu Apr 26 16:07:56 2018 -0500

Merge branch 'bug25936-032' into bug25936-033

 .travis.yml | 4 +++-
 Makefile.am | 8 
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --cc Makefile.am
index 04ca88a23,4d2d9d222..08cb8e3e7
--- a/Makefile.am
+++ b/Makefile.am
@@@ -250,7 -248,11 +250,15 @@@ clean-local
rm -rf $(top_builddir)/src/rust/target
rm -rf $(top_builddir)/src/rust/.cargo/registry
  
 +if USE_RUST
 +distclean-local: distclean-rust
 +endif
 +
+ # This relies on some internal details of how automake implements
+ # distcheck.  We check two directories because automake-1.15 changed
+ # from $(distdir)/_build to $(distdir)/_build/sub.
+ show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Merge branch 'bug25936-029' into bug25936-031

2018-05-03 Thread nickm
commit 59821050982a7e1c6906de61b6742546378e569c
Merge: bb35405d2 31865b502
Author: Taylor Yu 
Date:   Thu Apr 26 15:46:57 2018 -0500

Merge branch 'bug25936-029' into bug25936-031

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --cc Makefile.am
index 79d2e7852,f06d0e373..1a6d8e7d1
--- a/Makefile.am
+++ b/Makefile.am
@@@ -237,6 -217,11 +237,15 @@@ mostlyclean-local
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
  
 +clean-local:
 +  rm -rf $(top_builddir)/src/rust/target
 +  rm -rf $(top_builddir)/src/rust/.cargo/registry
++
+ # This relies on some internal details of how automake implements
+ # distcheck.  We check two directories because automake-1.15 changed
+ # from $(distdir)/_build to $(distdir)/_build/sub.
+ show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.2] Merge branch 'maint-0.3.2' into release-0.3.2

2018-05-03 Thread nickm
commit a1243864f263fdf9bc815ab31fa785f84d1b4b8d
Merge: 4b14ff45f be5b4415c
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.3.2' into release-0.3.2

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.2] Show test-suite.log for distcheck on Travis CI

2018-05-03 Thread nickm
commit 31865b50295753706ff3a9eb598e080bb2167639
Author: Taylor Yu 
Date:   Thu Apr 26 14:22:52 2018 -0500

Show test-suite.log for distcheck on Travis CI

When Travis CI runs make distcheck, test-suite.log doesn't exist in
the expected place.  Add a new make target to show this file and use
it when DISTCHECK=yes in .travis.yml.  Fixes bug 25814; bug not in any
released Tor.
---
 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 6da3027b8..6a3e1bfc0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -125,7 +125,9 @@ script:
 
 after_failure:
   ## `make check` will leave a log file with more details of test failures.
-  - cat test-suite.log
+  - if [[ "$DISTCHECK" == "" ]]; then cat test-suite.log; fi
+  ## `make distcheck` puts it somewhere different.
+  - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog; fi
 
 after_success:
   ## If this build was one that produced coverage, upload it.
diff --git a/Makefile.am b/Makefile.am
index f400728ba..f06d0e373 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -216,3 +216,12 @@ mostlyclean-local:
rm -rf $(HTML_COVER_DIR)
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
+
+# This relies on some internal details of how automake implements
+# distcheck.  We check two directories because automake-1.15 changed
+# from $(distdir)/_build to $(distdir)/_build/sub.
+show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Merge branch 'maint-0.3.1' into release-0.3.1

2018-05-03 Thread nickm
commit 8ddd84707e84836ecfd985647a4d5593bf151d35
Merge: 3bf89fb85 6361a250f
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.3.1' into release-0.3.1

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.2] Merge branch 'maint-0.3.1' into maint-0.3.2

2018-05-03 Thread nickm
commit be5b4415c2dce243a6249e6ca14b65423c9b0746
Merge: 246765342 6361a250f
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

2018-05-03 Thread nickm
commit 5227754b2f441c93da6436697a19841e9e71246f
Merge: d465bd27e 31865b502
Author: Nick Mathewson 
Date:   Thu May 3 13:38:37 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.2] Merge branch 'bug25936-029' into bug25936-031

2018-05-03 Thread nickm
commit 59821050982a7e1c6906de61b6742546378e569c
Merge: bb35405d2 31865b502
Author: Taylor Yu 
Date:   Thu Apr 26 15:46:57 2018 -0500

Merge branch 'bug25936-029' into bug25936-031

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --cc Makefile.am
index 79d2e7852,f06d0e373..1a6d8e7d1
--- a/Makefile.am
+++ b/Makefile.am
@@@ -237,6 -217,11 +237,15 @@@ mostlyclean-local
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
  
 +clean-local:
 +  rm -rf $(top_builddir)/src/rust/target
 +  rm -rf $(top_builddir)/src/rust/.cargo/registry
++
+ # This relies on some internal details of how automake implements
+ # distcheck.  We check two directories because automake-1.15 changed
+ # from $(distdir)/_build to $(distdir)/_build/sub.
+ show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.2] Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

2018-05-03 Thread nickm
commit 5227754b2f441c93da6436697a19841e9e71246f
Merge: d465bd27e 31865b502
Author: Nick Mathewson 
Date:   Thu May 3 13:38:37 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.2] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-05-03 Thread nickm
commit 6361a250f08421aa1e6db1093aaa488ee24ce77d
Merge: 726f238b7 5227754b2
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1

2018-05-03 Thread nickm
commit 726f238b723dfaa88df763bec7e923e99430ea87
Merge: 993e314c6 598210509
Author: Nick Mathewson 
Date:   Thu May 3 13:38:46 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Merge branch 'bug25936-029' into bug25936-031

2018-05-03 Thread nickm
commit 59821050982a7e1c6906de61b6742546378e569c
Merge: bb35405d2 31865b502
Author: Taylor Yu 
Date:   Thu Apr 26 15:46:57 2018 -0500

Merge branch 'bug25936-029' into bug25936-031

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --cc Makefile.am
index 79d2e7852,f06d0e373..1a6d8e7d1
--- a/Makefile.am
+++ b/Makefile.am
@@@ -237,6 -217,11 +237,15 @@@ mostlyclean-local
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
  
 +clean-local:
 +  rm -rf $(top_builddir)/src/rust/target
 +  rm -rf $(top_builddir)/src/rust/.cargo/registry
++
+ # This relies on some internal details of how automake implements
+ # distcheck.  We check two directories because automake-1.15 changed
+ # from $(distdir)/_build to $(distdir)/_build/sub.
+ show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-05-03 Thread nickm
commit 6361a250f08421aa1e6db1093aaa488ee24ce77d
Merge: 726f238b7 5227754b2
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.3.2' into maint-0.3.3

2018-05-03 Thread nickm
commit 4c6a407b9d9436948dbbecffde32e28380240728
Merge: 44626b37f be5b4415c
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.3.2' into maint-0.3.3




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Show test-suite.log for distcheck on Travis CI

2018-05-03 Thread nickm
commit 31865b50295753706ff3a9eb598e080bb2167639
Author: Taylor Yu 
Date:   Thu Apr 26 14:22:52 2018 -0500

Show test-suite.log for distcheck on Travis CI

When Travis CI runs make distcheck, test-suite.log doesn't exist in
the expected place.  Add a new make target to show this file and use
it when DISTCHECK=yes in .travis.yml.  Fixes bug 25814; bug not in any
released Tor.
---
 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 6da3027b8..6a3e1bfc0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -125,7 +125,9 @@ script:
 
 after_failure:
   ## `make check` will leave a log file with more details of test failures.
-  - cat test-suite.log
+  - if [[ "$DISTCHECK" == "" ]]; then cat test-suite.log; fi
+  ## `make distcheck` puts it somewhere different.
+  - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog; fi
 
 after_success:
   ## If this build was one that produced coverage, upload it.
diff --git a/Makefile.am b/Makefile.am
index f400728ba..f06d0e373 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -216,3 +216,12 @@ mostlyclean-local:
rm -rf $(HTML_COVER_DIR)
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
+
+# This relies on some internal details of how automake implements
+# distcheck.  We check two directories because automake-1.15 changed
+# from $(distdir)/_build to $(distdir)/_build/sub.
+show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Show test-suite.log for distcheck on Travis CI

2018-05-03 Thread nickm
commit 31865b50295753706ff3a9eb598e080bb2167639
Author: Taylor Yu 
Date:   Thu Apr 26 14:22:52 2018 -0500

Show test-suite.log for distcheck on Travis CI

When Travis CI runs make distcheck, test-suite.log doesn't exist in
the expected place.  Add a new make target to show this file and use
it when DISTCHECK=yes in .travis.yml.  Fixes bug 25814; bug not in any
released Tor.
---
 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 6da3027b8..6a3e1bfc0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -125,7 +125,9 @@ script:
 
 after_failure:
   ## `make check` will leave a log file with more details of test failures.
-  - cat test-suite.log
+  - if [[ "$DISTCHECK" == "" ]]; then cat test-suite.log; fi
+  ## `make distcheck` puts it somewhere different.
+  - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog; fi
 
 after_success:
   ## If this build was one that produced coverage, upload it.
diff --git a/Makefile.am b/Makefile.am
index f400728ba..f06d0e373 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -216,3 +216,12 @@ mostlyclean-local:
rm -rf $(HTML_COVER_DIR)
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
+
+# This relies on some internal details of how automake implements
+# distcheck.  We check two directories because automake-1.15 changed
+# from $(distdir)/_build to $(distdir)/_build/sub.
+show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-05-03 Thread nickm
commit 6361a250f08421aa1e6db1093aaa488ee24ce77d
Merge: 726f238b7 5227754b2
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.2.9] Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

2018-05-03 Thread nickm
commit 5227754b2f441c93da6436697a19841e9e71246f
Merge: d465bd27e 31865b502
Author: Nick Mathewson 
Date:   Thu May 3 13:38:37 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.2.9] Merge branch 'maint-0.2.9' into release-0.2.9

2018-05-03 Thread nickm
commit add0306cab6d16225eb1ae195064994cd3d1d481
Merge: 7d509bc17 5227754b2
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.2.9' into release-0.2.9

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.3.3'

2018-05-03 Thread nickm
commit 7f629f7fd9e6e5fe04367e611eae48f8f2bad81a
Merge: 667e66bb0 4c6a407b9
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.3.3'

 .travis.yml | 4 +++-
 Makefile.am | 8 
 2 files changed, 11 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.2.9] Show test-suite.log for distcheck on Travis CI

2018-05-03 Thread nickm
commit 31865b50295753706ff3a9eb598e080bb2167639
Author: Taylor Yu 
Date:   Thu Apr 26 14:22:52 2018 -0500

Show test-suite.log for distcheck on Travis CI

When Travis CI runs make distcheck, test-suite.log doesn't exist in
the expected place.  Add a new make target to show this file and use
it when DISTCHECK=yes in .travis.yml.  Fixes bug 25814; bug not in any
released Tor.
---
 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 6da3027b8..6a3e1bfc0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -125,7 +125,9 @@ script:
 
 after_failure:
   ## `make check` will leave a log file with more details of test failures.
-  - cat test-suite.log
+  - if [[ "$DISTCHECK" == "" ]]; then cat test-suite.log; fi
+  ## `make distcheck` puts it somewhere different.
+  - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog; fi
 
 after_success:
   ## If this build was one that produced coverage, upload it.
diff --git a/Makefile.am b/Makefile.am
index f400728ba..f06d0e373 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -216,3 +216,12 @@ mostlyclean-local:
rm -rf $(HTML_COVER_DIR)
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
+
+# This relies on some internal details of how automake implements
+# distcheck.  We check two directories because automake-1.15 changed
+# from $(distdir)/_build to $(distdir)/_build/sub.
+show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'bug25936-032' into bug25936-033

2018-05-03 Thread nickm
commit f0dc6c8e2a68764b73ea4b3fdb50f74b070c183b
Merge: 58f54a358 2edc9cd48
Author: Taylor Yu 
Date:   Thu Apr 26 16:07:56 2018 -0500

Merge branch 'bug25936-032' into bug25936-033

 .travis.yml | 4 +++-
 Makefile.am | 8 
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --cc Makefile.am
index 04ca88a23,4d2d9d222..08cb8e3e7
--- a/Makefile.am
+++ b/Makefile.am
@@@ -250,7 -248,11 +250,15 @@@ clean-local
rm -rf $(top_builddir)/src/rust/target
rm -rf $(top_builddir)/src/rust/.cargo/registry
  
 +if USE_RUST
 +distclean-local: distclean-rust
 +endif
 +
+ # This relies on some internal details of how automake implements
+ # distcheck.  We check two directories because automake-1.15 changed
+ # from $(distdir)/_build to $(distdir)/_build/sub.
+ show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.3.1' into maint-0.3.2

2018-05-03 Thread nickm
commit be5b4415c2dce243a6249e6ca14b65423c9b0746
Merge: 246765342 6361a250f
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1

2018-05-03 Thread nickm
commit 726f238b723dfaa88df763bec7e923e99430ea87
Merge: 993e314c6 598210509
Author: Nick Mathewson 
Date:   Thu May 3 13:38:46 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge remote-tracking branch 'catalyst-github/bug25936-033' into maint-0.3.3

2018-05-03 Thread nickm
commit 44626b37f6c6bcc1907cd269b8e9bc77909f9d51
Merge: 1bbe75da6 f0dc6c8e2
Author: Nick Mathewson 
Date:   Thu May 3 13:38:51 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-033' into maint-0.3.3

 .travis.yml | 4 +++-
 Makefile.am | 8 
 2 files changed, 11 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1

2018-05-03 Thread nickm
commit 726f238b723dfaa88df763bec7e923e99430ea87
Merge: 993e314c6 598210509
Author: Nick Mathewson 
Date:   Thu May 3 13:38:46 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] Merge branch 'maint-0.3.2' into maint-0.3.3

2018-05-03 Thread nickm
commit 4c6a407b9d9436948dbbecffde32e28380240728
Merge: 44626b37f be5b4415c
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.3.2' into maint-0.3.3

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.2] Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1

2018-05-03 Thread nickm
commit 726f238b723dfaa88df763bec7e923e99430ea87
Merge: 993e314c6 598210509
Author: Nick Mathewson 
Date:   Thu May 3 13:38:46 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] Merge branch 'bug25936-029' into bug25936-031

2018-05-03 Thread nickm
commit 59821050982a7e1c6906de61b6742546378e569c
Merge: bb35405d2 31865b502
Author: Taylor Yu 
Date:   Thu Apr 26 15:46:57 2018 -0500

Merge branch 'bug25936-029' into bug25936-031

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --cc Makefile.am
index 79d2e7852,f06d0e373..1a6d8e7d1
--- a/Makefile.am
+++ b/Makefile.am
@@@ -237,6 -217,11 +237,15 @@@ mostlyclean-local
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
  
 +clean-local:
 +  rm -rf $(top_builddir)/src/rust/target
 +  rm -rf $(top_builddir)/src/rust/.cargo/registry
++
+ # This relies on some internal details of how automake implements
+ # distcheck.  We check two directories because automake-1.15 changed
+ # from $(distdir)/_build to $(distdir)/_build/sub.
+ show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'bug25936-031' into bug25936-032

2018-05-03 Thread nickm
commit 2edc9cd48457169409841c794832172bc959e63a
Merge: 7c3f87eb4 598210509
Author: Taylor Yu 
Date:   Thu Apr 26 15:58:39 2018 -0500

Merge branch 'bug25936-031' into bug25936-032

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Show test-suite.log for distcheck on Travis CI

2018-05-03 Thread nickm
commit 31865b50295753706ff3a9eb598e080bb2167639
Author: Taylor Yu 
Date:   Thu Apr 26 14:22:52 2018 -0500

Show test-suite.log for distcheck on Travis CI

When Travis CI runs make distcheck, test-suite.log doesn't exist in
the expected place.  Add a new make target to show this file and use
it when DISTCHECK=yes in .travis.yml.  Fixes bug 25814; bug not in any
released Tor.
---
 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 6da3027b8..6a3e1bfc0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -125,7 +125,9 @@ script:
 
 after_failure:
   ## `make check` will leave a log file with more details of test failures.
-  - cat test-suite.log
+  - if [[ "$DISTCHECK" == "" ]]; then cat test-suite.log; fi
+  ## `make distcheck` puts it somewhere different.
+  - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog; fi
 
 after_success:
   ## If this build was one that produced coverage, upload it.
diff --git a/Makefile.am b/Makefile.am
index f400728ba..f06d0e373 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -216,3 +216,12 @@ mostlyclean-local:
rm -rf $(HTML_COVER_DIR)
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
+
+# This relies on some internal details of how automake implements
+# distcheck.  We check two directories because automake-1.15 changed
+# from $(distdir)/_build to $(distdir)/_build/sub.
+show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.2] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-05-03 Thread nickm
commit 6361a250f08421aa1e6db1093aaa488ee24ce77d
Merge: 726f238b7 5227754b2
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-05-03 Thread nickm
commit 6361a250f08421aa1e6db1093aaa488ee24ce77d
Merge: 726f238b7 5227754b2
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.2] Merge branch 'maint-0.3.1' into maint-0.3.2

2018-05-03 Thread nickm
commit be5b4415c2dce243a6249e6ca14b65423c9b0746
Merge: 246765342 6361a250f
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] Merge branch 'maint-0.3.1' into maint-0.3.2

2018-05-03 Thread nickm
commit be5b4415c2dce243a6249e6ca14b65423c9b0746
Merge: 246765342 6361a250f
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.3.1' into maint-0.3.2

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] Merge branch 'bug25936-032' into bug25936-033

2018-05-03 Thread nickm
commit f0dc6c8e2a68764b73ea4b3fdb50f74b070c183b
Merge: 58f54a358 2edc9cd48
Author: Taylor Yu 
Date:   Thu Apr 26 16:07:56 2018 -0500

Merge branch 'bug25936-032' into bug25936-033

 .travis.yml | 4 +++-
 Makefile.am | 8 
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --cc Makefile.am
index 04ca88a23,4d2d9d222..08cb8e3e7
--- a/Makefile.am
+++ b/Makefile.am
@@@ -250,7 -248,11 +250,15 @@@ clean-local
rm -rf $(top_builddir)/src/rust/target
rm -rf $(top_builddir)/src/rust/.cargo/registry
  
 +if USE_RUST
 +distclean-local: distclean-rust
 +endif
 +
+ # This relies on some internal details of how automake implements
+ # distcheck.  We check two directories because automake-1.15 changed
+ # from $(distdir)/_build to $(distdir)/_build/sub.
+ show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'bug25936-029' into bug25936-031

2018-05-03 Thread nickm
commit 59821050982a7e1c6906de61b6742546378e569c
Merge: bb35405d2 31865b502
Author: Taylor Yu 
Date:   Thu Apr 26 15:46:57 2018 -0500

Merge branch 'bug25936-029' into bug25936-031

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --cc Makefile.am
index 79d2e7852,f06d0e373..1a6d8e7d1
--- a/Makefile.am
+++ b/Makefile.am
@@@ -237,6 -217,11 +237,15 @@@ mostlyclean-local
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
  
 +clean-local:
 +  rm -rf $(top_builddir)/src/rust/target
 +  rm -rf $(top_builddir)/src/rust/.cargo/registry
++
+ # This relies on some internal details of how automake implements
+ # distcheck.  We check two directories because automake-1.15 changed
+ # from $(distdir)/_build to $(distdir)/_build/sub.
+ show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] Show test-suite.log for distcheck on Travis CI

2018-05-03 Thread nickm
commit 31865b50295753706ff3a9eb598e080bb2167639
Author: Taylor Yu 
Date:   Thu Apr 26 14:22:52 2018 -0500

Show test-suite.log for distcheck on Travis CI

When Travis CI runs make distcheck, test-suite.log doesn't exist in
the expected place.  Add a new make target to show this file and use
it when DISTCHECK=yes in .travis.yml.  Fixes bug 25814; bug not in any
released Tor.
---
 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 6da3027b8..6a3e1bfc0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -125,7 +125,9 @@ script:
 
 after_failure:
   ## `make check` will leave a log file with more details of test failures.
-  - cat test-suite.log
+  - if [[ "$DISTCHECK" == "" ]]; then cat test-suite.log; fi
+  ## `make distcheck` puts it somewhere different.
+  - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog; fi
 
 after_success:
   ## If this build was one that produced coverage, upload it.
diff --git a/Makefile.am b/Makefile.am
index f400728ba..f06d0e373 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -216,3 +216,12 @@ mostlyclean-local:
rm -rf $(HTML_COVER_DIR)
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
+
+# This relies on some internal details of how automake implements
+# distcheck.  We check two directories because automake-1.15 changed
+# from $(distdir)/_build to $(distdir)/_build/sub.
+show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.1] Merge branch 'maint-0.2.9' into maint-0.3.1

2018-05-03 Thread nickm
commit 6361a250f08421aa1e6db1093aaa488ee24ce77d
Merge: 726f238b7 5227754b2
Author: Nick Mathewson 
Date:   Thu May 3 13:38:54 2018 -0400

Merge branch 'maint-0.2.9' into maint-0.3.1

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.2] Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

2018-05-03 Thread nickm
commit 5227754b2f441c93da6436697a19841e9e71246f
Merge: d465bd27e 31865b502
Author: Nick Mathewson 
Date:   Thu May 3 13:38:37 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] Merge remote-tracking branch 'catalyst-github/bug25936-033' into maint-0.3.3

2018-05-03 Thread nickm
commit 44626b37f6c6bcc1907cd269b8e9bc77909f9d51
Merge: 1bbe75da6 f0dc6c8e2
Author: Nick Mathewson 
Date:   Thu May 3 13:38:51 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-033' into maint-0.3.3

 .travis.yml | 4 +++-
 Makefile.am | 8 
 2 files changed, 11 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

2018-05-03 Thread nickm
commit 5227754b2f441c93da6436697a19841e9e71246f
Merge: d465bd27e 31865b502
Author: Nick Mathewson 
Date:   Thu May 3 13:38:37 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

2018-05-03 Thread nickm
commit 5227754b2f441c93da6436697a19841e9e71246f
Merge: d465bd27e 31865b502
Author: Nick Mathewson 
Date:   Thu May 3 13:38:37 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] Merge branch 'bug25936-031' into bug25936-032

2018-05-03 Thread nickm
commit 2edc9cd48457169409841c794832172bc959e63a
Merge: 7c3f87eb4 598210509
Author: Taylor Yu 
Date:   Thu Apr 26 15:58:39 2018 -0500

Merge branch 'bug25936-031' into bug25936-032

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.2] Merge branch 'bug25936-029' into bug25936-031

2018-05-03 Thread nickm
commit 59821050982a7e1c6906de61b6742546378e569c
Merge: bb35405d2 31865b502
Author: Taylor Yu 
Date:   Thu Apr 26 15:46:57 2018 -0500

Merge branch 'bug25936-029' into bug25936-031

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --cc Makefile.am
index 79d2e7852,f06d0e373..1a6d8e7d1
--- a/Makefile.am
+++ b/Makefile.am
@@@ -237,6 -217,11 +237,15 @@@ mostlyclean-local
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
  
 +clean-local:
 +  rm -rf $(top_builddir)/src/rust/target
 +  rm -rf $(top_builddir)/src/rust/.cargo/registry
++
+ # This relies on some internal details of how automake implements
+ # distcheck.  We check two directories because automake-1.15 changed
+ # from $(distdir)/_build to $(distdir)/_build/sub.
+ show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.1] Merge branch 'bug25936-029' into bug25936-031

2018-05-03 Thread nickm
commit 59821050982a7e1c6906de61b6742546378e569c
Merge: bb35405d2 31865b502
Author: Taylor Yu 
Date:   Thu Apr 26 15:46:57 2018 -0500

Merge branch 'bug25936-029' into bug25936-031

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --cc Makefile.am
index 79d2e7852,f06d0e373..1a6d8e7d1
--- a/Makefile.am
+++ b/Makefile.am
@@@ -237,6 -217,11 +237,15 @@@ mostlyclean-local
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
  
 +clean-local:
 +  rm -rf $(top_builddir)/src/rust/target
 +  rm -rf $(top_builddir)/src/rust/.cargo/registry
++
+ # This relies on some internal details of how automake implements
+ # distcheck.  We check two directories because automake-1.15 changed
+ # from $(distdir)/_build to $(distdir)/_build/sub.
+ show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.2] Show test-suite.log for distcheck on Travis CI

2018-05-03 Thread nickm
commit 31865b50295753706ff3a9eb598e080bb2167639
Author: Taylor Yu 
Date:   Thu Apr 26 14:22:52 2018 -0500

Show test-suite.log for distcheck on Travis CI

When Travis CI runs make distcheck, test-suite.log doesn't exist in
the expected place.  Add a new make target to show this file and use
it when DISTCHECK=yes in .travis.yml.  Fixes bug 25814; bug not in any
released Tor.
---
 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 6da3027b8..6a3e1bfc0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -125,7 +125,9 @@ script:
 
 after_failure:
   ## `make check` will leave a log file with more details of test failures.
-  - cat test-suite.log
+  - if [[ "$DISTCHECK" == "" ]]; then cat test-suite.log; fi
+  ## `make distcheck` puts it somewhere different.
+  - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog; fi
 
 after_success:
   ## If this build was one that produced coverage, upload it.
diff --git a/Makefile.am b/Makefile.am
index f400728ba..f06d0e373 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -216,3 +216,12 @@ mostlyclean-local:
rm -rf $(HTML_COVER_DIR)
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
+
+# This relies on some internal details of how automake implements
+# distcheck.  We check two directories because automake-1.15 changed
+# from $(distdir)/_build to $(distdir)/_build/sub.
+show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.1] Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1

2018-05-03 Thread nickm
commit 726f238b723dfaa88df763bec7e923e99430ea87
Merge: 993e314c6 598210509
Author: Nick Mathewson 
Date:   Thu May 3 13:38:46 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.1] Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

2018-05-03 Thread nickm
commit 5227754b2f441c93da6436697a19841e9e71246f
Merge: d465bd27e 31865b502
Author: Nick Mathewson 
Date:   Thu May 3 13:38:37 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.1] Show test-suite.log for distcheck on Travis CI

2018-05-03 Thread nickm
commit 31865b50295753706ff3a9eb598e080bb2167639
Author: Taylor Yu 
Date:   Thu Apr 26 14:22:52 2018 -0500

Show test-suite.log for distcheck on Travis CI

When Travis CI runs make distcheck, test-suite.log doesn't exist in
the expected place.  Add a new make target to show this file and use
it when DISTCHECK=yes in .travis.yml.  Fixes bug 25814; bug not in any
released Tor.
---
 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 6da3027b8..6a3e1bfc0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -125,7 +125,9 @@ script:
 
 after_failure:
   ## `make check` will leave a log file with more details of test failures.
-  - cat test-suite.log
+  - if [[ "$DISTCHECK" == "" ]]; then cat test-suite.log; fi
+  ## `make distcheck` puts it somewhere different.
+  - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog; fi
 
 after_success:
   ## If this build was one that produced coverage, upload it.
diff --git a/Makefile.am b/Makefile.am
index f400728ba..f06d0e373 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -216,3 +216,12 @@ mostlyclean-local:
rm -rf $(HTML_COVER_DIR)
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
+
+# This relies on some internal details of how automake implements
+# distcheck.  We check two directories because automake-1.15 changed
+# from $(distdir)/_build to $(distdir)/_build/sub.
+show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.9] Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

2018-05-03 Thread nickm
commit 5227754b2f441c93da6436697a19841e9e71246f
Merge: d465bd27e 31865b502
Author: Nick Mathewson 
Date:   Thu May 3 13:38:37 2018 -0400

Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9

 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.9] Show test-suite.log for distcheck on Travis CI

2018-05-03 Thread nickm
commit 31865b50295753706ff3a9eb598e080bb2167639
Author: Taylor Yu 
Date:   Thu Apr 26 14:22:52 2018 -0500

Show test-suite.log for distcheck on Travis CI

When Travis CI runs make distcheck, test-suite.log doesn't exist in
the expected place.  Add a new make target to show this file and use
it when DISTCHECK=yes in .travis.yml.  Fixes bug 25814; bug not in any
released Tor.
---
 .travis.yml | 4 +++-
 Makefile.am | 9 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 6da3027b8..6a3e1bfc0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -125,7 +125,9 @@ script:
 
 after_failure:
   ## `make check` will leave a log file with more details of test failures.
-  - cat test-suite.log
+  - if [[ "$DISTCHECK" == "" ]]; then cat test-suite.log; fi
+  ## `make distcheck` puts it somewhere different.
+  - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog; fi
 
 after_success:
   ## If this build was one that produced coverage, upload it.
diff --git a/Makefile.am b/Makefile.am
index f400728ba..f06d0e373 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -216,3 +216,12 @@ mostlyclean-local:
rm -rf $(HTML_COVER_DIR)
rm -rf $(top_builddir)/doc/doxygen
rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
+
+# This relies on some internal details of how automake implements
+# distcheck.  We check two directories because automake-1.15 changed
+# from $(distdir)/_build to $(distdir)/_build/sub.
+show-distdir-testlog:
+   @if test -d "$(distdir)/_build/sub"; then \
+ cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+   else \
+ cat $(distdir)/_build/$(TEST_SUITE_LOG); fi



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] man page: FetchUselessDescriptors stops tor going idle

2018-05-03 Thread nickm
commit 9b1d5e8826e93f5d45a9d1ea7b7223fcfee2e484
Author: teor 
Date:   Wed May 2 10:46:00 2018 +1000

man page: FetchUselessDescriptors stops tor going idle

Also explain how FetchUselessDescriptors and UseMicrodescriptors are
different.

Closes 25998.
---
 doc/tor.1.txt | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/doc/tor.1.txt b/doc/tor.1.txt
index dd9f9cefa..2fc5c413c 100644
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@ -543,10 +543,13 @@ GENERAL OPTIONS
 If set to 1, Tor will fetch every consensus flavor, descriptor, and
 certificate that it hears about. Otherwise, it will avoid fetching useless
 descriptors: flavors that it is not using to build circuits, and authority
-certificates it does not trust. This option is useful if you're using a
+certificates it does not trust. Tor stops fetching descriptors if it
+hasn't built any circuits lately: this option makes Tor keep fetching
+descriptors, even when idle. This option is useful if you're using a
 tor client with an external parser that uses a full consensus.
 This option fetches all documents, **DirCache** fetches and serves
-all documents. (Default: 0)
+all documents, **UseMicrodescriptors 0** fetches full descriptors and uses
+them to build circuits. (Default: 0)
 
 [[HTTPProxy]] **HTTPProxy** __host__[:__port__]::
 Tor will make all its directory requests through this host:port (or host:80



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Merge remote-tracking branch 'teor/bug25998' into maint-0.3.3

2018-05-03 Thread nickm
commit 1bbe75da6db551e2c5afe32efe68eb8ea7b60048
Merge: c66b51267 d96ddf8f1
Author: Nick Mathewson 
Date:   Thu May 3 13:37:33 2018 -0400

Merge remote-tracking branch 'teor/bug25998' into maint-0.3.3

 doc/tor.1.txt | 35 ++-
 1 file changed, 22 insertions(+), 13 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] man page: FetchUselessDescriptors and DirCache exclude extra infos

2018-05-03 Thread nickm
commit d96ddf8f1b143934077bc4c1f54fa8a38087e342
Author: teor 
Date:   Wed May 2 11:29:48 2018 +1000

man page: FetchUselessDescriptors and DirCache exclude extra infos
---
 doc/tor.1.txt | 33 -
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/doc/tor.1.txt b/doc/tor.1.txt
index f003311d9..53a8c8fe5 100644
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@ -540,16 +540,21 @@ GENERAL OPTIONS
 (Default: 1)
 
 [[FetchUselessDescriptors]] **FetchUselessDescriptors** **0**|**1**::
-If set to 1, Tor will fetch every consensus flavor, descriptor, and
-certificate that it hears about. Otherwise, it will avoid fetching useless
-descriptors: flavors that it is not using to build circuits, and authority
-certificates it does not trust. Tor stops fetching descriptors if it
-hasn't built any circuits lately: this option makes Tor keep fetching
-descriptors, even when idle. This option is useful if you're using a
+If set to 1, Tor will fetch every consensus flavor, and all server
+descriptors and authority certificates referenced by those consensuses,
+except for extra info descriptors. When this option is 1, Tor will also
+keep fetching descriptors, even when idle.
+If set to 0, Tor will avoid fetching useless descriptors: flavors that it
+is not using to build circuits, and authority certificates it does not
+trust. When Tor hasn't built any application circuits, it will go idle,
+and stop fetching descriptors. This option is useful if you're using a
 tor client with an external parser that uses a full consensus.
-This option fetches all documents, **DirCache** fetches and serves
-all documents, **UseMicrodescriptors 0** fetches full descriptors and uses
-them to build circuits. (Default: 0)
+This option fetches all documents except extrainfo descriptors,
+**DirCache** fetches and serves all documents except extrainfo
+descriptors, **DownloadExtraInfo*** fetches extrainfo documents, and serves
+them if **DirCache** is on, and **UseMicrodescriptors** changes the
+flavour of consensues and descriptors that is fetched and used for
+building circuits. (Default: 0)
 
 [[HTTPProxy]] **HTTPProxy** __host__[:__port__]::
 Tor will make all its directory requests through this host:port (or host:80
@@ -2392,10 +2397,12 @@ details.)
 some entry in the policy is accepted.
 
 [[DirCache]] **DirCache** **0**|**1**::
-When this option is set, Tor caches all current directory documents and
-accepts client requests for them. Setting DirPort is not required for this,
-because clients connect via the ORPort by default. Setting either DirPort
-or BridgeRelay and setting DirCache to 0 is not supported.  (Default: 1)
+When this option is set, Tor caches all current directory documents except
+extra info documents, and accepts client requests for them. If
+**DownloadExtraInfo** is set, cached extra info documents are also cached.
+Setting **DirPort** is not required for **DirCache**, because clients
+connect via the ORPort by default. Setting either DirPort or BridgeRelay
+and setting DirCache to 0 is not supported.  (Default: 1)
 
 [[MaxConsensusAgeForDiffs]] **MaxConsensusAgeForDiffs**  __N__ 
**minutes**|**hours**|**days**|**weeks**::
 When this option is nonzero, Tor caches will not try to generate



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] Merge branch 'maint-0.3.3' into release-0.3.3

2018-05-03 Thread nickm
commit f6890422aa954ea2dd23bc4bc55f5716e88dcd7e
Merge: 8e81d329e 1bbe75da6
Author: Nick Mathewson 
Date:   Thu May 3 13:37:37 2018 -0400

Merge branch 'maint-0.3.3' into release-0.3.3

 doc/tor.1.txt | 35 ++-
 1 file changed, 22 insertions(+), 13 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.3] man page: UseMicrodescriptors auto and 1 are the same now

2018-05-03 Thread nickm
commit 4a7590c241dbb86571de670fec3f143d27f15cb7
Author: teor 
Date:   Wed May 2 10:46:10 2018 +1000

man page: UseMicrodescriptors auto and 1 are the same now
---
 doc/tor.1.txt | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/doc/tor.1.txt b/doc/tor.1.txt
index 2fc5c413c..f003311d9 100644
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@ -1636,9 +1636,8 @@ The following options are useful only for clients (that 
is, if
 in order to build its circuits.  Using microdescriptors makes Tor clients
 download less directory information, thus saving bandwidth.  Directory
 caches need to fetch regular descriptors and microdescriptors, so this
-option doesn't save any bandwidth for them.  If this option is set to
-"auto" (recommended) then it is on for all clients that do not set
-FetchUselessDescriptors. (Default: auto)
+option doesn't save any bandwidth for them.  For legacy reasons, auto is
+accepted, but it has the same effect as 1. (Default: auto)
 
 [[PathBiasCircThreshold]] **PathBiasCircThreshold** __NUM__ +
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] Merge remote-tracking branch 'teor/bug25998' into maint-0.3.3

2018-05-03 Thread nickm
commit 1bbe75da6db551e2c5afe32efe68eb8ea7b60048
Merge: c66b51267 d96ddf8f1
Author: Nick Mathewson 
Date:   Thu May 3 13:37:33 2018 -0400

Merge remote-tracking branch 'teor/bug25998' into maint-0.3.3

 doc/tor.1.txt | 35 ++-
 1 file changed, 22 insertions(+), 13 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] man page: UseMicrodescriptors auto and 1 are the same now

2018-05-03 Thread nickm
commit 4a7590c241dbb86571de670fec3f143d27f15cb7
Author: teor 
Date:   Wed May 2 10:46:10 2018 +1000

man page: UseMicrodescriptors auto and 1 are the same now
---
 doc/tor.1.txt | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/doc/tor.1.txt b/doc/tor.1.txt
index 2fc5c413c..f003311d9 100644
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@ -1636,9 +1636,8 @@ The following options are useful only for clients (that 
is, if
 in order to build its circuits.  Using microdescriptors makes Tor clients
 download less directory information, thus saving bandwidth.  Directory
 caches need to fetch regular descriptors and microdescriptors, so this
-option doesn't save any bandwidth for them.  If this option is set to
-"auto" (recommended) then it is on for all clients that do not set
-FetchUselessDescriptors. (Default: auto)
+option doesn't save any bandwidth for them.  For legacy reasons, auto is
+accepted, but it has the same effect as 1. (Default: auto)
 
 [[PathBiasCircThreshold]] **PathBiasCircThreshold** __NUM__ +
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.3] man page: FetchUselessDescriptors and DirCache exclude extra infos

2018-05-03 Thread nickm
commit d96ddf8f1b143934077bc4c1f54fa8a38087e342
Author: teor 
Date:   Wed May 2 11:29:48 2018 +1000

man page: FetchUselessDescriptors and DirCache exclude extra infos
---
 doc/tor.1.txt | 33 -
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/doc/tor.1.txt b/doc/tor.1.txt
index f003311d9..53a8c8fe5 100644
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@ -540,16 +540,21 @@ GENERAL OPTIONS
 (Default: 1)
 
 [[FetchUselessDescriptors]] **FetchUselessDescriptors** **0**|**1**::
-If set to 1, Tor will fetch every consensus flavor, descriptor, and
-certificate that it hears about. Otherwise, it will avoid fetching useless
-descriptors: flavors that it is not using to build circuits, and authority
-certificates it does not trust. Tor stops fetching descriptors if it
-hasn't built any circuits lately: this option makes Tor keep fetching
-descriptors, even when idle. This option is useful if you're using a
+If set to 1, Tor will fetch every consensus flavor, and all server
+descriptors and authority certificates referenced by those consensuses,
+except for extra info descriptors. When this option is 1, Tor will also
+keep fetching descriptors, even when idle.
+If set to 0, Tor will avoid fetching useless descriptors: flavors that it
+is not using to build circuits, and authority certificates it does not
+trust. When Tor hasn't built any application circuits, it will go idle,
+and stop fetching descriptors. This option is useful if you're using a
 tor client with an external parser that uses a full consensus.
-This option fetches all documents, **DirCache** fetches and serves
-all documents, **UseMicrodescriptors 0** fetches full descriptors and uses
-them to build circuits. (Default: 0)
+This option fetches all documents except extrainfo descriptors,
+**DirCache** fetches and serves all documents except extrainfo
+descriptors, **DownloadExtraInfo*** fetches extrainfo documents, and serves
+them if **DirCache** is on, and **UseMicrodescriptors** changes the
+flavour of consensues and descriptors that is fetched and used for
+building circuits. (Default: 0)
 
 [[HTTPProxy]] **HTTPProxy** __host__[:__port__]::
 Tor will make all its directory requests through this host:port (or host:80
@@ -2392,10 +2397,12 @@ details.)
 some entry in the policy is accepted.
 
 [[DirCache]] **DirCache** **0**|**1**::
-When this option is set, Tor caches all current directory documents and
-accepts client requests for them. Setting DirPort is not required for this,
-because clients connect via the ORPort by default. Setting either DirPort
-or BridgeRelay and setting DirCache to 0 is not supported.  (Default: 1)
+When this option is set, Tor caches all current directory documents except
+extra info documents, and accepts client requests for them. If
+**DownloadExtraInfo** is set, cached extra info documents are also cached.
+Setting **DirPort** is not required for **DirCache**, because clients
+connect via the ORPort by default. Setting either DirPort or BridgeRelay
+and setting DirCache to 0 is not supported.  (Default: 1)
 
 [[MaxConsensusAgeForDiffs]] **MaxConsensusAgeForDiffs**  __N__ 
**minutes**|**hours**|**days**|**weeks**::
 When this option is nonzero, Tor caches will not try to generate



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.3.3'

2018-05-03 Thread nickm
commit 667e66bb091829cb4b5af351af17f854f527d6d7
Merge: 5e0316142 1bbe75da6
Author: Nick Mathewson 
Date:   Thu May 3 13:37:37 2018 -0400

Merge branch 'maint-0.3.3'

 doc/tor.1.txt | 35 ++-
 1 file changed, 22 insertions(+), 13 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge remote-tracking branch 'teor/bug25998' into maint-0.3.3

2018-05-03 Thread nickm
commit 1bbe75da6db551e2c5afe32efe68eb8ea7b60048
Merge: c66b51267 d96ddf8f1
Author: Nick Mathewson 
Date:   Thu May 3 13:37:33 2018 -0400

Merge remote-tracking branch 'teor/bug25998' into maint-0.3.3

 doc/tor.1.txt | 35 ++-
 1 file changed, 22 insertions(+), 13 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] man page: FetchUselessDescriptors and DirCache exclude extra infos

2018-05-03 Thread nickm
commit d96ddf8f1b143934077bc4c1f54fa8a38087e342
Author: teor 
Date:   Wed May 2 11:29:48 2018 +1000

man page: FetchUselessDescriptors and DirCache exclude extra infos
---
 doc/tor.1.txt | 33 -
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/doc/tor.1.txt b/doc/tor.1.txt
index f003311d9..53a8c8fe5 100644
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@ -540,16 +540,21 @@ GENERAL OPTIONS
 (Default: 1)
 
 [[FetchUselessDescriptors]] **FetchUselessDescriptors** **0**|**1**::
-If set to 1, Tor will fetch every consensus flavor, descriptor, and
-certificate that it hears about. Otherwise, it will avoid fetching useless
-descriptors: flavors that it is not using to build circuits, and authority
-certificates it does not trust. Tor stops fetching descriptors if it
-hasn't built any circuits lately: this option makes Tor keep fetching
-descriptors, even when idle. This option is useful if you're using a
+If set to 1, Tor will fetch every consensus flavor, and all server
+descriptors and authority certificates referenced by those consensuses,
+except for extra info descriptors. When this option is 1, Tor will also
+keep fetching descriptors, even when idle.
+If set to 0, Tor will avoid fetching useless descriptors: flavors that it
+is not using to build circuits, and authority certificates it does not
+trust. When Tor hasn't built any application circuits, it will go idle,
+and stop fetching descriptors. This option is useful if you're using a
 tor client with an external parser that uses a full consensus.
-This option fetches all documents, **DirCache** fetches and serves
-all documents, **UseMicrodescriptors 0** fetches full descriptors and uses
-them to build circuits. (Default: 0)
+This option fetches all documents except extrainfo descriptors,
+**DirCache** fetches and serves all documents except extrainfo
+descriptors, **DownloadExtraInfo*** fetches extrainfo documents, and serves
+them if **DirCache** is on, and **UseMicrodescriptors** changes the
+flavour of consensues and descriptors that is fetched and used for
+building circuits. (Default: 0)
 
 [[HTTPProxy]] **HTTPProxy** __host__[:__port__]::
 Tor will make all its directory requests through this host:port (or host:80
@@ -2392,10 +2397,12 @@ details.)
 some entry in the policy is accepted.
 
 [[DirCache]] **DirCache** **0**|**1**::
-When this option is set, Tor caches all current directory documents and
-accepts client requests for them. Setting DirPort is not required for this,
-because clients connect via the ORPort by default. Setting either DirPort
-or BridgeRelay and setting DirCache to 0 is not supported.  (Default: 1)
+When this option is set, Tor caches all current directory documents except
+extra info documents, and accepts client requests for them. If
+**DownloadExtraInfo** is set, cached extra info documents are also cached.
+Setting **DirPort** is not required for **DirCache**, because clients
+connect via the ORPort by default. Setting either DirPort or BridgeRelay
+and setting DirCache to 0 is not supported.  (Default: 1)
 
 [[MaxConsensusAgeForDiffs]] **MaxConsensusAgeForDiffs**  __N__ 
**minutes**|**hours**|**days**|**weeks**::
 When this option is nonzero, Tor caches will not try to generate



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


  1   2   >