tor-commits
Threads by month
- ----- 2026 -----
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
January 2019
- 15 participants
- 2082 discussions
23 Jan '19
commit 733cfbdb5ae804010555959145e9fdd22dbc8c4e
Author: teor <teor(a)torproject.org>
Date: Tue Jan 22 10:03:08 2019 +1000
Clarify relay line and key value orders
---
bandwidth-file-spec.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bandwidth-file-spec.txt b/bandwidth-file-spec.txt
index bef87b8..3fc7582 100644
--- a/bandwidth-file-spec.txt
+++ b/bandwidth-file-spec.txt
@@ -313,8 +313,8 @@
2.3. Relay Line format
- It consists of zero or more RelayLines with the relays' bandwidth
- in arbitrary order.
+ It consists of zero or more RelayLines containing relay ids and
+ bandwidths. The relays and their KeyValues are in arbitrary order.
There MUST NOT be multiple KeyValue pairs with the same key in the same
RelayLine. If there are, the parser SHOULD choose an arbitrary Value.
1
0
commit 9b206eda055fd9bc288526ad1dd094677528cdad
Author: teor <teor(a)torproject.org>
Date: Tue Jan 22 09:55:00 2019 +1000
Clarify header and relay line order
---
bandwidth-file-spec.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bandwidth-file-spec.txt b/bandwidth-file-spec.txt
index 965191d..bef87b8 100644
--- a/bandwidth-file-spec.txt
+++ b/bandwidth-file-spec.txt
@@ -65,9 +65,9 @@
2. Format details
The Bandwidth List MUST contain the following sections:
- - Header List (exactly once), which is an ordered list of
+ - Header List (exactly once), which is a partially ordered list of
- Header Lines (one or more times), then
- - Relay Lines (zero or more times), which is an unordered list.
+ - Relay Lines (zero or more times), in an arbitrary order.
If it does not contain these sections, parsers SHOULD ignore the file.
2.1. Definitions
1
0
[torspec/master] Allow parsers to fail files with duplicate relay lines
by nickm@torproject.org 23 Jan '19
by nickm@torproject.org 23 Jan '19
23 Jan '19
commit b03483635d7e3c9371054643fc5140f650706ae0
Author: teor <teor(a)torproject.org>
Date: Tue Jan 22 10:15:34 2019 +1000
Allow parsers to fail files with duplicate relay lines
---
bandwidth-file-spec.txt | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bandwidth-file-spec.txt b/bandwidth-file-spec.txt
index 714c456..a940904 100644
--- a/bandwidth-file-spec.txt
+++ b/bandwidth-file-spec.txt
@@ -319,9 +319,10 @@
There MUST NOT be multiple KeyValue pairs with the same key in the same
RelayLine. If there are, the parser SHOULD choose an arbitrary Value.
- There MUST NOT be multiple RelayLine per relay identity (node_id or
+ There MUST NOT be multiple RelayLines per relay identity (node_id or
master_key_ed25519). If there are, parsers SHOULD issue a warning.
- Parers MAY choose an arbitrary value, or ignore both values.
+ Parers MAY reject the file, choose an arbitrary RelayLine, or ignore
+ both RelayLines.
If a parser does not recognize any extra material in a RelayLine,
the extra material MUST be ignored.
1
0
commit 9a3f014c826a15c4cf25dbcff198b1657c33946e
Author: teor <teor(a)torproject.org>
Date: Tue Jan 22 10:17:30 2019 +1000
Spacing
---
bandwidth-file-spec.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bandwidth-file-spec.txt b/bandwidth-file-spec.txt
index a940904..385bdb6 100644
--- a/bandwidth-file-spec.txt
+++ b/bandwidth-file-spec.txt
@@ -100,7 +100,7 @@
Timestamp ::= Int
Bandwidth ::= Int
MasterKey ::= a base64-encoded Ed25519 public key, with
- padding characters omitted.
+ padding characters omitted.
DateTime ::= "YYYY-MM-DDTHH:MM:SS", as in ISO 8601
Note that key_value and value are defined in Tor directory protocol
1
0
[torspec/master] bandwidth: Prefer a 5-character header terminator
by nickm@torproject.org 23 Jan '19
by nickm@torproject.org 23 Jan '19
23 Jan '19
commit 7f573b3c5968c3e59a15dfc05c0a21b194373c97
Author: teor <teor(a)torproject.org>
Date: Wed Jan 23 08:17:20 2019 +1000
bandwidth: Prefer a 5-character header terminator
---
bandwidth-file-spec.txt | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/bandwidth-file-spec.txt b/bandwidth-file-spec.txt
index 385bdb6..fe9d056 100644
--- a/bandwidth-file-spec.txt
+++ b/bandwidth-file-spec.txt
@@ -96,7 +96,7 @@
Value ::= ArgumentCharValue+
ArgumentCharValue ::= any printing ASCII character except NL and SP.
Terminator ::= "=====" or "===="
- Note: sbws versions 0.1.0 to 1.0.2 used a 4-character terminator.
+ Generators SHOULD use a 5-charatcer terminator.
Timestamp ::= Int
Bandwidth ::= Int
MasterKey ::= a base64-encoded Ed25519 public key, with
@@ -305,11 +305,17 @@
[Zero or one time.]
- The Header List section ends with this Terminator.
+ The Header List section ends with a Terminator.
In version 1.0.0, Header List ends when the first relay bandwidth
is found conforming to the next section.
- Implementations of version 1.1.0 and later SHOULD include this Line.
+
+ Implementations of version 1.1.0 and later SHOULD use a 5-character
+ terminator.
+
+ Tor 0.4.0.1-alpha and later look for a 5-character terminator,
+ or the first relay bandwidth line. sbws versions 0.1.0 to 1.0.2
+ used a 4-character terminator, this bug was fixed in 1.0.3.
2.3. Relay Line format
1
0
commit 63676e7c2f0b12ea3e3454d1e6431dd924e4d83d
Author: teor <teor(a)torproject.org>
Date: Wed Jan 23 08:23:13 2019 +1000
bandwidth: typos and spacing
---
bandwidth-file-spec.txt | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/bandwidth-file-spec.txt b/bandwidth-file-spec.txt
index fe9d056..96b5d03 100644
--- a/bandwidth-file-spec.txt
+++ b/bandwidth-file-spec.txt
@@ -44,20 +44,21 @@
1.4. Format Versions
- 1.0.0 - The legacy fallback Bandwidth List format
+ 1.0.0 - The legacy fallback Bandwidth List format
- 1.1.0 - Add a header containing information about the bandwidth
- file. Document the sbws and Torflow relay line keys.
+ 1.1.0 - Add a header containing information about the bandwidth
+ file. Document the sbws and Torflow relay line keys.
- 1.2.0 - If there are not enough eligible relays, the bandwidth file
- SHOULD contain a header, but no relays. (To match Torflow's
- existing behaviour.)
- Adds new KeyValue Lines to the Header List section with
- statistics about the number of relays included in the file.
- Add new KeyValue Lines to the Relays' Bandwidth List section
- with different bandwidth values.
+ 1.2.0 - If there are not enough eligible relays, the bandwidth file
+ SHOULD contain a header, but no relays. (To match Torflow's
+ existing behaviour.)
+ Adds new KeyValue Lines to the Header List section with
+ statistics about the number of relays included in the file.
+ Add new KeyValue Lines to the Relays' Bandwidth List section
+ with different bandwidth values.
All Tor versions can consume format version 1.0.0.
+
All Tor versions can consume format version 1.1.0 and later,
but Tor versions earlier than 0.3.5.1-alpha warn if the header
contains any KeyValue lines after the Timestamp.
@@ -96,7 +97,7 @@
Value ::= ArgumentCharValue+
ArgumentCharValue ::= any printing ASCII character except NL and SP.
Terminator ::= "=====" or "===="
- Generators SHOULD use a 5-charatcer terminator.
+ Generators SHOULD use a 5-character terminator.
Timestamp ::= Int
Bandwidth ::= Int
MasterKey ::= a base64-encoded Ed25519 public key, with
1
0
23 Jan '19
commit 6e9a14b030bc1a7b9d2919bda637d01ea34fc021
Merge: 7954202 63676e7
Author: Nick Mathewson <nickm(a)torproject.org>
Date: Wed Jan 23 11:15:26 2019 -0500
Merge remote-tracking branch 'tor-github/pr/51'
bandwidth-file-spec.txt | 756 ++++++++++++++++++++++++------------------------
1 file changed, 384 insertions(+), 372 deletions(-)
1
0
[torsocks/master] Add getdents / getdents64 support re ticket 28861
by dgoulet@torproject.org 23 Jan '19
by dgoulet@torproject.org 23 Jan '19
23 Jan '19
commit 4c00ec8773fd63fa48ef49e1ccf2adac598427be
Author: Alejandro Alvarado <44826516+seisvelas(a)users.noreply.github.com>
Date: Mon Dec 17 19:25:18 2018 -0600
Add getdents / getdents64 support re ticket 28861
---
src/common/compat.h | 8 ++++++++
src/lib/syscall.c | 37 +++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+)
diff --git a/src/common/compat.h b/src/common/compat.h
index a9b73c2..d79301f 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -129,6 +129,12 @@ void tsocks_once(tsocks_once_t *o, void (*init_routine)(void));
#ifndef __NR_memfd_create
#define __NR_memfd_create -19
#endif
+#ifndef __NR_getdents
+#define __NR_getdents -20
+#endif
+#ifndef __NR_getdents64
+#define __NR_getdents64 -21
+#endif
#define TSOCKS_NR_SOCKET __NR_socket
#define TSOCKS_NR_CONNECT __NR_connect
@@ -149,6 +155,8 @@ void tsocks_once(tsocks_once_t *o, void (*init_routine)(void));
#define TSOCKS_NR_CLOCK_GETTIME __NR_clock_gettime
#define TSOCKS_NR_FORK __NR_fork
#define TSOCKS_NR_MEMFD_CREATE __NR_memfd_create
+#define TSOCKS_NR_GETDENTS __NR_getdents
+#define TSOCKS_NR_GETDENTS64 __NR_getdents64
/*
* Despite glibc providing wrappers for these calls for a long time
diff --git a/src/lib/syscall.c b/src/lib/syscall.c
index 7fba580..f793da7 100644
--- a/src/lib/syscall.c
+++ b/src/lib/syscall.c
@@ -437,6 +437,37 @@ static LIBC_SYSCALL_RET_TYPE handle_memfd_create(va_list args)
return tsocks_libc_syscall(TSOCKS_NR_MEMFD_CREATE, name, flags);
}
+/*
+ * Handle getdents(2) syscall.
+ */
+static LIBC_SYSCALL_RET_TYPE handle_getdents(va_list args)
+{
+ unsigned int fd;
+ struct linux_dirent *dirp;
+ unsigned int count;
+
+ fd = va_arg(args, __typeof__(fd));
+ dirp = va_arg(args, __typeof__(dirp));
+ count = va_arg(args, __typeof__(count));
+
+ return tsocks_libc_syscall(TSOCKS_NR_GETDENTS, fd, dirp, count);
+}
+/*
+ * Handle getdents64(2) syscall.
+ */
+static LIBC_SYSCALL_RET_TYPE handle_getdents64(va_list args)
+{
+ unsigned int fd;
+ struct linux_dirent64 *dirp;
+ unsigned int count;
+
+ fd = va_arg(args, __typeof__(fd));
+ dirp = va_arg(args, __typeof__(dirp));
+ count = va_arg(args, __typeof__(count));
+
+ return tsocks_libc_syscall(TSOCKS_NR_GETDENTS64, fd, dirp, count);
+}
+
#endif /* __linux__ */
/*
@@ -558,6 +589,12 @@ LIBC_SYSCALL_RET_TYPE tsocks_syscall(long int number, va_list args)
case TSOCKS_NR_MEMFD_CREATE:
ret = handle_memfd_create(args);
break;
+ case TSOCKS_NR_GETDENTS:
+ ret = handle_getdents(args);
+ break;
+ case TSOCKS_NR_GETDENTS64:
+ ret = handle_getdents64(args);
+ break;
#endif /* __linux__ */
default:
/*
1
0
23 Jan '19
commit df0a34f5004a909c57906739e6e27c0b72a12998
Author: juga0 <juga(a)riseup.net>
Date: Sat Jan 5 17:43:31 2019 +0000
Stop including tests network as binary blob
To easy diffs and avoid security issues.
Fixes bug #28590. Bugfix v0.4.0.
---
tests/integration/net.tar | Bin 215040 -> 0 bytes
tests/integration/net/auth1/fingerprint | 1 +
.../net/auth1/keys/authority_certificate | 46 +++++++
.../net/auth1/keys/authority_identity_key | 41 +++++++
.../net/auth1/keys/authority_signing_key | 27 ++++
.../net/auth1/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/auth1/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/auth1/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/auth1/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/auth1/keys/secret_id_key | 15 +++
tests/integration/net/auth1/keys/secret_onion_key | 15 +++
.../net/auth1/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/auth1/torrc | 34 ++++++
tests/integration/net/auth2/fingerprint | 1 +
.../net/auth2/keys/authority_certificate | 46 +++++++
.../net/auth2/keys/authority_identity_key | 41 +++++++
.../net/auth2/keys/authority_signing_key | 27 ++++
.../net/auth2/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/auth2/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/auth2/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/auth2/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/auth2/keys/secret_id_key | 15 +++
tests/integration/net/auth2/keys/secret_onion_key | 15 +++
.../net/auth2/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/auth2/torrc | 34 ++++++
tests/integration/net/auth3/fingerprint | 1 +
.../net/auth3/keys/authority_certificate | 46 +++++++
.../net/auth3/keys/authority_identity_key | 41 +++++++
.../net/auth3/keys/authority_signing_key | 27 ++++
.../net/auth3/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/auth3/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/auth3/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/auth3/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/auth3/keys/secret_id_key | 15 +++
tests/integration/net/auth3/keys/secret_onion_key | 15 +++
.../net/auth3/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/auth3/torrc | 34 ++++++
tests/integration/net/exit1/fingerprint | 1 +
.../net/exit1/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/exit1/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/exit1/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/exit1/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/exit1/keys/secret_id_key | 15 +++
tests/integration/net/exit1/keys/secret_onion_key | 15 +++
.../net/exit1/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/exit1/torrc | 27 ++++
tests/integration/net/exit2/fingerprint | 1 +
.../net/exit2/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/exit2/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/exit2/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/exit2/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/exit2/keys/secret_id_key | 15 +++
tests/integration/net/exit2/keys/secret_onion_key | 15 +++
.../net/exit2/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/exit2/torrc | 27 ++++
tests/integration/net/exit3/fingerprint | 1 +
.../net/exit3/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/exit3/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/exit3/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/exit3/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/exit3/keys/secret_id_key | 15 +++
tests/integration/net/exit3/keys/secret_onion_key | 15 +++
.../net/exit3/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/exit3/torrc | 27 ++++
tests/integration/net/relay1/fingerprint | 1 +
.../net/relay1/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/relay1/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay1/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/relay1/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/relay1/keys/secret_id_key | 15 +++
tests/integration/net/relay1/keys/secret_onion_key | 15 +++
.../net/relay1/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay1/torrc | 24 ++++
tests/integration/net/relay1mbyteMAB/fingerprint | 1 +
.../keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay1mbyteMAB/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../relay1mbyteMAB/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
.../net/relay1mbyteMAB/keys/secret_id_key | 15 +++
.../net/relay1mbyteMAB/keys/secret_onion_key | 15 +++
.../net/relay1mbyteMAB/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay1mbyteMAB/torrc | 25 ++++
tests/integration/net/relay1mbyteRBR/fingerprint | 1 +
.../keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay1mbyteRBR/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../relay1mbyteRBR/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
.../net/relay1mbyteRBR/keys/secret_id_key | 15 +++
.../net/relay1mbyteRBR/keys/secret_onion_key | 15 +++
.../net/relay1mbyteRBR/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay1mbyteRBR/torrc | 25 ++++
tests/integration/net/relay2/fingerprint | 1 +
.../net/relay2/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/relay2/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay2/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/relay2/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/relay2/keys/secret_id_key | 15 +++
tests/integration/net/relay2/keys/secret_onion_key | 15 +++
.../net/relay2/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay2/torrc | 24 ++++
tests/integration/net/relay3/fingerprint | 1 +
.../net/relay3/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/relay3/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay3/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/relay3/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/relay3/keys/secret_id_key | 15 +++
tests/integration/net/relay3/keys/secret_onion_key | 15 +++
.../net/relay3/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay3/torrc | 24 ++++
tests/integration/net/relay4/fingerprint | 1 +
.../net/relay4/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/relay4/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay4/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/relay4/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/relay4/keys/secret_id_key | 15 +++
tests/integration/net/relay4/keys/secret_onion_key | 15 +++
.../net/relay4/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay4/torrc | 24 ++++
tests/integration/net/relay5/fingerprint | 1 +
.../net/relay5/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/relay5/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay5/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/relay5/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/relay5/keys/secret_id_key | 15 +++
tests/integration/net/relay5/keys/secret_onion_key | 15 +++
.../net/relay5/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay5/torrc | 24 ++++
tests/integration/net/relay6/fingerprint | 1 +
.../net/relay6/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/relay6/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay6/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/relay6/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/relay6/keys/secret_id_key | 15 +++
tests/integration/net/relay6/keys/secret_onion_key | 15 +++
.../net/relay6/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay6/torrc | 24 ++++
tests/integration/net/relay7/fingerprint | 1 +
.../net/relay7/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/relay7/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay7/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/relay7/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/relay7/keys/secret_id_key | 15 +++
tests/integration/net/relay7/keys/secret_onion_key | 15 +++
.../net/relay7/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay7/torrc | 24 ++++
tests/integration/net/start.sh | 15 +++
tests/integration/net/stop.sh | 4 +
tests/integration/net/wait.py | 136 +++++++++++++++++++++
tox.ini | 5 +-
149 files changed, 1366 insertions(+), 2 deletions(-)
diff --git a/tests/integration/net.tar b/tests/integration/net.tar
deleted file mode 100644
index 2870690..0000000
Binary files a/tests/integration/net.tar and /dev/null differ
diff --git a/tests/integration/net/auth1/fingerprint b/tests/integration/net/auth1/fingerprint
new file mode 100644
index 0000000..35f9670
--- /dev/null
+++ b/tests/integration/net/auth1/fingerprint
@@ -0,0 +1 @@
+auth1 AA45C13025C037F056E734169891878ED0880231
diff --git a/tests/integration/net/auth1/keys/authority_certificate b/tests/integration/net/auth1/keys/authority_certificate
new file mode 100644
index 0000000..7797dc0
--- /dev/null
+++ b/tests/integration/net/auth1/keys/authority_certificate
@@ -0,0 +1,46 @@
+dir-key-certificate-version 3
+dir-address 127.10.0.1:2003
+fingerprint D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD
+dir-key-published 2018-06-01 15:55:49
+dir-key-expires 2020-06-01 15:55:49
+dir-identity-key
+-----BEGIN RSA PUBLIC KEY-----
+MIIBigKCAYEAsIDnUuNB5InQb7ipbXwLpIEtkFowYfkjqFlUVCh9LkMoOzlPcQOd
+opYDjCD9DLuzMG+d37Q+50V08z2NHOzlRre8RwXvAyPoDoWtPLvvrHetBScZjYYP
+Y1FqUsooD1O9hANN/sTcVYxVIALLYHnxoQMcZciYh4cGriKqxQb3jaRaxVVmH/K4
+PCQ8h+Tlak9t3IXwb9hE4EuwMQVid99Q5ke24Az6hcmAaMia5MILyxybycomHgNK
+fj7Awym1oRvZV1ZH8SVmP3si9Y8NFT1+l+HhwmCX7001uwjIhRiScOAvLU6NJQJN
+Y8KAWzMwsfFu347lIwU7+tJnF4GjDGvUMYS0Jl/FGPOsgTxfpFfOa+l3DzZ3PUK/
+4looiS3K+8snObiw18iq0U/J1FfRPQ3te2nsDS+NFFWrTyCjz7LfjnaeIRHu2FFu
+782s9SDYIzi43HmWEm4klQB/4H1l4Na/evbl5b+ky99Ar2TI8x4ZBu40wC1gbuG5
+w81nbF51eGYPAgMBAAE=
+-----END RSA PUBLIC KEY-----
+dir-signing-key
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAs3yPEimVwdNSu+48MPBbqAscL7ETps2gMF/7NFtGK++4GU5TQ4iV
+zfjqzhV4n0CcCuQ+UGB6kzr7ZCsd84KI2fVbIZaxtD++Zb+jc8bRTp+Lz27J5FDd
+LTKCZ32EiBoTiVME7zfVHHdxS2aa2L2/KqWO5BDDjB7kn0UoN6yE4aWvE1y3iXQl
+uZCWXryc6ZfF46355aBqGKb1Ru0fJSrsE/spdiymMfGpOedsa0jgZf3GohkRukUl
+lCblFgpSjJalw6V2uWi7g7qC3w8K10YGgBvNNNPuLrwcbrE9IaO2DFRFZokZM2l4
+y91DQfYkQrDGG/hAkX1oN565/eeH6FhltQIDAQAB
+-----END RSA PUBLIC KEY-----
+dir-key-crosscert
+-----BEGIN ID SIGNATURE-----
+Ow60/hsr5EQMOtKZEbr/MncxzQxbDbSy+pTJrFCYXamwKgmN5CX0ZaPnWbVJsmSe
+fLV8izHtx75x80oFXt2cqbY792uLWp9O/8S2YhvGSOgRPJ0edUZtbfkxgA0ConYa
+FkikHND/pulK2XgaX1oC7ZLqchA6fTLuca9xFA34n/1/yEr5PyLwEicF8GrR8/ir
+LnRRv6aiQSf6ZJetctep31Bzrs9WYggXK2JCst49hqkJbiiGVrpmzlRpo9MajP0z
+IwpDAlzKnuKFRMftBinh42+kgIKyQBgYwyJAzh31wuFY3b8zaImi4dKwzHdzksuz
+Uh6XrheAfVDXOEeNxCbFgQ==
+-----END ID SIGNATURE-----
+dir-key-certification
+-----BEGIN SIGNATURE-----
+kW6UWcYhRQn60GuUrRtbsJm8CaL42o2ywX121y4tSmGsTdmG/rs0Ve52fJvi2qOW
+p93hecTEVLbsF7LFAM8454sW9BsfTQTZ0IDzg8F4wJ187m7EJMhTyO2twwXO+7x/
+fKV/4viHzLLSqLfW8txWeozazwC4B7VyH8WHxKK5/VhpQXgMlVaaTtzfEd67+AuJ
+qnCNTxKeWXNGTblRXglL/K7MpP1MrQq0T8W4eEFYGhYT9aMM2wvKeC9YAl1xePdP
+/yLH0Jj9iB+FjrSXUDHGyi0QRgSJMiAW2uZkTtODxUyt4i1yx55KKlK6jIgXu972
+O/O+5h6YTqfcvqFZDWaATZsbtX4HKNmF1cLfvX3XFpB3O+YgRaz9bh9yly334UPk
+J2gYduqikYu6yYwIdrsPeT7aLjGh829P+BYUgVkbiDnIF/N9n8oQNivyX1qL2sm5
+O/JHog7BT6uuud3M6MuLvfZWqY5BtiYexVQhXBge6mcrjl64IK3T8unDluY4vhah
+-----END SIGNATURE-----
diff --git a/tests/integration/net/auth1/keys/authority_identity_key b/tests/integration/net/auth1/keys/authority_identity_key
new file mode 100644
index 0000000..1ccdcf5
--- /dev/null
+++ b/tests/integration/net/auth1/keys/authority_identity_key
@@ -0,0 +1,41 @@
+-----BEGIN ENCRYPTED PRIVATE KEY-----
+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
+UN35Z33vkMLm8ia2zHY=
+-----END ENCRYPTED PRIVATE KEY-----
diff --git a/tests/integration/net/auth1/keys/authority_signing_key b/tests/integration/net/auth1/keys/authority_signing_key
new file mode 100644
index 0000000..5ae436e
--- /dev/null
+++ b/tests/integration/net/auth1/keys/authority_signing_key
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAs3yPEimVwdNSu+48MPBbqAscL7ETps2gMF/7NFtGK++4GU5T
+Q4iVzfjqzhV4n0CcCuQ+UGB6kzr7ZCsd84KI2fVbIZaxtD++Zb+jc8bRTp+Lz27J
+5FDdLTKCZ32EiBoTiVME7zfVHHdxS2aa2L2/KqWO5BDDjB7kn0UoN6yE4aWvE1y3
+iXQluZCWXryc6ZfF46355aBqGKb1Ru0fJSrsE/spdiymMfGpOedsa0jgZf3GohkR
+ukUllCblFgpSjJalw6V2uWi7g7qC3w8K10YGgBvNNNPuLrwcbrE9IaO2DFRFZokZ
+M2l4y91DQfYkQrDGG/hAkX1oN565/eeH6FhltQIDAQABAoIBAQCIU8mPsApRiCNF
+HvSU71uOzbGA/+y/O1u6oox4/gLUiGW6wuU3XFz8b15ZXbGatEZRd39lKYKwpZIg
+SSect78eXd/0KTOchvYk7mRGIfME1uYojivGwSzdkYm+9XVesv+3xFjxIeU6k/Z3
+oN1oVucGi213CMyedzCLUMn1T5I2mI3pb/xtKnsXRNE5Hik5ve6f1Gni+oXkjbOX
+vlcnXjoslmTo1KBcTTUVsNiUqW9SC0NSZeb9rqty/kRZWMJoUeXOuPn/hUn1qpz8
+PIMgmEvafMDdC1Gk05tt23C2TYWwAhMQHl5WOzzJ5KcPzSaoNNAaMmqYpuh2RM+y
+T+6gy0RZAoGBAOAMsvT7fEgyfbBtnUHFl73ykNzHcg0hoU1xXFL7iIRgUok9QjVN
+M1J9hIYTEvq2NFXlPaDyz8+MzIKhsDADaJzrRglohvB5sm40gGdAlaJ1O3T1WPta
+f+RoZxdKt2YEWStgh24+6dA4DajZvA8d/jt4NlYv4eszZidEiqzGIK2XAoGBAM0V
+Axy+YNGoxSgW38IJ+K9nb0mTX7g2vm/Xh9BCARuK4iVajWQFeYflkgxClGbrIdaz
+iDZJY36wkGXkU5Lr+314oTXfppdruM5EShP5dHl2qCBoel53wrkksIno/mpayB7Q
+ypiSTbdiB/v5gseCq4ZwHEgG3AZykcKmRkDoGAiTAoGBAJGxkFngg5QLSVKGJUHU
+9PTvHKaFB7RkTxkmA0xvBvpWDLXz4O76UcptltT86FWiUGwe0zGrU9l6jK7R59mB
+DfEkyXlqwHz2FkK1313FUMjBBTXsKb3hvtLP1WH/Ez3CzB15+veE79SX7sIDPNhz
+v5P6exMWtgmVdfNJDgiGGk/nAoGATQLQ8mBDNzfrIUzFpbXc3vE2hyiCT0ivZoxH
+AdtnUxJqLaC9a4vqwS9iEpyF4cf2Iwuz4L7aT965uqltAMUA4XMFBpf/lOjssvhN
+4QZRyLLYG6NgIE1Un/W5HXCS6RlCAOBi07xM1spHOUXO6GCXTJqY5Cs/QGSRe8i4
+pPMC42UCgYBrIGQdyUSJCJ1JXG7IDI8VzYrsFsHRbniUnUBvq64GInLdwou8+xDP
+fWVfdqQXlLHyzU45fIGt0Y/v/awsZ9WP0T0hL4x1rovDJqJoRKMgmf6i3vp6y+sy
+QbnhMPGps/VA0rPAb7HQF3a1xo2q3hGjc1bv5riigttHDAdddWCP4w==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/auth1/keys/ed25519_master_id_public_key b/tests/integration/net/auth1/keys/ed25519_master_id_public_key
new file mode 100644
index 0000000..6384d54
Binary files /dev/null and b/tests/integration/net/auth1/keys/ed25519_master_id_public_key differ
diff --git a/tests/integration/net/auth1/keys/ed25519_master_id_secret_key b/tests/integration/net/auth1/keys/ed25519_master_id_secret_key
new file mode 100644
index 0000000..5e6f84f
Binary files /dev/null and b/tests/integration/net/auth1/keys/ed25519_master_id_secret_key differ
diff --git a/tests/integration/net/auth1/keys/ed25519_signing_cert b/tests/integration/net/auth1/keys/ed25519_signing_cert
new file mode 100644
index 0000000..2c9595e
Binary files /dev/null and b/tests/integration/net/auth1/keys/ed25519_signing_cert differ
diff --git a/tests/integration/net/auth1/keys/ed25519_signing_secret_key b/tests/integration/net/auth1/keys/ed25519_signing_secret_key
new file mode 100644
index 0000000..b8539f1
Binary files /dev/null and b/tests/integration/net/auth1/keys/ed25519_signing_secret_key differ
diff --git a/tests/integration/net/auth1/keys/secret_id_key b/tests/integration/net/auth1/keys/secret_id_key
new file mode 100644
index 0000000..56dee40
--- /dev/null
+++ b/tests/integration/net/auth1/keys/secret_id_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXgIBAAKBgQCp1JWcEUli3Js4KtJxpBzJChh8JB+0eY1ijUKXVvKSxFhhM/oC
+Ga3OUDnBaxQNSPxvva2I1U42y9WX4H1ps99OMZYXKrDZE5AmWdAXSgbLOKb0oi9C
+wEhzRdcpGFo/WUzIUB1pXp6p2mrsUGO9IFKbXpbR7N3iPgaUM586redRsQIDAQAB
+AoGBAI1ECZaiQnr7qhmUdSyWKGOKBEfu/Hhwy4x4mDWu22P98s4YIBPzLEH7Na+P
+1EQgu+puypSRadfmwartzyRHvKzA0QU3M6j7IW4wKg+hX82gXg6BXkcwhlyyhrs8
+MMfTQgqdJsD1fyDr+HdIpNosDQY+3UwxTEF685uncBzOsEGpAkEA3TCQOe0DbTMT
+vU87a+jdB1TzkcqR193Slq+QUPTbHlPp4ZRqiHrHfEFYUTAfMrLgiQ9wjO6+8LiF
+wAyal/ItgwJBAMSO0u5IBvuV3EVJjMLCrBmKgyDYNgcJbFtS2TRJrOf3Lcx1fNIZ
+5gQkZa3nMveJTz0pyIZy7u95D1kimG1uMbsCQB/iSzf+YVsRXMwSKsegVpQi+8VN
+RP6v/BY6knwI/7j8cZ9RzJWF1VGk/b0eSbD+Nf2r2xaFp8J9ZtJLPtGeWE8CQQDB
+9ephpoP1edFuMgEMI4wufAefvpu53+ukRqH9vgI4uSrhisJMla/sQHpx3CboLAAc
+bAHr4rizaTPjEod13PqHAkEApA1cDrg+iaoOPC1oepafihiI76shg0h4C0Y+vUKM
+e4NQO585teKCQYOgv0nacERL+EcANGW6hd0eaRDCPtFxwg==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/auth1/keys/secret_onion_key b/tests/integration/net/auth1/keys/secret_onion_key
new file mode 100644
index 0000000..6921a65
--- /dev/null
+++ b/tests/integration/net/auth1/keys/secret_onion_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQDPNpJm5eyFijX8GxH4tpX2YKhTxVTwZezI7n0jDpQ5zmndLV22
+zHB2OY1UFS+5LtjzPEm2w71maa2z6mPS21qDPx90Ez4GAE3fkUPnqCLmgAQUxNdG
+7MeFQtlo7M7QuMTUrWZYbgQVTGDWn/HLRxik0kgpddj42VCI516Aaj6eNwIDAQAB
+AoGAKHVDSIwEDl7aA4tVivY7eYuN0i1pVDbScLj//eRO1KqUyPaeoZ5xJuQ9z/kD
+BGk9OuC+k8zMIj7oB4TwUK87kKKihgIkQacuBa17ERc+xVusgpEJlYKNHXCe3vFm
+qPhHfl1h08K7sXDE7bB81vwCabSHqCFO4Yy4KuM/XHRqZ+ECQQDzcL6qNzsJpQRh
+wUtXDpQ2oDxExUohZNQ45fkGIJy1zRnxKR9Drr1ikM58xdelte/bFEjfImvj624M
+YFGIrtQVAkEA2edafRFHu9kDm7Bp2s4gn0ysdJ+pKmcX1haoJzqFBKOR/CzgFhkU
+w1ptBUWR+6A2OigFOIsesS3lQBl6ROVAGwJADXrnw+stBLqzhGo8rsRq5p921uQJ
+19GKguARKwqxQsvprNX3GjtZ11RnardV2qI5dusnodt5F/TYciz/Ns9fhQJBANlp
+YTq6PBVsEJKNcQCUe64VhVgTWWjqVbkRABOr6r5XKbgvWiISQkor9ey1nlMuZgye
+k574B9aGUV8kTH9jMRMCQBUieqme0Q/iISEY52o1TwJfs993FQIFiVg8yiS1ekN9
+HD1qnkmmusdGmEGbYYGpLjpf8nFw+5IVtCOsj+5WOjE=
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/auth1/keys/secret_onion_key_ntor b/tests/integration/net/auth1/keys/secret_onion_key_ntor
new file mode 100644
index 0000000..5004432
Binary files /dev/null and b/tests/integration/net/auth1/keys/secret_onion_key_ntor differ
diff --git a/tests/integration/net/auth1/torrc b/tests/integration/net/auth1/torrc
new file mode 100644
index 0000000..59d7fcd
--- /dev/null
+++ b/tests/integration/net/auth1/torrc
@@ -0,0 +1,34 @@
+
+ DataDirectory auth1
+ PidFile auth1/tor.pid
+ Log notice file auth1/notice.log
+ ShutdownWaitLength 2
+ ExitRelay 0
+ AuthoritativeDirectory 1
+ V3AuthoritativeDirectory 1
+ Address 127.10.0.1
+ SocksPort 127.10.0.1:2000
+ ControlPort 127.10.0.1:2001
+ CookieAuthentication 1
+ ORPort 127.10.0.1:2002
+ DirPort 127.10.0.1:2003
+ Nickname auth1
+ ContactInfo pastly(a)torproject.org
+
+
+ TestingV3AuthInitialVotingInterval 5
+ V3AuthVotingInterval 10
+ TestingV3AuthInitialVoteDelay 2
+ V3AuthVoteDelay 2
+ TestingV3AuthInitialDistDelay 2
+ V3AuthDistDelay 2
+
+DirAuthority auth1 orport=2002 no-v2 v3ident=D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD 127.10.0.1:2003 AA45C13025C037F056E734169891878ED0880231
+DirAuthority auth2 orport=2002 no-v2 v3ident=4EE103A081F400E6622F5461D51782B876BB5C24 127.10.0.2:2003 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
+DirAuthority auth3 orport=2002 no-v2 v3ident=8B85069C7FC0593801E6491A34100264FCE28980 127.10.0.3:2003 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
+
+ TestingTorNetwork 1
+ NumCPUs 1
+ LogTimeGranularity 1
+ SafeLogging 0
+
diff --git a/tests/integration/net/auth2/fingerprint b/tests/integration/net/auth2/fingerprint
new file mode 100644
index 0000000..7230e47
--- /dev/null
+++ b/tests/integration/net/auth2/fingerprint
@@ -0,0 +1 @@
+auth2 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
diff --git a/tests/integration/net/auth2/keys/authority_certificate b/tests/integration/net/auth2/keys/authority_certificate
new file mode 100644
index 0000000..6bbf2eb
--- /dev/null
+++ b/tests/integration/net/auth2/keys/authority_certificate
@@ -0,0 +1,46 @@
+dir-key-certificate-version 3
+dir-address 127.10.0.2:2003
+fingerprint 4EE103A081F400E6622F5461D51782B876BB5C24
+dir-key-published 2018-06-01 15:55:49
+dir-key-expires 2020-06-01 15:55:49
+dir-identity-key
+-----BEGIN RSA PUBLIC KEY-----
+MIIBigKCAYEAskiPcxMAOY6BdDha1zEhsvxdNxWk+Fuhx8OEpk+Yn8UhT+8vOPci
+KWRtrFQte6U2JKxvXkPqoS+r6j063cUW1S+No5LuLm3VZ/lbJPJr8T/4MFodBqJ/
+3JgUycQBiBepCJTH/IsgFjJKwjvVYQPmlRgnI0Eaxeelb/TslRan7C3oSmAQ7fMY
+c7UgQWtZQGCtIh3ZjrL2NBneZVebVgYst+kv0GdTFBQ4Yf74CXo5k0Wk8KF7YCwR
+BEtGcIHh98jFahS2n0PI5gjBTJDPuuLVBpjqQ+WlfYy2njQagevNZZuTWorewomY
+kIcaWLCy69Semjz3CWeOgxXCm7bMQesQbqpKubTRG3CmjO7F2ycA1jP45tHEI95B
+wy55S+MQFhWHwj+VdVSenIuVKDqbz0yg02MPwKysYI+6DnY5SDTAAjZ50d/5kcmi
+QTnnIBdI26/KUDbZsYFb7BHuayKwSR2CcOfrjhXAhpAe200B49Q5S4jtrSIBUo3a
+L7orVFAuYRsbAgMBAAE=
+-----END RSA PUBLIC KEY-----
+dir-signing-key
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEArguSeQ8/hHeR2YXkwxeNJQXcU4ZyxVA/m1RF9eNznpzM22gP/y36
+FV2jgoFzGFcndSG3bD0x7SOvcLzilVAkurQm77+uuX2sBLZJSwwTHunRgCWxuRM6
+amPOfS9/K9G3h4CVSAVOteA43NPU2idMwu8QmfGOkdEfxTk8gtSqqRZiGIRPw8SH
+LPp4lpu3P9e9MWUfTBh2Rrok5ELCbPTL3YquHmvMApeoXCi4HZLEMKWQRHqeOrfq
+0eFIat26oFeRCBGFyMCKly9KkmsaOgeANmWS44lyIbYViWi6Wd8DBZyJeET2avCS
+PTHuTveorCxEIKhn5i+S6x8YBgW9L+psbwIDAQAB
+-----END RSA PUBLIC KEY-----
+dir-key-crosscert
+-----BEGIN ID SIGNATURE-----
+YDO98bj/jDxsj1qKmbnprUVsd66tEfCO/4cFR+8djEYlap6uhw1RsaOBIEAEyi6o
+B9ZSStq/9WQDb8IQz7MTl0zPtUUnYGcJqmZirKr/bi8xQIbwDTFh5JfEcVGYiHC+
+tapqxXLOWyiOZKJLnLPLnHTzrT+HOncpJAi66vq2KGFWJ6c6QotLSiMgku1JoXif
+YP2PCLxLSRR928gFoHy0/WcEEMC/vE40gSrIMQ86SCB4B7MNQ+ENRMMldqw4pJaA
+6eGZCyIqININZXshqOXnt5whrAaD9+gFTrbmpX+4fdBmQNfk2ZXnnGC/mw4rCegw
+8ivl3kDb++7cv1BBGgUXrA==
+-----END ID SIGNATURE-----
+dir-key-certification
+-----BEGIN SIGNATURE-----
+jz0lA4wDbYQ2S8MILRZH869pjWIzH9SrioswiE4mvWbXmttiN865etqS8zWpJYru
+Ck2IHEZVGxnZ5CKT/oMjQ72bNCzjHvDBPn4JnlBvnCRL7ph8PZLKtFeryc/3ZU1m
+x5uGUjqtusMeoJnzC8aLR4fWZcjcAWjDyyFhFLoV76O/kQWJr7lBJRV8xAMjIRzu
+XIo+nzXbHegi6d8RnptfKgqd+uw12jY1pb016Goixgs8dzMDDtbkxOD3Z/8wzUX2
+pP1+FaBZH+ydklA4FoXwNjND6g1nXDME6l+fAklBLjxOjrmAD/UiWe7G5cF3ktD8
+js8aJjuTiIUax3hj7yQzA4i/8MGG6DVIDKoWbsNADPH61JI+lGtuHSeQ8Glz+zJj
+rK6Extqacd7YxwDLqvwPbWsoLlHZtAuXEyOE4Q7j8Eb4x9iblPsATMtcKC0wJtqa
+Zgbpntd5mUr8CK7P0/idGM+s2MS7lQW33IAAUBsPUi+UbO1LpPk7hg8v1THy8wjk
+-----END SIGNATURE-----
diff --git a/tests/integration/net/auth2/keys/authority_identity_key b/tests/integration/net/auth2/keys/authority_identity_key
new file mode 100644
index 0000000..42ce330
--- /dev/null
+++ b/tests/integration/net/auth2/keys/authority_identity_key
@@ -0,0 +1,41 @@
+-----BEGIN ENCRYPTED PRIVATE KEY-----
+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
+tKmy7xJz3KeNCK8abnE=
+-----END ENCRYPTED PRIVATE KEY-----
diff --git a/tests/integration/net/auth2/keys/authority_signing_key b/tests/integration/net/auth2/keys/authority_signing_key
new file mode 100644
index 0000000..1a79901
--- /dev/null
+++ b/tests/integration/net/auth2/keys/authority_signing_key
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpQIBAAKCAQEArguSeQ8/hHeR2YXkwxeNJQXcU4ZyxVA/m1RF9eNznpzM22gP
+/y36FV2jgoFzGFcndSG3bD0x7SOvcLzilVAkurQm77+uuX2sBLZJSwwTHunRgCWx
+uRM6amPOfS9/K9G3h4CVSAVOteA43NPU2idMwu8QmfGOkdEfxTk8gtSqqRZiGIRP
+w8SHLPp4lpu3P9e9MWUfTBh2Rrok5ELCbPTL3YquHmvMApeoXCi4HZLEMKWQRHqe
+Orfq0eFIat26oFeRCBGFyMCKly9KkmsaOgeANmWS44lyIbYViWi6Wd8DBZyJeET2
+avCSPTHuTveorCxEIKhn5i+S6x8YBgW9L+psbwIDAQABAoIBAD71+LrKhVPKXXyv
+Lx5UOr8V66pbjNFMQnZSeiyFZ6INXx5P+tl5LGrmQOxJH/XCMYfx9oS1boY2zpSd
+/+m74E2aNiusz+xSRhQ+TS1U5OXd9+e/uxcUmaE7Ecu/juWvLBFctqQjJ2IsBuX7
+y5hPdzldekf2Vnjxieiy1+0MOeCImynlBJcp1m3LjwMkXcB5GGcmGknsQMAT+MtX
+eIPw8xD3il5ZfsDuHVnUWTPryPamQQls73aKV6oaiZreZ/VqYxIi/aS+gWlhUBZM
+CpLIVxWhpoiM8eMY3nCDTT3t7kVOoFNuCnOZpwTuO/mhsvMiD/M/tHBKem3Xf3Im
+ifVufgECgYEA5GlLOU0oZwrpZGYoDsEUQBPSJyVVRjnBUGXkaNYuDR9ABuyD7EhY
+KK2mqovZl0irNq/suROJnKVG/l06al1gdPZsPh+WrZ06dh2lvCyF8xYQpQK7grgK
+L83CGQW2x2ydm2PyhA75Mel3kkORpkqKu3368w00nO19aR4JXU4iD8ECgYEAwxE5
+XP6CaLMrw03qYkFxdRRCvvb25y6RVQp7KSI6YZmuAJUTko9kXDi0YeCf8Q8IN862
+fHX8smsfBZ8m+dYCYKcGa+biLyEPHjuKOlh0yhekZqmyZT2V8G4ECTFPXN0ktJyR
+W34sY1KXaET0n6KUwj1aOn64amPjy+ndZ5ILiC8CgYEA4/46SRs8bgaVS1MxPvD5
+jrB6P/ri8LMrxF3ArejElPKRjZe+YzcfUJNtXqUz7+9of7EBQQhAf2z2vWY/rfZB
+Ft720tfjJq9fsJENYxSqLCflO2DL3MJp4KeozCNI/Czt8TLF2426rliVsxjhJLUZ
+X+dze/K9hrsESM3jmRAprcECgYEAvScwlsp9LoW/RA2D4G9RU5Sn/IGCfj6b0vjs
+4MA+GHJrVkk4x3+gdATQdbDZp2lKMMOUFTBcL67MUCk6JD2v5IVSJsOmRMkr3cci
+jN1FssomMx8OzDlh8djctQVJzeTrOPAxy6SX6mAmTYfAJiQDWC8iFWLX9OKT/CH0
+/f+SiyUCgYEAx4HyM/v1i+U5j/2Yc9m4ex3P2fvOHsxQvebdrmCc8Gqp8T/552ht
+NWQ1tFP9c/QLQIV8y6e7tg7kLuLz9LT+pKEYptseF1JnzatZ9kV23U6R3ys/xkqR
+Sh8q+OTI41kWtB0mbg62oAlBR57vdmf9YvuqjsheS3Otj1ppKvfxP/M=
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/auth2/keys/ed25519_master_id_public_key b/tests/integration/net/auth2/keys/ed25519_master_id_public_key
new file mode 100644
index 0000000..2545631
Binary files /dev/null and b/tests/integration/net/auth2/keys/ed25519_master_id_public_key differ
diff --git a/tests/integration/net/auth2/keys/ed25519_master_id_secret_key b/tests/integration/net/auth2/keys/ed25519_master_id_secret_key
new file mode 100644
index 0000000..db1357d
Binary files /dev/null and b/tests/integration/net/auth2/keys/ed25519_master_id_secret_key differ
diff --git a/tests/integration/net/auth2/keys/ed25519_signing_cert b/tests/integration/net/auth2/keys/ed25519_signing_cert
new file mode 100644
index 0000000..d84689f
Binary files /dev/null and b/tests/integration/net/auth2/keys/ed25519_signing_cert differ
diff --git a/tests/integration/net/auth2/keys/ed25519_signing_secret_key b/tests/integration/net/auth2/keys/ed25519_signing_secret_key
new file mode 100644
index 0000000..4934e5e
Binary files /dev/null and b/tests/integration/net/auth2/keys/ed25519_signing_secret_key differ
diff --git a/tests/integration/net/auth2/keys/secret_id_key b/tests/integration/net/auth2/keys/secret_id_key
new file mode 100644
index 0000000..df0b0af
--- /dev/null
+++ b/tests/integration/net/auth2/keys/secret_id_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICWwIBAAKBgQDFphY1WTrmNRGgRjGHP4AwDUYQ+xY85SsKKcC7kJwsgiVppPJq
+SS9FCS2YJNMcs/u14IhNKIRtP8VLI/rurk9h2Qnbbb4r4FSf0DBmDW8Qhzag+UUu
+aV29EWB/To6JO4cxm6hzpzz+Bl3AJsZN+Luzgmk6ZfAy7dA2jrvAml8s1QIDAQAB
+AoGAASMQc6Qcw6BAhrSAqm+CFESvR3+6RAVpdviAhFOzoknpXy80ucnL/NCts3da
+w4qBgy1Ue2UlRd+dCe6eDetwx3O5lEhzj6WZbnz9f+KuXOKP16nisbQSFH+UTFnn
+0PMHYJIFbrPzqptEV9hlKcNljpTTua6Dl1N+bijENZVTds0CQQDuHCBKYJgOk1ma
+rmZEYt3VMLiUfpAwtVdmHXYV0xPWpkWYqHbZrit6kLi1fwvqc6I4C2pebFhFF71B
+m0ckFdGfAkEA1H+4ZrJkLV9uqk/Vj9bZHNF3212lK+cpdx0Og/4agdsVKbQfLF+W
+1dnazZ9tIm93kMdl75Ave2PUKOMfdu71CwJASV2PMXubvnn2VOvBhPa1hTey18Y7
+ZVaqrEMNnGHiLfQjY4scu6unp+cpknqn0EB6zivuRVO6yucqoClY/Sxf3wJAI0Y8
+Vxff10RTO4RbIDB7A/Sln82QwJPz5yj0ouaIgevbPHwA/L21bTRnxOBlHmVAhNEE
+09qsdyAgNNVXAMgz9wJAWB8pJffmHKXsmWaIU2Sxlc5JKZx23kMW9PkppW/EyGTR
+txQaVsLG8xy0ZaSp3VuvbYCbQ0LQ/IGQtqTtsQNn2g==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/auth2/keys/secret_onion_key b/tests/integration/net/auth2/keys/secret_onion_key
new file mode 100644
index 0000000..2954adb
--- /dev/null
+++ b/tests/integration/net/auth2/keys/secret_onion_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQC/EEbOor8Vf3UACJcpmDdvrSil/hosbD1xRQ0lRbquChuOPIT6
+IfYq3/6rncrIqvQGF8nOMIYZK61WST97VvgnPYPIVwwlcURa/SO7+PHFNhd4iDl3
+5lqTvQm1zuvX6HONwFJJqxPiQUsPHm2K0aQcMKlAojzD2pFZDu4+8+DTvwIDAQAB
+AoGABoxCQPam4c+6bMPemlhTHgqrJ/UrZHZZLLaXGr3nBevmwdslG4VqcFG44pzH
+xFTHhCXwjpZvIhGzIQ/lkw6J9o8l9BD6+69tySp89OiCVHZTXRjNfHIzchprUR8/
+gVBPEgKapI/5Tm/1Dy2DYcoTA5e5mPf4N9bcoumGWtSZdJECQQDguVJL20iTBu9h
+I20PRrydSQXQ7KVc4nZk5KrndsI4243KclVef2LtAebedSHI8tdpnScAB4vFYH/y
+VneaXC6LAkEA2aesMSQFZe/Yix49a7FORzdgO3Nu9CrNHhSug/61gfUzD49Z5j2Y
+8d0zz4WY97tWPwwFZPqnqRVKY8zaY75qHQJAY7e4XfLDJILKTCdlKIcyAPU7QHcR
+9cKD2MdjUuxuyL4cD/5mBVWvdw4F/SaqxDmF/tZ+TNQMYJwuikF2Nye6ewJBAJ+i
+pd1o4Pix4C2w4TWSVqpPCCqycEdu+QA+BP1UnEWT1H5uEm6W8Q07wxtKjjXsVcZq
+B67XVI7jyarG/co4R1UCQDOcvt35RjAPGFPpRfBfKqCrc1kBiFLrawcgPKB28BIW
+TW3iKZgDyGHROyluwoOGRZIKUGhzCxsd/whQ6SXWqas=
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/auth2/keys/secret_onion_key_ntor b/tests/integration/net/auth2/keys/secret_onion_key_ntor
new file mode 100644
index 0000000..8f94287
Binary files /dev/null and b/tests/integration/net/auth2/keys/secret_onion_key_ntor differ
diff --git a/tests/integration/net/auth2/torrc b/tests/integration/net/auth2/torrc
new file mode 100644
index 0000000..2a7c799
--- /dev/null
+++ b/tests/integration/net/auth2/torrc
@@ -0,0 +1,34 @@
+
+ DataDirectory auth2
+ PidFile auth2/tor.pid
+ Log notice file auth2/notice.log
+ ShutdownWaitLength 2
+ ExitRelay 0
+ AuthoritativeDirectory 1
+ V3AuthoritativeDirectory 1
+ Address 127.10.0.2
+ SocksPort 127.10.0.2:2000
+ ControlPort 127.10.0.2:2001
+ CookieAuthentication 1
+ ORPort 127.10.0.2:2002
+ DirPort 127.10.0.2:2003
+ Nickname auth2
+ ContactInfo pastly(a)torproject.org
+
+
+ TestingV3AuthInitialVotingInterval 5
+ V3AuthVotingInterval 10
+ TestingV3AuthInitialVoteDelay 2
+ V3AuthVoteDelay 2
+ TestingV3AuthInitialDistDelay 2
+ V3AuthDistDelay 2
+
+DirAuthority auth1 orport=2002 no-v2 v3ident=D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD 127.10.0.1:2003 AA45C13025C037F056E734169891878ED0880231
+DirAuthority auth2 orport=2002 no-v2 v3ident=4EE103A081F400E6622F5461D51782B876BB5C24 127.10.0.2:2003 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
+DirAuthority auth3 orport=2002 no-v2 v3ident=8B85069C7FC0593801E6491A34100264FCE28980 127.10.0.3:2003 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
+
+ TestingTorNetwork 1
+ NumCPUs 1
+ LogTimeGranularity 1
+ SafeLogging 0
+
diff --git a/tests/integration/net/auth3/fingerprint b/tests/integration/net/auth3/fingerprint
new file mode 100644
index 0000000..4c01635
--- /dev/null
+++ b/tests/integration/net/auth3/fingerprint
@@ -0,0 +1 @@
+auth3 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
diff --git a/tests/integration/net/auth3/keys/authority_certificate b/tests/integration/net/auth3/keys/authority_certificate
new file mode 100644
index 0000000..ee7ee3f
--- /dev/null
+++ b/tests/integration/net/auth3/keys/authority_certificate
@@ -0,0 +1,46 @@
+dir-key-certificate-version 3
+dir-address 127.10.0.3:2003
+fingerprint 8B85069C7FC0593801E6491A34100264FCE28980
+dir-key-published 2018-06-01 15:55:49
+dir-key-expires 2020-06-01 15:55:49
+dir-identity-key
+-----BEGIN RSA PUBLIC KEY-----
+MIIBigKCAYEAzt9HthC1wszRQ6CO3yzceu2ARDOR2FrHRohIbRDvNxMamz+T/CUb
+63lcgY/ZAkun2DprrVGn69WvyhjpX6zwpLYVxA7pgzmTCAUuBhl/c9ZyWhe4yZqt
+qc3eg0yDac1U+oTe8MAEqAZvLmB6uymc1xnoGAoPYmkk+V0rzaDib5sKNGklsLn9
+KerD8/h+OaTygj9O6L0aNoaxcCY42+3w43tn70rk85SBhN+EVnpvGewHCxyiP6ev
+0jvRFg6GU6RrMFaN/YokYobnbHDIvaBWaYjRe9fWPBUpVWLdNvUDTOWZqeTlkVvk
+K09OJ32mbKUPdKRIIDV/OGnK4WR3tQX4oW9vVUHjKAHajv/iGYuDEoui4G9Ovw4j
+o0fosxETFvH9B/Qg7UT7rxOkVwX4P87sIV0Z1TwH4S7mIhTwhICD/MLm0m58j8MM
+Qd5Rt+4QFEVYY8vswV7XiN3xHwsiMcR7MhhPLcaTG57rc1pAVVRJLAGf7NNptIED
+dV9ha3ZFOClRAgMBAAE=
+-----END RSA PUBLIC KEY-----
+dir-signing-key
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEAsFTr1o5iNvK0yqQRfNcUBk81BLNKI1Uv9uCy6mDdneYwKZqVeB5w
+5NQe8qFSGWzLWWfi7ZdQaOPHRUJWqdtkuR6AFEh9Ws+wSU17Jd1uMKfVFQL0+4q9
+tt52yoCE2tJ2GFwcouirUGXCXFQbfCrmUWxajSgGpDGNvjf24td8kq/O53cl4gOp
+d1Ubl2BsLxALUswRsurJqLt1r+WNKEV9gBXWavyWxZcOwBWUhExdWWVSlM2O2hYs
+Dq/VV8MJHugHHAju0d7JYhCy8L4K/AsZJ9KDgAyXw7L7ur7vqIzX/EjqtOjPk+rK
+dpe9d3SbxdHRN0hmwqx7n4zGDt0AD4sQ1QIDAQAB
+-----END RSA PUBLIC KEY-----
+dir-key-crosscert
+-----BEGIN ID SIGNATURE-----
+dE7ZA/wt346dO3uGUMM3CGQjm4YbPO7OWqmTAk0ohIDgUWT3At2fsitT+4ayZLGB
+EFL4yeeeaT3wYNb2kCW/JLI9x1bFXs+wO4CPLe70ynbk2uB9KIrOy4hH9EW7PpR5
+Ow1N/AzUm0CQQvLstLNbUEBl7rfS9edU4Mg1GZUQTM+CPWxUIlaTtAT858Nbor1q
+vJE7B5nVmozpla//0rE9Vr8Yu7JGOnCYdO002uo92AkwuHiDfBUVmzhJqaV75hHC
+3zrJIDdHtYpI9ctuUNanWjVksuCkN1SUWmFYJPDWSChXxll8EZTVtk3Z4G7Ddgcl
+4WZ8tb5PbzFypt2DSbeqKQ==
+-----END ID SIGNATURE-----
+dir-key-certification
+-----BEGIN SIGNATURE-----
+ZQ5ZVR5cgYuDbg182OQRIri7Md/L+DIeCEf0ZuApMFytgTZOEExsmccJlIibrfzB
+hFAvBuxN+WDATEawg4FltyXrgB8M3FDrYufBQua7v9ghtapxsxL4O+G02Rq6RTZ1
+NIV3eE034UOmZ33Jd6k1EcZykeu/wF3ThTtg1pM75g56zDXk9xn+MyRb1ja7Oor4
+mzTBncgjo7YBnmNN/eIpph445NiduC3BdrLEsrCJA5F1iCO6ubeKx9GLAMIGb+W/
+qIXiuUiCmgp+iPQoF1rYRRaUgfo9zysm7ikjiSe6rSifLPth06vGWvUgpG0xm2jr
+96igZ9MsfF1loaMUV7g9MhTzDFRk+Fw/KrAPkXgisje3RNtaI3UiCqbs/Pq0x7nC
+77S6B7dd9RkhtWmpGFnfqX5I/l+766xAGXMO9IPlRp0L6EcOhIA+7N93mGf9dCKv
+85741ULH0pZrdglPkXXsNGv7EO01uKuSrTkjK8Z/7hM/mxib19O3CTI3eX1WPQPr
+-----END SIGNATURE-----
diff --git a/tests/integration/net/auth3/keys/authority_identity_key b/tests/integration/net/auth3/keys/authority_identity_key
new file mode 100644
index 0000000..53825ce
--- /dev/null
+++ b/tests/integration/net/auth3/keys/authority_identity_key
@@ -0,0 +1,41 @@
+-----BEGIN ENCRYPTED PRIVATE KEY-----
+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
+T5zlwSssCEGZ7wceiVs=
+-----END ENCRYPTED PRIVATE KEY-----
diff --git a/tests/integration/net/auth3/keys/authority_signing_key b/tests/integration/net/auth3/keys/authority_signing_key
new file mode 100644
index 0000000..f396e33
--- /dev/null
+++ b/tests/integration/net/auth3/keys/authority_signing_key
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEAsFTr1o5iNvK0yqQRfNcUBk81BLNKI1Uv9uCy6mDdneYwKZqV
+eB5w5NQe8qFSGWzLWWfi7ZdQaOPHRUJWqdtkuR6AFEh9Ws+wSU17Jd1uMKfVFQL0
++4q9tt52yoCE2tJ2GFwcouirUGXCXFQbfCrmUWxajSgGpDGNvjf24td8kq/O53cl
+4gOpd1Ubl2BsLxALUswRsurJqLt1r+WNKEV9gBXWavyWxZcOwBWUhExdWWVSlM2O
+2hYsDq/VV8MJHugHHAju0d7JYhCy8L4K/AsZJ9KDgAyXw7L7ur7vqIzX/EjqtOjP
+k+rKdpe9d3SbxdHRN0hmwqx7n4zGDt0AD4sQ1QIDAQABAoIBAEZq43PfkKFY85Ip
+S0KLsdeDMi0aXHUXw/vXaBvpaxdvobQ7o41AutznSSSj/+FfbSXbMuinENmSfTXP
+dESI9QRohcWT3VuyrTfY1WEduK99lr65W5RIp9KrrMzZ3jR07+xyfI0iVafZu3Cb
+tg40I55IozDT1zMjBvP77YBRhdId8dGkftSQ8+bDtcV14lLSpwSDQefSa0LNqSWm
+Zr/mCV5S2bL4wJq7hBFS3VYfrGPt1B+r+pGFbBBstj5Q78YmzEUPZ0fN2hgym09l
+8HdHed1oDm9K/66fPs+VgXkkrM3CCR/Hel9D91l9hVvXia9qAA7c0G1twbIg7g/a
+yKeIQgECgYEA1u58v3a2fUIiq/hjJdMIK1ebCxI6ndhkWZn5wfGShv0sjDb7mNyN
+wb8+m59an+YhfjinazHl4TVcAdD2lDMWbZGEcaSsXbPhDcEYFhVbag/IcuFlBOA7
+ZJwwPZMirT920X5xAdJcAeAhRnBjQAmJc8L4oIDlKCGOJnBW0FKpR2ECgYEA0gZM
+IRPvikTZ454Xw947WLFCuek5ZOzupPRRAh+vd+WVmX5HnjazKFWOuFO9F119RAKg
+0NonAQomGexgkQW75oC9QdSa6DKeumlswY5hQ8NkNlfmsZYgP18mplvv/0i+8BLl
+kdPihrmM0Sj7KLnIHau+i+YB3euZcT9cq0Y+YfUCgYAiS1FaV33MxLW1jN99FIwU
+JllVzeXOc82nQltIp9wCb/kgslE41dBEnthFioqyQs0LT8ze3MpaQeJZY9dEVFZ6
+yyI/48+g7+e0AyBtvaClbrlEI1S0D3dKmWVVHdoFnL+/s5YifUczAWktzRb5C8yD
+zRNQwOBPo/MDjR89BEOAYQKBgEieLMxzHCvuynfNPeJXgKWWBMBLR7EByzH119yo
+H/+Qvj0oUJL/zspvar2JFqRxitJtJjWQeFP/slTcSjdaiDGW6dlNLZKDjiZeNWBn
+XnITqR6xHe7hPZ0rxS1YNI9ME9jmb8IQRQ7YMTxQsybNtcesjmHI0XRt9cwWYHBI
+BWHRAoGBAIbUvxX966e7uW5JjBoo+cDPODUHQ2bQ0EHFjhmFJXBpsSVS4tsfV47Q
+ZLrm4va08QfetX28yRFchn12LUtkKWrHwJYpaYvd0vJK7VL9IajemExWAoCVtkAO
+Zxy1hi+uDPnxbkYFBBLh8Ew4BBnLVP1Kxj+2Y8Fqw1GsDEprA4QT
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/auth3/keys/ed25519_master_id_public_key b/tests/integration/net/auth3/keys/ed25519_master_id_public_key
new file mode 100644
index 0000000..391c8b6
Binary files /dev/null and b/tests/integration/net/auth3/keys/ed25519_master_id_public_key differ
diff --git a/tests/integration/net/auth3/keys/ed25519_master_id_secret_key b/tests/integration/net/auth3/keys/ed25519_master_id_secret_key
new file mode 100644
index 0000000..637ec08
Binary files /dev/null and b/tests/integration/net/auth3/keys/ed25519_master_id_secret_key differ
diff --git a/tests/integration/net/auth3/keys/ed25519_signing_cert b/tests/integration/net/auth3/keys/ed25519_signing_cert
new file mode 100644
index 0000000..279699b
Binary files /dev/null and b/tests/integration/net/auth3/keys/ed25519_signing_cert differ
diff --git a/tests/integration/net/auth3/keys/ed25519_signing_secret_key b/tests/integration/net/auth3/keys/ed25519_signing_secret_key
new file mode 100644
index 0000000..bd83e4c
Binary files /dev/null and b/tests/integration/net/auth3/keys/ed25519_signing_secret_key differ
diff --git a/tests/integration/net/auth3/keys/secret_id_key b/tests/integration/net/auth3/keys/secret_id_key
new file mode 100644
index 0000000..d972060
--- /dev/null
+++ b/tests/integration/net/auth3/keys/secret_id_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICWwIBAAKBgQCd8vrObZhXfmw1GbShdxi2OCkYH/NC9CapI1rNjVzrVkqE6EC9
+HNsQmdgRD7NFleFukJof4xnJcm33D1TuPDV1CIHKnGhtIVIxv+UlPQ0aViGwqANK
+0dqKvWV2VOrXhKM0w1SrEqkDOrmrzeHC9RQjeB/cB+rw8A9RgeFkLjOZvwIDAQAB
+AoGAdOhv83LzG2+bsAICzLBWPil7YTvk1l3Yb8CXaSWE7TvFlHJD2LYO/06fuqEg
+VBUH8spdCdUSNSTZd9CFUICIH5oqBhNlnh2QBs0b6BtP+GnSC+k0VPPtijMJBcAo
+DqawDrzhedMMNpfpADBxsYLwXM3LIAvcmvmgglVuobyhVuECQQDKYWAbEaumGasZ
+ssK+zJfYCzKYDJP7KLQ2V5pxcWPhxTMgUW0sgQ9YSBmT8of6bizms9015oehuLmb
+X/IdvrBFAkEAx8wEbmeoJ1xjym2iRTZrrzKaCXXpRNVFNC5CLld9/JdYDkrKRvn8
+2wlEPRdOzEfw4Mun5SOuaHmda8R5VHpMMwJAdJtwpYgj77uAc3klbowxvWCOUT+G
+EEPeuiT1rwGXfGGEWM2x6t+d+M7qNe2bXbcXlgHypnjik1L9VsIMngjeRQJANltV
+IUxmPT8vjxVAvp/NsD6OFeDUc/up9kZXjxASoLP0Kv9CBQliN51PyWcb8wvnhuEh
+bn/EpXvgzj8H22nibQJAQ3ZAHYTwp7ikpRmsi0pwD8ATZPL9hb00qUlZtC0w1UFV
+DWSKVtbALl2AwY1Z6L4SDsFJSEh3+ys3lNVY5CRZIA==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/auth3/keys/secret_onion_key b/tests/integration/net/auth3/keys/secret_onion_key
new file mode 100644
index 0000000..90aa50a
--- /dev/null
+++ b/tests/integration/net/auth3/keys/secret_onion_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICWwIBAAKBgQC3Atj3fFj1uwoUa8LtmxSLXHsoTuOPZ5z/Jxtk1XMotvY6IJHG
+xPRxUPOdFvehBk6+MhvhPRZgelN8RmUdE50Hf+++o87RwSo0DkjeQAn10yxh9nO4
+MvYyijDsseQWDS7AGaxirWOasMpyNYu3LxstvotSKnznqWnI4jYE4JH67wIDAQAB
+AoGAEYXZRmEGl4iwH2JuCJgXsHxLYoGjMkDmfFu/OLljTFuwWcJyksia6xqoKLth
+PG7BLV7Y4okZ0mUEB1sqJU2SdFLNJMfcX8XDDcYxJWdw9MmIfkqs9oimR4r6b5lk
+a367jDBG926sdzPpZk5zJGlMt1cuy/qPu6xL0Fxq1W7xfyECQQDqBKQ7dqT9f1cu
+1MP5EggkhLR+5McMSc5gPyVX3NnqJDO7GGjpNJDVCxkLMBymi7VUYxMkN3ywsBpu
+Y4ez+ce/AkEAyDOoLSRWSjjvq5Av9QilVFw17OufshVvacrVwoyFz0iafgaq1tUB
+RpHZ2EGfKo8zEHB9oguO9AOJpO8DFBQY0QI/V8Fl1Oao+GbISsd+tegNJaSeCve/
+rNwAiBcl6czn6uWogICm1szfgwSmX4urMskxNnPwuaQVHizrvHmWaedBAkEAi4ZE
+zMEoSi4ICn9AjPrrjjF9e5JzB3+c2BP+icm5b87frLkk0vg8HVyEgAyrytNl+S0M
+waRginr0sLfKY3HmIQJAd7bHercNGGAziFZI6xx9oZbFpyx1DleaH0VSJtTwN0Uh
+OTfmDEvp7mpzYwAIqbrSpUvqqA/Ygtov+7tEgPk7RA==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/auth3/keys/secret_onion_key_ntor b/tests/integration/net/auth3/keys/secret_onion_key_ntor
new file mode 100644
index 0000000..5297135
Binary files /dev/null and b/tests/integration/net/auth3/keys/secret_onion_key_ntor differ
diff --git a/tests/integration/net/auth3/torrc b/tests/integration/net/auth3/torrc
new file mode 100644
index 0000000..b44e74f
--- /dev/null
+++ b/tests/integration/net/auth3/torrc
@@ -0,0 +1,34 @@
+
+ DataDirectory auth3
+ PidFile auth3/tor.pid
+ Log notice file auth3/notice.log
+ ShutdownWaitLength 2
+ ExitRelay 0
+ AuthoritativeDirectory 1
+ V3AuthoritativeDirectory 1
+ Address 127.10.0.3
+ SocksPort 127.10.0.3:2000
+ ControlPort 127.10.0.3:2001
+ CookieAuthentication 1
+ ORPort 127.10.0.3:2002
+ DirPort 127.10.0.3:2003
+ Nickname auth3
+ ContactInfo pastly(a)torproject.org
+
+
+ TestingV3AuthInitialVotingInterval 5
+ V3AuthVotingInterval 10
+ TestingV3AuthInitialVoteDelay 2
+ V3AuthVoteDelay 2
+ TestingV3AuthInitialDistDelay 2
+ V3AuthDistDelay 2
+
+DirAuthority auth1 orport=2002 no-v2 v3ident=D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD 127.10.0.1:2003 AA45C13025C037F056E734169891878ED0880231
+DirAuthority auth2 orport=2002 no-v2 v3ident=4EE103A081F400E6622F5461D51782B876BB5C24 127.10.0.2:2003 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
+DirAuthority auth3 orport=2002 no-v2 v3ident=8B85069C7FC0593801E6491A34100264FCE28980 127.10.0.3:2003 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
+
+ TestingTorNetwork 1
+ NumCPUs 1
+ LogTimeGranularity 1
+ SafeLogging 0
+
diff --git a/tests/integration/net/exit1/fingerprint b/tests/integration/net/exit1/fingerprint
new file mode 100644
index 0000000..e7a1987
--- /dev/null
+++ b/tests/integration/net/exit1/fingerprint
@@ -0,0 +1 @@
+exit1 270A861ABED22EC2B625198BCCD7B2B9DBFFC93C
diff --git a/tests/integration/net/exit1/keys/ed25519_master_id_public_key b/tests/integration/net/exit1/keys/ed25519_master_id_public_key
new file mode 100644
index 0000000..ce17e1d
Binary files /dev/null and b/tests/integration/net/exit1/keys/ed25519_master_id_public_key differ
diff --git a/tests/integration/net/exit1/keys/ed25519_master_id_secret_key b/tests/integration/net/exit1/keys/ed25519_master_id_secret_key
new file mode 100644
index 0000000..5617382
Binary files /dev/null and b/tests/integration/net/exit1/keys/ed25519_master_id_secret_key differ
diff --git a/tests/integration/net/exit1/keys/ed25519_signing_cert b/tests/integration/net/exit1/keys/ed25519_signing_cert
new file mode 100644
index 0000000..23251eb
Binary files /dev/null and b/tests/integration/net/exit1/keys/ed25519_signing_cert differ
diff --git a/tests/integration/net/exit1/keys/ed25519_signing_secret_key b/tests/integration/net/exit1/keys/ed25519_signing_secret_key
new file mode 100644
index 0000000..d0b9d81
Binary files /dev/null and b/tests/integration/net/exit1/keys/ed25519_signing_secret_key differ
diff --git a/tests/integration/net/exit1/keys/secret_id_key b/tests/integration/net/exit1/keys/secret_id_key
new file mode 100644
index 0000000..453a434
--- /dev/null
+++ b/tests/integration/net/exit1/keys/secret_id_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICWwIBAAKBgQDUhrtgD+6NyBn7JEvPsWHNjGNLzeoA/Wwah6j+BMnWZDyU8LDE
+yf/jmvmZa074MHNXR3ZSVblTq3JeWZ87JdV+2A+uiwtVPi6qOQAADEvxDBiCTnze
+mWqCwuR1BudeKdqdkArZMw5352xo6m1p3XJQSyWde2qYRFBEX/EEGsEEGQIDAQAB
+AoGAEGb9myJfpO2mo61fdH4aMET/fOA9iSoF595EeqZf9X3y9wPEgMueRjC1xtNz
+WtBSdo/7X8th7EU1JHcCRQxcd7OstR7fiy81n0UMC6GrHASpVYYJXC4M4MGt2yzM
+Wzadp2Qa4a1Wwpud0bXH0CB699MmEcdpNgw4RGUxKeHuEWkCQQDvpU/93Up2APZX
+7whjUT4IfHUOUVaRUCJnMUJxajtM3AvtYgDEmHXSAbs0Wtl0v4qh5xfvKJ2YgfI6
+M/eBhR0fAkEA4weiSvHPUwT8Uq0f3Hc5DHLx2a9Q/qKvytCcbtgjOA3Anclzf4vG
+PXsCjwYETDLOqg8zyKOwgF04dqPkDYt/xwJADKX6AdkjK/VDC0MXez53erUu7HGI
+kyTam/2ylw/XT2gxzPamOboeRdZHjizZW1scswzia4IGR11cbov9nT1sWwJAfAtP
+wWMdxF6U/xdYsTzzDro/KpF/z6FUK5yP3IB7vcTF2XCYirf0OONdIohHENsxz/k+
+cgH+DiThFPG3SS9PQQJAJZ2IBMIyO31Q+e2GW0NKxFyCsqHAcqBUMU9XDH2POm+K
+3CDVyHvc/GsZhWYayQzD65VUERjAbxyALDotSIODGQ==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/exit1/keys/secret_onion_key b/tests/integration/net/exit1/keys/secret_onion_key
new file mode 100644
index 0000000..d2987ef
--- /dev/null
+++ b/tests/integration/net/exit1/keys/secret_onion_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDHYG2e/zXbe3IVjx/kJ5cqVmc4p11otnJUMdmGA2hP+Oi7QbEJ
+2EMHO9mLKsWyX42ekPCjXLeYF4NG7QGEhKbs9yzneIIS37uucMGgfwv5QLX5KDWJ
+5tPLOtZmIjm4kJsodj6+OFv95Um3+QNbCoBTMAL4UfhXSyvSP8NY03obBQIDAQAB
+AoGBAKYzlC4+wT69oVSngwZGmpUIgfOQUSXBMX1OMO6uWH6SGDBBiruSNA4LrkV8
+2mDflsbgPDlySPnYX+74E5PMoPjgAcZq/+dvwTfCeZZhbACqYttdLwdTZxZWKAOi
+K8ffrD81pjIJKB8tpP7swUC6zrI70VuxJKfsU7KfBJDSElcBAkEA6tQJDjaCpFvx
+TRQjHI7vanUVJ65TigPGwZqb+iQgXYDymc3p8BnHtd0bTuYnl35x421dFTCfF6V7
+/4ceOlmDvQJBANlaJpfZl0f3c6WtTF/3Mwr7P/7UfWOuHvPTCsY1QvmdfuosV3P1
+Zhq2NyQYttw8j7cbLPA6zNojacTeZjO/ROkCQBUmuhYUpNnHCkoGCU+WNExjdV9Y
+nV+uDWX81hXG0T960N83o92jhNCFtOL7ag+ELR/uBtdUxM+tcSjH89oPnAUCQQCX
+j1BoBJeD3F4tAhnGtTZHiwmF5aAF2Q3GUbwqmEs6igNMwVy+BDmNmM/8gKtKCYTh
+VrbQUQA1gAop+DbmEJK5AkA+13WiKrj/JM1/CiEWwcX0VxOL/1FsaKgKJVnFEi5+
+kVmt9mFD09UXukpxJOIVLUNGCBBIdnm+7s3WZNRDg/b9
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/exit1/keys/secret_onion_key_ntor b/tests/integration/net/exit1/keys/secret_onion_key_ntor
new file mode 100644
index 0000000..07ebd85
Binary files /dev/null and b/tests/integration/net/exit1/keys/secret_onion_key_ntor differ
diff --git a/tests/integration/net/exit1/torrc b/tests/integration/net/exit1/torrc
new file mode 100644
index 0000000..2b5ec45
--- /dev/null
+++ b/tests/integration/net/exit1/torrc
@@ -0,0 +1,27 @@
+
+ DataDirectory exit1
+ PidFile exit1/tor.pid
+ Log notice file exit1/notice.log
+ ShutdownWaitLength 2
+ ExitRelay 1
+ IPv6Exit 1
+ ExitPolicy accept *:*
+ ExitPolicy reject *:*
+ Address 127.10.0.11
+ SocksPort 127.10.0.11:2000
+ ControlPort 127.10.0.11:2001
+ CookieAuthentication 1
+ ORPort 127.10.0.11:2002
+ DirPort 127.10.0.11:2003
+ Nickname exit1
+ ContactInfo pastly(a)torproject.org
+
+DirAuthority auth1 orport=2002 no-v2 v3ident=D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD 127.10.0.1:2003 AA45C13025C037F056E734169891878ED0880231
+DirAuthority auth2 orport=2002 no-v2 v3ident=4EE103A081F400E6622F5461D51782B876BB5C24 127.10.0.2:2003 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
+DirAuthority auth3 orport=2002 no-v2 v3ident=8B85069C7FC0593801E6491A34100264FCE28980 127.10.0.3:2003 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
+
+ TestingTorNetwork 1
+ NumCPUs 1
+ LogTimeGranularity 1
+ SafeLogging 0
+
diff --git a/tests/integration/net/exit2/fingerprint b/tests/integration/net/exit2/fingerprint
new file mode 100644
index 0000000..82a21ce
--- /dev/null
+++ b/tests/integration/net/exit2/fingerprint
@@ -0,0 +1 @@
+exit2 C0606B414423F9A2BBA2679B440056E3B07FEC85
diff --git a/tests/integration/net/exit2/keys/ed25519_master_id_public_key b/tests/integration/net/exit2/keys/ed25519_master_id_public_key
new file mode 100644
index 0000000..b0b6473
Binary files /dev/null and b/tests/integration/net/exit2/keys/ed25519_master_id_public_key differ
diff --git a/tests/integration/net/exit2/keys/ed25519_master_id_secret_key b/tests/integration/net/exit2/keys/ed25519_master_id_secret_key
new file mode 100644
index 0000000..5dc1f0d
Binary files /dev/null and b/tests/integration/net/exit2/keys/ed25519_master_id_secret_key differ
diff --git a/tests/integration/net/exit2/keys/ed25519_signing_cert b/tests/integration/net/exit2/keys/ed25519_signing_cert
new file mode 100644
index 0000000..018238c
Binary files /dev/null and b/tests/integration/net/exit2/keys/ed25519_signing_cert differ
diff --git a/tests/integration/net/exit2/keys/ed25519_signing_secret_key b/tests/integration/net/exit2/keys/ed25519_signing_secret_key
new file mode 100644
index 0000000..d407ec2
Binary files /dev/null and b/tests/integration/net/exit2/keys/ed25519_signing_secret_key differ
diff --git a/tests/integration/net/exit2/keys/secret_id_key b/tests/integration/net/exit2/keys/secret_id_key
new file mode 100644
index 0000000..2b0eb1e
--- /dev/null
+++ b/tests/integration/net/exit2/keys/secret_id_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDPSSR++AXcN9GK8J65iaQmPPEJVp895tsGD2nC9IC2ye5MwRBr
+W68grl7Jq0lK2hBNP49V+JpGn9/zvouxZ/BC0iXPPOYn9UfN80a0BIlb6L5h9C5+
+YSJ18J4sTk4Nl/j2Cm5NYDHt67YQ02aBWta7hE2hsL4okytCpu4b8WjRIwIDAQAB
+AoGBAJILx8IJwB9D2Mia9kplVxl18KISvQnhQMpJS8wHdzTSm6rKkGYD6CUPlkti
++rXZZIj40mXRTematTDIPSZWxCkbcKG6E3pAlJgmwONry7R28uB+PX8G258+7SCB
+yeWMtha0OajMslHj+8nV5pW9b9qyJ00vCPZIFdSMXi598MLhAkEA8UCJMa1zAfyW
+JB5q+3gUaIE4sJgn+Nyh10RLyEtZo3OaRjjHgV3doDI+YG4GEAyEkLWra/kaXVUi
+V3H+l48C8wJBANv1DR+4+VH4wZQsVksNkDP1//iA0yjFtW/dducehYDLe9qmUWpc
+vV6r8ibyfvZVO5016YmWkmHKJbtGdC6xpRECQECFCOvvPj2+xoycUfI02Ahm3rlj
+x/TnVKUUj8veUvfCt/SlxL1VVCs+pK33Xsm1/1IQM+spcKKbXRbT1snDpn8CQQCU
+mpG8Tec7x1lZdz7xw/8Z6+h9BuQilriHFFPBv/AoXNGXnmhA+NkD/h1CzPCUEm+N
+PiBC0ZSiNsWZKfdSmLhRAkBIwXvHkNJWMLMqr+U7C1AcFyFTojpmzQ9zhmKsnIYk
+FnGysw3OT0vx/qqJzML+ZbTAG7BkFwOJSWM+EbHO3f+6
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/exit2/keys/secret_onion_key b/tests/integration/net/exit2/keys/secret_onion_key
new file mode 100644
index 0000000..b8869a1
--- /dev/null
+++ b/tests/integration/net/exit2/keys/secret_onion_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXgIBAAKBgQDRGbi8jXaEdXAKgS63kx7qlPJpW1GVL2HHVJ/xIBrsDPJ+STKV
+E31isk48cg/FhcW91myJVa+uPg5CyRnA2upEz5kCf8W7KPyifV7faVelBYO/rKgz
+dUqXRjcMC1sF3RpNLgRFbB9JEMoLEGqF+T1JVHyvsHaXhCGkosvRtm9azQIDAQAB
+AoGBAKzVT+c6Ho5Z66QjJxRBnLpVJxGCk6p2IaH7BsDtwpL+GKndotup4mfj7dr0
+hKjFa68AP3I8yxuA25TEWG8aA6whJQ9WJJ3dqteqMI6Vv6BNLoso35aXpo+raYh+
+FeeB93gZ+Ree9gnhfLyI1ukUFcO0pq8Gc7VWI/+Kh0EcqOlBAkEA+nkTtEKzPik0
+bKhu26JgBe0eRoZ7MEfBoTQx6Aqi/3mITsU183An3CzeT7YmOY8cdxyXUUpdxG9d
+Lv2TwyOJiQJBANW27mlFVHwARad+t9PbmJXsbn6lXbAVj8cM8m5BPxdwiVtvtdv+
+t/27/MJGtL5Quh5rmXev452uyv1TEZzcKiUCQQDJN4V91eu7L0z/UZylc1+iwygE
+TjsewTars4u4NvtVM6Qua7340IwlFCKQdOtmaDLc+aoSUyTbDwAUJQCUzrLJAkEA
+h/TkHpw4btpNdYyrrV9Z5qaOdIsG2uocmWinIXToiiTRfRXH/7g/nG9nEMCiYyBA
+BvI0o2uFxd5YzGd4IO3+8QJAFDg7lcMO8IHcajS/n1OG2J1ORt+hRJ6Hsq76H69E
+LIgcBsN/hjV6jVrMsjvO8r5cTw+aAVWB5Hb8sgpqpUSulQ==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/exit2/keys/secret_onion_key_ntor b/tests/integration/net/exit2/keys/secret_onion_key_ntor
new file mode 100644
index 0000000..8b8a6cc
Binary files /dev/null and b/tests/integration/net/exit2/keys/secret_onion_key_ntor differ
diff --git a/tests/integration/net/exit2/torrc b/tests/integration/net/exit2/torrc
new file mode 100644
index 0000000..b93c8d1
--- /dev/null
+++ b/tests/integration/net/exit2/torrc
@@ -0,0 +1,27 @@
+
+ DataDirectory exit2
+ PidFile exit2/tor.pid
+ Log notice file exit2/notice.log
+ ShutdownWaitLength 2
+ ExitRelay 1
+ IPv6Exit 1
+ ExitPolicy accept *:*
+ ExitPolicy reject *:*
+ Address 127.10.0.12
+ SocksPort 127.10.0.12:2000
+ ControlPort 127.10.0.12:2001
+ CookieAuthentication 1
+ ORPort 127.10.0.12:2002
+ DirPort 127.10.0.12:2003
+ Nickname exit2
+ ContactInfo pastly(a)torproject.org
+
+DirAuthority auth1 orport=2002 no-v2 v3ident=D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD 127.10.0.1:2003 AA45C13025C037F056E734169891878ED0880231
+DirAuthority auth2 orport=2002 no-v2 v3ident=4EE103A081F400E6622F5461D51782B876BB5C24 127.10.0.2:2003 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
+DirAuthority auth3 orport=2002 no-v2 v3ident=8B85069C7FC0593801E6491A34100264FCE28980 127.10.0.3:2003 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
+
+ TestingTorNetwork 1
+ NumCPUs 1
+ LogTimeGranularity 1
+ SafeLogging 0
+
diff --git a/tests/integration/net/exit3/fingerprint b/tests/integration/net/exit3/fingerprint
new file mode 100644
index 0000000..05796b5
--- /dev/null
+++ b/tests/integration/net/exit3/fingerprint
@@ -0,0 +1 @@
+exit3 FC264325EA99D597FF94DA88379DABB64304DD9D
diff --git a/tests/integration/net/exit3/keys/ed25519_master_id_public_key b/tests/integration/net/exit3/keys/ed25519_master_id_public_key
new file mode 100644
index 0000000..3e07d44
Binary files /dev/null and b/tests/integration/net/exit3/keys/ed25519_master_id_public_key differ
diff --git a/tests/integration/net/exit3/keys/ed25519_master_id_secret_key b/tests/integration/net/exit3/keys/ed25519_master_id_secret_key
new file mode 100644
index 0000000..dad17de
Binary files /dev/null and b/tests/integration/net/exit3/keys/ed25519_master_id_secret_key differ
diff --git a/tests/integration/net/exit3/keys/ed25519_signing_cert b/tests/integration/net/exit3/keys/ed25519_signing_cert
new file mode 100644
index 0000000..61bc40a
Binary files /dev/null and b/tests/integration/net/exit3/keys/ed25519_signing_cert differ
diff --git a/tests/integration/net/exit3/keys/ed25519_signing_secret_key b/tests/integration/net/exit3/keys/ed25519_signing_secret_key
new file mode 100644
index 0000000..68d8da0
Binary files /dev/null and b/tests/integration/net/exit3/keys/ed25519_signing_secret_key differ
diff --git a/tests/integration/net/exit3/keys/secret_id_key b/tests/integration/net/exit3/keys/secret_id_key
new file mode 100644
index 0000000..b7e583e
--- /dev/null
+++ b/tests/integration/net/exit3/keys/secret_id_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQCskSKJ8IEBm3uhXifX8y6rak0vK53tT/CAU9FruMjBgd/aTS+m
+927TYngFTyWXYL3mo7xD5Cs8Gpsoe932iq/KAPp+/HCb71OHFwN5/hgtG/Yfpj/c
+xtlId4V+3KEnnr6opO6B3j7JNwTJJeRmpgeQyfS6Unh0vL+PycSgcPCsywIDAQAB
+AoGBAJwQAYFoLPNMLwmnwjbNaaaCU11Wf9OvmNwlcV6PVZeTIeQmK/M/EE5BXjPG
++UMmrXcZGtj3T5ZipXF+XCVsFT8IGjX2xVHCa6Uf4lL4jEJb4pVIMEQEEd989g3T
+RTS2ou9HRl9URrMUdakeysKqFu+tPh4f+Jjyi0bZ4HfkyxoxAkEA5GRnvu28R1ac
+J3KF+kE1MdJhHnqET4MQOyhW/485aa2/Ym6uFaQhiXatNwQUHsF+j+p+jYXEHy8S
+fBtqgPeyuQJBAMFtN5DgagsF8VN5SdXk+e1BC6yCJkUugpEyXHH4ArCmrtPXMxg2
+fBvMJzjGh6kgLvMAYkecrz7jkKLGiQxMaaMCQGx5v8iwM4eSfFJEE5w70l8ac+Q8
+/pChSFlAnKl+xh8KVecTeH1w2jjm8/g4aLH+5vTFxFvFV9QT0Gy/vMMKYokCQGAz
+hMZehv9ShlMg6NMkHhWdG0RCOux/lFrItGfOlO/tBti/mF77gkCFCiDXxNMd+ZvM
+XhUF3bcmkWIT4kemnYcCQD2TT1a9CA6yRK76+P6ODnqCG+d+swJrDMAXG6mfEmPn
+cBmcurapsowrmj8oKHdW8o45k9gKiWPIvG9Fmbwg1Fg=
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/exit3/keys/secret_onion_key b/tests/integration/net/exit3/keys/secret_onion_key
new file mode 100644
index 0000000..d64d5ac
--- /dev/null
+++ b/tests/integration/net/exit3/keys/secret_onion_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXgIBAAKBgQC7cz4JfpL3t7AQWDadHv25xsNBt9QCVMLNpTPdi4FMxd4ZIGac
+qZnjHVNEb89vNReK59Mufai4XnWMg+/pBMAhwNtQcn3dvVqbil+q/ixR2fhWmR4i
+Ams7VfubqHhMsgxGa+o0o608MhmrV+eHLBJlMC8OiGuRzHAXRmYt0Jy7CQIDAQAB
+AoGBAJbOFyniR/C9OgtcPMvZY/0y+GGFuC4L7REvCHQDSQnv4kfKtmLxW5nJPPVB
+EtyAFSmuakrr03JIpD9g4gFQzhS3JcbvCXa81Qg2PUFo30Cuqr5W+6nAYJB9Z6n1
+dYECnIXuAYzcmJSAKiYWRFcG/MqpHOxsAJ2P8xzO6BRyiZURAkEA8+Uj7WSxL2+R
+dEfJIFjbnBqbUUWQF9fjkHzsCqpsDMHAOywnFc1lOtmyOZ5+3OePKpmk8a1oXQt3
+6HrSjCKIVQJBAMTA7ezcW0uyWkRKO/tVdQm1IrxP33Oi99bHfturUwh1rljA1fHe
+aqc4aD8K31fB4373IRfvRDW2c5I8lJoIq+UCQB6TY2Wnce8YdYu2VCiR+zYev8n4
+ho/2qLi8cHsF0nXm9Ep2xo+dKEuwbv96Nz1KalBU4rDJpIPFpEqo2yxmR+ECQQDB
+NszvO34UGfN2+Idqy4MBo3WXA8Dlp/ZGXuZ/BgGmXxp1Yfk3ajnGOSh2MFEftvGX
+L0y6WmbbcG6R/xfXJAjZAkEAv/3H2vrkiE4jhDvj7p+A4ohL2vZ2gpwtkzUFmK6W
+Ha9KAR+ITrWi31ENnQ38Nc/dy4Piub23r0RS9AZnjjmRmQ==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/exit3/keys/secret_onion_key_ntor b/tests/integration/net/exit3/keys/secret_onion_key_ntor
new file mode 100644
index 0000000..8a5417e
Binary files /dev/null and b/tests/integration/net/exit3/keys/secret_onion_key_ntor differ
diff --git a/tests/integration/net/exit3/torrc b/tests/integration/net/exit3/torrc
new file mode 100644
index 0000000..542b4cc
--- /dev/null
+++ b/tests/integration/net/exit3/torrc
@@ -0,0 +1,27 @@
+
+ DataDirectory exit3
+ PidFile exit3/tor.pid
+ Log notice file exit3/notice.log
+ ShutdownWaitLength 2
+ ExitRelay 1
+ IPv6Exit 1
+ ExitPolicy accept *:*
+ ExitPolicy reject *:*
+ Address 127.10.0.13
+ SocksPort 127.10.0.13:2000
+ ControlPort 127.10.0.13:2001
+ CookieAuthentication 1
+ ORPort 127.10.0.13:2002
+ DirPort 127.10.0.13:2003
+ Nickname exit3
+ ContactInfo pastly(a)torproject.org
+
+DirAuthority auth1 orport=2002 no-v2 v3ident=D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD 127.10.0.1:2003 AA45C13025C037F056E734169891878ED0880231
+DirAuthority auth2 orport=2002 no-v2 v3ident=4EE103A081F400E6622F5461D51782B876BB5C24 127.10.0.2:2003 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
+DirAuthority auth3 orport=2002 no-v2 v3ident=8B85069C7FC0593801E6491A34100264FCE28980 127.10.0.3:2003 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
+
+ TestingTorNetwork 1
+ NumCPUs 1
+ LogTimeGranularity 1
+ SafeLogging 0
+
diff --git a/tests/integration/net/relay1/fingerprint b/tests/integration/net/relay1/fingerprint
new file mode 100644
index 0000000..01a9266
--- /dev/null
+++ b/tests/integration/net/relay1/fingerprint
@@ -0,0 +1 @@
+relay1 2ABFBACE61167A1019A56CB35B2E3362B97D8570
diff --git a/tests/integration/net/relay1/keys/ed25519_master_id_public_key b/tests/integration/net/relay1/keys/ed25519_master_id_public_key
new file mode 100644
index 0000000..ae389f0
Binary files /dev/null and b/tests/integration/net/relay1/keys/ed25519_master_id_public_key differ
diff --git a/tests/integration/net/relay1/keys/ed25519_master_id_secret_key b/tests/integration/net/relay1/keys/ed25519_master_id_secret_key
new file mode 100644
index 0000000..4aa8039
Binary files /dev/null and b/tests/integration/net/relay1/keys/ed25519_master_id_secret_key differ
diff --git a/tests/integration/net/relay1/keys/ed25519_signing_cert b/tests/integration/net/relay1/keys/ed25519_signing_cert
new file mode 100644
index 0000000..1c4b1d3
Binary files /dev/null and b/tests/integration/net/relay1/keys/ed25519_signing_cert differ
diff --git a/tests/integration/net/relay1/keys/ed25519_signing_secret_key b/tests/integration/net/relay1/keys/ed25519_signing_secret_key
new file mode 100644
index 0000000..6c9d0b9
Binary files /dev/null and b/tests/integration/net/relay1/keys/ed25519_signing_secret_key differ
diff --git a/tests/integration/net/relay1/keys/secret_id_key b/tests/integration/net/relay1/keys/secret_id_key
new file mode 100644
index 0000000..f8f6cff
--- /dev/null
+++ b/tests/integration/net/relay1/keys/secret_id_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXgIBAAKBgQDS3gAMLc0Qf2ICiU8e8jcZORk6Erv5rK8J0HpoGwZd7DsPYv6O
+M1G8MVuwHQ8wiFz2ntk6n59YuH262xeMYgLmr0oBvpp2VrSgvRHhyecGR2Og9031
+5YlP2xkb9kFVTbV6395abIl+LGN8F3u7egeQtbUwB5TnXN9Xcm+rk4e4VwIDAQAB
+AoGAI8NJCMe/zrt7+Ogmxh3YYGvBroq83MR/z09PY1aqBsXo4lwsxhtIEn3gigbz
+q4yFD8KzHvExik+H62f7H3EEAqLN84wvCjy4vxl1/0ilgo5MYUkAemnhNtVuUHyu
+YniSVHCR2To2xYhhg8dg5EGfCik5p7Lin868kEj0mCjj6DECQQD7EDvsnM/WVzzA
+YiI+eZVv9X2JS4p9Kr2QOQKPvT7kbaA/2ScxOPeWw/4bTxrifRjOzmabDCqrzwgy
+RxLznlx5AkEA1wNuqhAcwL1MuFNTsbv/gXn8hR2uB+Wu88+t6RZEi5RvWDkeaM16
+1ax6fJXA5Nov2hmY1k/4bZ4d4Zebg/jnTwJBALRfWW4IyxkG29KrrkaMO1yQVnyJ
+FRoP1tkC3GBAairax8KXVJz8fISIkssz7fDCR0xs5TKHbzC4MP9OKMN2BqECQQCm
+Lpvwy0U93tGWQakVXQWNMBhxVlA1AFvpS2HSHojaDN7GJFeRjwdacNW2xxPwjYag
+nloXgnWzW5siykfDh7RXAkEA3D0LTZ6YHAQIuWayxvjoj+f3am5GduHPUu3RJfpY
+faEgP/WrvaRT0pw6rJmcumsG4h0Cp0W48FQFMQ8JSB+c0g==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay1/keys/secret_onion_key b/tests/integration/net/relay1/keys/secret_onion_key
new file mode 100644
index 0000000..10a1ab2
--- /dev/null
+++ b/tests/integration/net/relay1/keys/secret_onion_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQC+l6cIfMBVPArIvlMSwV/9i4ZcsjCbegOysvQ4b9eXenwwluE0
+zgkqp4RyPjAZwcGIPzLduWzygFZVwchupF9Yzmg+67DyVs2rNHba7/dALC52+p9r
+n+Xi/ge1gxDQr8biucE+fccRfwWX24nQGAOTqqF5tuj09ohH/KGNajvvKwIDAQAB
+AoGBAKKygLMdE25vT+FnnzDOhGvDFFLDBf1jHg8I9rPKvaagt60ez2atT2PrFoQT
+lCoYnWX6VSizZk5owcp5HulcRcrmp9YXRPpEIBepJWPOFLd1/TwjmqlhHnTOtDTi
+cbep2HpT8k09Sm4xII7BoML1gktBc5oqDo59P6RsWxzB14uhAkEA6vvBHaAH6HBK
+BZU08jsywMYqCKXZSRGiAMdYumPLqvalNB9WXwubkG3ICo7iBMVTKjPiCk+aeXYP
+jOO/HbExkQJBAM+jgkebWm99IgecUsohJ6scOH8D0Ahjr76BnMZy/xTNEq9SH+lc
+NxfHCADUCC34UIvIF55a/9vVVtyfgOpv9vsCQA5RInYEnxa5aLkoWx57Ht+B82Ot
+fyylh2JWwwAwPmN/PZeMZT3LPkIxfiOuivTRdPy4RohsSzQlTlM+ORG9DxECQAgE
+BemBw9H+AKxOipunAAMJCd1NZmCMiKJQGp9GnTZOXGRMRVMa7j2Kv3JYvSAZL/LV
+fKPuW2Y/LCVEOxPR0rUCQEXgCY7yWfkwmC10zoe0IWHiV9jOSEGdFEWUElo1zHUH
+qWpoxcdU01k4+sYNDTNE87pnxvbFxBluLGyNQozf0vs=
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay1/keys/secret_onion_key_ntor b/tests/integration/net/relay1/keys/secret_onion_key_ntor
new file mode 100644
index 0000000..7532786
Binary files /dev/null and b/tests/integration/net/relay1/keys/secret_onion_key_ntor differ
diff --git a/tests/integration/net/relay1/torrc b/tests/integration/net/relay1/torrc
new file mode 100644
index 0000000..168a066
--- /dev/null
+++ b/tests/integration/net/relay1/torrc
@@ -0,0 +1,24 @@
+
+ DataDirectory relay1
+ PidFile relay1/tor.pid
+ Log notice file relay1/notice.log
+ ShutdownWaitLength 2
+ ExitRelay 0
+ Address 127.10.0.4
+ SocksPort 127.10.0.4:2000
+ ControlPort 127.10.0.4:2001
+ CookieAuthentication 1
+ ORPort 127.10.0.4:2002
+ DirPort 127.10.0.4:2003
+ Nickname relay1
+ ContactInfo pastly(a)torproject.org
+
+DirAuthority auth1 orport=2002 no-v2 v3ident=D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD 127.10.0.1:2003 AA45C13025C037F056E734169891878ED0880231
+DirAuthority auth2 orport=2002 no-v2 v3ident=4EE103A081F400E6622F5461D51782B876BB5C24 127.10.0.2:2003 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
+DirAuthority auth3 orport=2002 no-v2 v3ident=8B85069C7FC0593801E6491A34100264FCE28980 127.10.0.3:2003 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
+
+ TestingTorNetwork 1
+ NumCPUs 1
+ LogTimeGranularity 1
+ SafeLogging 0
+
diff --git a/tests/integration/net/relay1mbyteMAB/fingerprint b/tests/integration/net/relay1mbyteMAB/fingerprint
new file mode 100644
index 0000000..dbc1462
--- /dev/null
+++ b/tests/integration/net/relay1mbyteMAB/fingerprint
@@ -0,0 +1 @@
+relay1mbyteMAB 117A456C911114076BEB4E757AC48B16CC0CCC5F
diff --git a/tests/integration/net/relay1mbyteMAB/keys/ed25519_master_id_public_key b/tests/integration/net/relay1mbyteMAB/keys/ed25519_master_id_public_key
new file mode 100644
index 0000000..204fb62
Binary files /dev/null and b/tests/integration/net/relay1mbyteMAB/keys/ed25519_master_id_public_key differ
diff --git a/tests/integration/net/relay1mbyteMAB/keys/ed25519_master_id_secret_key b/tests/integration/net/relay1mbyteMAB/keys/ed25519_master_id_secret_key
new file mode 100644
index 0000000..9054bb4
Binary files /dev/null and b/tests/integration/net/relay1mbyteMAB/keys/ed25519_master_id_secret_key differ
diff --git a/tests/integration/net/relay1mbyteMAB/keys/ed25519_signing_cert b/tests/integration/net/relay1mbyteMAB/keys/ed25519_signing_cert
new file mode 100644
index 0000000..768021c
Binary files /dev/null and b/tests/integration/net/relay1mbyteMAB/keys/ed25519_signing_cert differ
diff --git a/tests/integration/net/relay1mbyteMAB/keys/ed25519_signing_secret_key b/tests/integration/net/relay1mbyteMAB/keys/ed25519_signing_secret_key
new file mode 100644
index 0000000..0c23b54
Binary files /dev/null and b/tests/integration/net/relay1mbyteMAB/keys/ed25519_signing_secret_key differ
diff --git a/tests/integration/net/relay1mbyteMAB/keys/secret_id_key b/tests/integration/net/relay1mbyteMAB/keys/secret_id_key
new file mode 100644
index 0000000..41b43ac
--- /dev/null
+++ b/tests/integration/net/relay1mbyteMAB/keys/secret_id_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQC7CSfsxnVxSgYTlL9ItQvjEnwehGUVu8zr8TZ3T6DV+UJedFCP
+LWhfqJvo3ourzskXrPYUWSt7U4k/fC0113+t+QHe4lmRlvxfqMC0WxHuXbXI2fgF
+X5YByYH9GmEnSDuqpxjpmYc/LJp2NVHB/w8KwaOkYCJdFLjGzPKCcgLj8QIDAQAB
+AoGBAKS3J4YKMRuYSUmtUdhCOTm86bomdq9xOMMBJypj4g0O+zgbz2aIYsb7wnKO
+qwqfjdFf7Ud2UCjIJLLYNSiZpEKbFSUl1eA0VqlGSa1RmiB8CytS2tMW9yFph58k
+YcMoRu/a5uYJL0viKYI7kHjctKgN7708TfDsVQW8Q6htRCaRAkEA8dMa6X2/8sOS
+Gke23dMiRfL/v6TSkeaUgWNL+6pgLinDbNkooMMxE0Li/vpkwHrse8+JVVHh36RC
+LSOl+twxOwJBAMX/30ykFQQWUrBLKgrvjU/TyQXb3+MN+PrLo2xQTT2LdBLQYf+J
+kpKIJqli7h7rh6qxZ+aNpDwP171y5q5F7MMCQQCOHNOp9/5/ujL4QsDSp6tylBV8
+GG6u02TejO4wXbXcKyrvosbfgxYqDZq84YWoIBUtxY8dlts4xJ0nTdXTEOfVAkBJ
+nT46Um713A7WOLvi4PmbClSc9wigdFtzcy7JYHm3PhfjvtIQned+z1wAciWyHUON
+dPP6RgMfyYwehY+6j4jdAkAAgGtpdYmYybJKRj9JO2JKHHV8fPKZwDVtU4nR5yw7
+il8Ir9dtwMWy+Mevk8aH8OZzeHrvzCCnvdAvCxgRfRfO
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay1mbyteMAB/keys/secret_onion_key b/tests/integration/net/relay1mbyteMAB/keys/secret_onion_key
new file mode 100644
index 0000000..c41070d
--- /dev/null
+++ b/tests/integration/net/relay1mbyteMAB/keys/secret_onion_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXgIBAAKBgQDBs+qzCuXuOvN4dddarTnh1+NIpEpeSWqpSmU0V7e/dCgJ03TS
+GWuUY+rEFOnzOrfvYy0ow7+eS2vCmvDLmLSp8zhJxaxGOitGn1iYtUgh9VLHWu1v
+a/dWvTqkmV3OxgSmKdAGuWEfXbuL57/uGRxWOQxtHcSkySbFCTbqJXYzEwIDAQAB
+AoGAGgn/oPX0FuRh2m2s94mV4GBPM3KydJ5V8lAH7tNj5h7NSxTb/WphZd9Qre9J
+y+K22z1v0q0N00+8OrrtZ9EtZ/cFpCtRtHzaCnXKmsZ+HhOCREF1VbjNt6VOrRfZ
+EEcJcIiXw0fXqU5/cQDN1tPZtOgBiDfFPVCsT6LlByJOPBECQQD4/xdtVK3FgRPd
+GTAwraxwzY0aayCAjCUS4aCTCfv+fzjvH9pGZ7kwROGAgxPHvXs+qzP6O71d6zdM
+WueOhQDNAkEAxyauZPT6ifpcJF/SBjvUfVy6Sf5oxvA1PSOJnh8M80pkvk/SQ9Cg
+Z6x+zy6u6hVRIsHr3XaCAmcSya8HFXqDXwJBAIMJ7JBTMihw571CFkRoAgpTguDW
+ZAKCvrgTGeiIJqAm4BWoU70dtS4b8fkqAmzp4UR34SDd86jLswxyAs7UXDkCQQCu
+b9c5XstEqCKlSbjw9N7+n4Yc4dZsymIXl1UnRxNU1si/WbNW6xpVNOYuGznil6Fl
+zG4IoZDnAdmXBtQxoAoJAkEAoNdrVYjgScUvlcsGtDVQG2q3OY5wt//XbPSUvC5x
+LJWz91UWR2JWmKX29hLeHRwltdY8MknyRy7qIVfaaGU2vw==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay1mbyteMAB/keys/secret_onion_key_ntor b/tests/integration/net/relay1mbyteMAB/keys/secret_onion_key_ntor
new file mode 100644
index 0000000..2d321e5
Binary files /dev/null and b/tests/integration/net/relay1mbyteMAB/keys/secret_onion_key_ntor differ
diff --git a/tests/integration/net/relay1mbyteMAB/torrc b/tests/integration/net/relay1mbyteMAB/torrc
new file mode 100644
index 0000000..9ce35dd
--- /dev/null
+++ b/tests/integration/net/relay1mbyteMAB/torrc
@@ -0,0 +1,25 @@
+
+ DataDirectory relay1mbyteMAB
+ PidFile relay1mbyteMAB/tor.pid
+ Log notice file relay1mbyteMAB/notice.log
+ ShutdownWaitLength 2
+ ExitRelay 0
+ Address 127.10.0.14
+ SocksPort 127.10.0.14:2000
+ ControlPort 127.10.0.14:2001
+ CookieAuthentication 1
+ ORPort 127.10.0.14:2002
+ DirPort 127.10.0.14:2003
+ Nickname relay1mbyteMAB
+ ContactInfo pastly(a)torproject.org
+
+DirAuthority auth1 orport=2002 no-v2 v3ident=D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD 127.10.0.1:2003 AA45C13025C037F056E734169891878ED0880231
+DirAuthority auth2 orport=2002 no-v2 v3ident=4EE103A081F400E6622F5461D51782B876BB5C24 127.10.0.2:2003 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
+DirAuthority auth3 orport=2002 no-v2 v3ident=8B85069C7FC0593801E6491A34100264FCE28980 127.10.0.3:2003 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
+
+ TestingTorNetwork 1
+ NumCPUs 1
+ LogTimeGranularity 1
+ SafeLogging 0
+
+MaxAdvertisedBandwidth 1 MByte
diff --git a/tests/integration/net/relay1mbyteRBR/fingerprint b/tests/integration/net/relay1mbyteRBR/fingerprint
new file mode 100644
index 0000000..fd43f33
--- /dev/null
+++ b/tests/integration/net/relay1mbyteRBR/fingerprint
@@ -0,0 +1 @@
+relay1mbyteRBR 934E06F38A391CB71DF83ECDE05DFF5CDE3AC49D
diff --git a/tests/integration/net/relay1mbyteRBR/keys/ed25519_master_id_public_key b/tests/integration/net/relay1mbyteRBR/keys/ed25519_master_id_public_key
new file mode 100644
index 0000000..689bdb0
Binary files /dev/null and b/tests/integration/net/relay1mbyteRBR/keys/ed25519_master_id_public_key differ
diff --git a/tests/integration/net/relay1mbyteRBR/keys/ed25519_master_id_secret_key b/tests/integration/net/relay1mbyteRBR/keys/ed25519_master_id_secret_key
new file mode 100644
index 0000000..1235af2
Binary files /dev/null and b/tests/integration/net/relay1mbyteRBR/keys/ed25519_master_id_secret_key differ
diff --git a/tests/integration/net/relay1mbyteRBR/keys/ed25519_signing_cert b/tests/integration/net/relay1mbyteRBR/keys/ed25519_signing_cert
new file mode 100644
index 0000000..3dae7a8
Binary files /dev/null and b/tests/integration/net/relay1mbyteRBR/keys/ed25519_signing_cert differ
diff --git a/tests/integration/net/relay1mbyteRBR/keys/ed25519_signing_secret_key b/tests/integration/net/relay1mbyteRBR/keys/ed25519_signing_secret_key
new file mode 100644
index 0000000..7f61973
Binary files /dev/null and b/tests/integration/net/relay1mbyteRBR/keys/ed25519_signing_secret_key differ
diff --git a/tests/integration/net/relay1mbyteRBR/keys/secret_id_key b/tests/integration/net/relay1mbyteRBR/keys/secret_id_key
new file mode 100644
index 0000000..8f3fb36
--- /dev/null
+++ b/tests/integration/net/relay1mbyteRBR/keys/secret_id_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICWwIBAAKBgQCk3FyIv7JJ33Il3PJmnEu1h5k+7LnF79Bw1isjJln1zRtKMDFt
+09NzAiM0gGaMwOhqIgi9/MlSUFIEfWi/6SFfidbDtWb5ltEYZZQJ55FTElItLPyP
+z7DJpU6TTGB/jbeGt3nMQcxAUWJkBfA31N/azi39D+2tfKaeiIWxc9IUewIDAQAB
+AoGATMd8KQvuQs1X4h5mnjdIY0DFtDKXyoGHuCVmbbZcy0c84G5VduriXXuvXbI3
+EHJ/S36SR7lFIZrat9CYSliO+6pZsDV89VukFdO7wh/+Ox0Hz4Pu+ZvbOzvXX1PY
+VCNVy8uQaXzXmi0qJ6ga/rJf8ZbwlTY2BpFQWKtDQZdxB7ECQQDRFzzb6akAxC1N
+b8JPrSS1Z5yomdNk0TN0dVNfUqptbHne/SEIndMgQN2YaucNDHxtXsEOPtwOhKCT
+RTvtP8flAkEAydjaHBenCdFjmxsfL1kO+8hSljaSY8D69vh1MUesEHVUdmt7jkEB
+I5uSUacCZbRegURr+c4dAZNSlw/fRJ/k3wJANV2/+8UUjIyFn4kRyDJB90b9tg6k
+5Mt8XZIAeIjp1MnmBSMIRmG53DaSGG/Yjv0L2QJhNdiXY+E39r6p//DSfQJAQfo+
+IRyiHxVwh4yv/twPh8GNLUidRToZTo0cUYVp+t8/Qo4TjwY0hx0dEM+UewYgNgTV
+fowe8xrizjoD8vyI5QJAGvWUZ7KdNjoogB7ZRV5S7BaKwOK4DxrQRkonqqhCzmgd
+5Fi6B/I6oTCb4t7dEyGAf1808MveFlPDILy9oo8XIA==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay1mbyteRBR/keys/secret_onion_key b/tests/integration/net/relay1mbyteRBR/keys/secret_onion_key
new file mode 100644
index 0000000..bb1d926
--- /dev/null
+++ b/tests/integration/net/relay1mbyteRBR/keys/secret_onion_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQCmT+ACA5QDRPqy/1O/h/dEDbQPGrZO7NADg66Nv3SoQg9fJcM/
+WTdqCgZEKrop/YJS2qv+3DTMca7ceAyADZUnyHh6G4rBSIeHjpn/3OWvrNYuch7U
+wWm+ZP2EH9465uEBMIU5xFKbV3DTwXYb+ckF7aYp/kR7YUnOFduE2s95PwIDAQAB
+AoGAJi/g95VqvvVvuvn1eNz3YaDj3zP6+FRXzvbFdbaoSpogfXBmTH1nw+lZVv2Y
+kVusOOoM5BAb73WK+QR3mk+EF6d4XAuAR0BBfs6oDySHoIkGGUvt/78/y4PjQJiq
+QlbXyuM/IeIcoueGXzjrFbJS6giUoRuSfMuZu/+44JHuVMECQQDbdwc/zfkkV9To
+wqTEemCEzU6SbxWjVOcmzFBVhu7J/LlMtrFJ4U6Q+POOGkEaMcRawtoc4+wSPpUf
+j+WOmQDrAkEAwf+enb1HhRNE80zYf9/b3tZXvc9lEUvG/BHS0nVS5iTl2QVLE7bC
+s4dpiQ+p7Bn41o0iJejJl1Y4HufbipBz/QJAMYYxr5dGYoojdIb/8YqAH1fJJEhH
+BL2TD/FJK5OwbQpHsmUDqt1aAmL7axTHniae3bBc0eopCpDuy9mH/t7OEwJBALcU
+3wNscweSpNqb5iHgCOcnD40RIgeNpQ+UXorBsGeD4OrLxQuoydyV6bIw9yLba+xH
+Kzftlfpdov7/vz/ojZ0CQQDTzLKgAQ7C8HaLNPuX+w8SVlu7+Hf/rdlaTmppAAFa
+CbZIc6BnSeDJeoI5aPyy3w/2ZwFMYbVDnCSbgO3jO33N
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay1mbyteRBR/keys/secret_onion_key_ntor b/tests/integration/net/relay1mbyteRBR/keys/secret_onion_key_ntor
new file mode 100644
index 0000000..3b8b3d1
Binary files /dev/null and b/tests/integration/net/relay1mbyteRBR/keys/secret_onion_key_ntor differ
diff --git a/tests/integration/net/relay1mbyteRBR/torrc b/tests/integration/net/relay1mbyteRBR/torrc
new file mode 100644
index 0000000..32bc762
--- /dev/null
+++ b/tests/integration/net/relay1mbyteRBR/torrc
@@ -0,0 +1,25 @@
+
+ DataDirectory relay1mbyteRBR
+ PidFile relay1mbyteRBR/tor.pid
+ Log notice file relay1mbyteRBR/notice.log
+ ShutdownWaitLength 2
+ ExitRelay 0
+ Address 127.10.0.15
+ SocksPort 127.10.0.15:2000
+ ControlPort 127.10.0.15:2001
+ CookieAuthentication 1
+ ORPort 127.10.0.15:2002
+ DirPort 127.10.0.15:2003
+ Nickname relay1mbyteRBR
+ ContactInfo pastly(a)torproject.org
+
+DirAuthority auth1 orport=2002 no-v2 v3ident=D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD 127.10.0.1:2003 AA45C13025C037F056E734169891878ED0880231
+DirAuthority auth2 orport=2002 no-v2 v3ident=4EE103A081F400E6622F5461D51782B876BB5C24 127.10.0.2:2003 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
+DirAuthority auth3 orport=2002 no-v2 v3ident=8B85069C7FC0593801E6491A34100264FCE28980 127.10.0.3:2003 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
+
+ TestingTorNetwork 1
+ NumCPUs 1
+ LogTimeGranularity 1
+ SafeLogging 0
+
+RelayBandwidthRate 1 MByte
diff --git a/tests/integration/net/relay2/fingerprint b/tests/integration/net/relay2/fingerprint
new file mode 100644
index 0000000..f799926
--- /dev/null
+++ b/tests/integration/net/relay2/fingerprint
@@ -0,0 +1 @@
+relay2 8E687E91DCAB967F6E4EE8E46E66F6AD05C7C625
diff --git a/tests/integration/net/relay2/keys/ed25519_master_id_public_key b/tests/integration/net/relay2/keys/ed25519_master_id_public_key
new file mode 100644
index 0000000..0932a16
Binary files /dev/null and b/tests/integration/net/relay2/keys/ed25519_master_id_public_key differ
diff --git a/tests/integration/net/relay2/keys/ed25519_master_id_secret_key b/tests/integration/net/relay2/keys/ed25519_master_id_secret_key
new file mode 100644
index 0000000..2de3459
Binary files /dev/null and b/tests/integration/net/relay2/keys/ed25519_master_id_secret_key differ
diff --git a/tests/integration/net/relay2/keys/ed25519_signing_cert b/tests/integration/net/relay2/keys/ed25519_signing_cert
new file mode 100644
index 0000000..fac1d53
Binary files /dev/null and b/tests/integration/net/relay2/keys/ed25519_signing_cert differ
diff --git a/tests/integration/net/relay2/keys/ed25519_signing_secret_key b/tests/integration/net/relay2/keys/ed25519_signing_secret_key
new file mode 100644
index 0000000..1b15330
Binary files /dev/null and b/tests/integration/net/relay2/keys/ed25519_signing_secret_key differ
diff --git a/tests/integration/net/relay2/keys/secret_id_key b/tests/integration/net/relay2/keys/secret_id_key
new file mode 100644
index 0000000..fba3d49
--- /dev/null
+++ b/tests/integration/net/relay2/keys/secret_id_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQDxUgdr63thXzLDAycLvU4Ly4CAOH9r13DlTaWH3ggHFGkBD85K
+kFYlhWnuq29aq6U+Yk4A5mw9KmW0ekE2pEACUsvcHXTS5EDqEkDXc1l6QX0l69RM
+YfkfVwKy6WLxr7Y0RPNqckpwP8e+g2mgsYs+bYmUjsvcIVsV9AjMCNU9cQIDAQAB
+AoGAOIHOvxSK9YgHKObqE7OmPNjQJDYWkDgIdYkzA5eYJaA/3kHHOmqF4Y9V+M8n
+6gFbVjpKradHHSN6YUJnVtYrLmuvlDg22zwJYJK7seZIjn/kF2QSMX6zuVj3m4iK
+WvAlbVUGwmv1WGMzZjps3rLuQbF7p81MGMwGEJ8bgy00s6kCQQD7mZ9Jeoayhwz3
+P14IJ/0PPaxUbzoKKBysvJ1NUerVznAjcQXpjRDdiDDfTioYpkG79Ad6kXfnSqHD
+de9upU7LAkEA9Ypi3bxAEXyH7Q81qEZUDSM6VL2xaAtUU/qsi3QGk29ddo1P1i5N
+l4AWmiWFNsF6R3cJAmnd1ezgmjN4VQ9BMwJAE0G2x1DxbkiX3XSkJcupurjlr7Cz
+qINZbn8hKwHSD3s1agEEitOZLtt1oiHBZxGShmgvClqH6tPzfZpRMQ7F8QJAHqHV
+E7SYiZXvnzN2jje35Kuwa0H/D+vZ6WAshnlDGMGb915Jx36fT3c7Wp+zrtEUYDYJ
+ebObaUTUAGjLalEs4QJBAMah3/xBAplHAbVQnXXQHpn+0qsY0ktLyOjRIft8jfrY
+/qPQm5C6A5S+KIjmv2AGp0TD6Fas0Bx8MONCv5oVRSE=
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay2/keys/secret_onion_key b/tests/integration/net/relay2/keys/secret_onion_key
new file mode 100644
index 0000000..ab4954d
--- /dev/null
+++ b/tests/integration/net/relay2/keys/secret_onion_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXgIBAAKBgQD6gT1tnd4Sei+DNvTlGy+oH9CQMnKCNvTm2ebPjN3FgOta8bTD
+nvw+OPDfyzZbTyx309fRabg1GgrtSNq748sB2JotNRXq5yZpASrEq90gayGtPinY
+unyypb7LzUenXH75tpypbdTrJi4+vkvn8sP1bbMG/lEPlEOE/UjRFWXNsQIDAQAB
+AoGAfVai/LDLh2U5Vqbtu6BxpOZePXfwUXTb7pHCacCqygJqQDPF5UcsIJnu85rC
+1Mb1kfMd/fqun2srYnRcdTxRutpR+21v+RKTF+GGo0rgQ3Ub6FU6CWg4cgC26iDR
+r63QKLpwqYEkhurWFBtKOZfrIdzcsXrQ/08D2Wp/hcGM0+0CQQD+In/pTZTu2/Jk
+pRXOkD2G02goqtoTw80UaVpnyN/NUWZklJAwbQ/Hg1CHRSv7JHwCB0cQCdtWZZxa
+fWEvjLkLAkEA/FfrgcPVwjvYU7m54Es8hXSVUM+Y5n27wIcgyINbvY2Q/UCNNPVP
+1QOsYh5T9gZPYTyDPCpBMYPP9oiDajIhswJBAJPdlvc0QNfJ+fs9YrbRjjsIfq5K
+2qBtaMHbmtKQOkfIeP9EwbCrhGbdrNlIEhMKY2z6twpJ8ekPLi4ojYeRJYkCQQCk
+SuXVZdiNjoMo99oSM0njJeV1aMQHBUOxdQkeI5AeWMZWbKnDGhhw+uRIObC2lKMo
+Dsru6B/sCgLjYzwUbzFLAkEA2k3qUR7Tz3puN+pOKGBW9M+wn2m+HnOxiZohbyyj
+5T9GeTo0Sb6gK5FBrWA109yhKJwC7LCm0pZbyE1NUCVahQ==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay2/keys/secret_onion_key_ntor b/tests/integration/net/relay2/keys/secret_onion_key_ntor
new file mode 100644
index 0000000..5a6c64d
Binary files /dev/null and b/tests/integration/net/relay2/keys/secret_onion_key_ntor differ
diff --git a/tests/integration/net/relay2/torrc b/tests/integration/net/relay2/torrc
new file mode 100644
index 0000000..9ed9774
--- /dev/null
+++ b/tests/integration/net/relay2/torrc
@@ -0,0 +1,24 @@
+
+ DataDirectory relay2
+ PidFile relay2/tor.pid
+ Log notice file relay2/notice.log
+ ShutdownWaitLength 2
+ ExitRelay 0
+ Address 127.10.0.5
+ SocksPort 127.10.0.5:2000
+ ControlPort 127.10.0.5:2001
+ CookieAuthentication 1
+ ORPort 127.10.0.5:2002
+ DirPort 127.10.0.5:2003
+ Nickname relay2
+ ContactInfo pastly(a)torproject.org
+
+DirAuthority auth1 orport=2002 no-v2 v3ident=D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD 127.10.0.1:2003 AA45C13025C037F056E734169891878ED0880231
+DirAuthority auth2 orport=2002 no-v2 v3ident=4EE103A081F400E6622F5461D51782B876BB5C24 127.10.0.2:2003 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
+DirAuthority auth3 orport=2002 no-v2 v3ident=8B85069C7FC0593801E6491A34100264FCE28980 127.10.0.3:2003 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
+
+ TestingTorNetwork 1
+ NumCPUs 1
+ LogTimeGranularity 1
+ SafeLogging 0
+
diff --git a/tests/integration/net/relay3/fingerprint b/tests/integration/net/relay3/fingerprint
new file mode 100644
index 0000000..5de4060
--- /dev/null
+++ b/tests/integration/net/relay3/fingerprint
@@ -0,0 +1 @@
+relay3 693F73187624BE760AAD2A12C5ED89DB1DE044F5
diff --git a/tests/integration/net/relay3/keys/ed25519_master_id_public_key b/tests/integration/net/relay3/keys/ed25519_master_id_public_key
new file mode 100644
index 0000000..b5323a8
Binary files /dev/null and b/tests/integration/net/relay3/keys/ed25519_master_id_public_key differ
diff --git a/tests/integration/net/relay3/keys/ed25519_master_id_secret_key b/tests/integration/net/relay3/keys/ed25519_master_id_secret_key
new file mode 100644
index 0000000..ee4d449
Binary files /dev/null and b/tests/integration/net/relay3/keys/ed25519_master_id_secret_key differ
diff --git a/tests/integration/net/relay3/keys/ed25519_signing_cert b/tests/integration/net/relay3/keys/ed25519_signing_cert
new file mode 100644
index 0000000..4ad6d28
Binary files /dev/null and b/tests/integration/net/relay3/keys/ed25519_signing_cert differ
diff --git a/tests/integration/net/relay3/keys/ed25519_signing_secret_key b/tests/integration/net/relay3/keys/ed25519_signing_secret_key
new file mode 100644
index 0000000..e48d828
Binary files /dev/null and b/tests/integration/net/relay3/keys/ed25519_signing_secret_key differ
diff --git a/tests/integration/net/relay3/keys/secret_id_key b/tests/integration/net/relay3/keys/secret_id_key
new file mode 100644
index 0000000..0231906
--- /dev/null
+++ b/tests/integration/net/relay3/keys/secret_id_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXgIBAAKBgQDaG0RNhIhKg/eqOrvQvYbpSGTLkEGCJ944su9uFA6Dp+e9gn+l
+KaMmB0AEJg4reTGxogE2Ot0h8Kv33R9yZB4J44Toykpg/DjziSl0FwI47fTzo5aU
+CkwsSMH+qk+hGsbQaYymEmped4jHwNa1iLdhPltnp2pqDcDqolQbEQxecQIDAQAB
+AoGBAJhfPjuNoI22Xlrtx3KQReVKLyjLsghVA/nGgGD94Bn4Pnz142kmipUxsXZ0
+g6e5do8rp/8T5pMkiW+TarnG2fgxo7W3tjaXylLBoKL+/jOfpgOF2vpse9II+Ov2
+rT6X0JO63QJcTD4E6+9LS0gYVCho0/AlE4p0y/FrI3gnBwpVAkEA/WmjQd+mk21l
+BKJ9E/1z4QN8TfeC5kvrEbOk6bYoR6VWCKVhwASkJI0O4EzDMEQSNp3JBaGooApe
+SILbf1EgUwJBANxVWNOGogUVxfNbVQQB142dCSnISOrYR37MhiOD0hzYoBKtHwUu
+265lg9HKjuIV8LFrY0eaYi8A/BUVYgU4PasCQQCOf/nLEC4GlyyIF6tIM20XKjOb
+UESupiBQuvlQZxttdn7Tq9Q0+ycmWp/z55aXLKAlUEL7RLWjEVGFavhtNrx7AkEA
+lkbTxbnO6b72+0twycHj3d+cb1X+fcazxMUEPFbdSPVrADH5tVRHW0Q7yyvnlkY2
+mxvOY/jlPH/kbxDdgQfh7wJAH9Pa+pvJn6NxjscbVR0Y0h17/nYm9uQedRd9ukyV
+8XbjKgmnKnzIlQ6ySpqRMDRIcqE/AgQ1n5nFQKZ1QS9u/Q==
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay3/keys/secret_onion_key b/tests/integration/net/relay3/keys/secret_onion_key
new file mode 100644
index 0000000..b0fcdaa
--- /dev/null
+++ b/tests/integration/net/relay3/keys/secret_onion_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDDnoSWxs6xwfjKvNT2w5COtXqI+t6ZE5s7W5aI/M4dJ8cjWj2l
+3ajC0gXT5OCesoHXs7gdsRtHT9OaYzf+8NDNK7oHpXOJCn3mpOlh0iihCFICwuNX
+/LBr89Hje0NogMIJjb7+52FQzMWsk/PpKidSTNLTAyVEG6u0r1AAiJz7twIDAQAB
+AoGBAJ98Ao9GwMdt5F+t+lbA9H9U9/Try0W0FXAcaKuAqK5eet2YugAbqnZDcprh
+1DuuP2vTyzzx4tKOA2+wirugLCpctNz2SysegQt6NXUWbnZTlBaTBEgrTKV6pTjC
+d8z9S9MdUOQj6LJXRLsL/9z/2uzHAeiaw1ruMlBWg9L3oFVhAkEA6tjZtHmKfW6c
+YwTI2DkUMluzBVY/k2kft93rflzPq2xdfbNAOeJbd8h/26d7AjISZYmMsRfBrmr4
+55OIpfIj8QJBANU9JNKm+Yu2bWKswlqXX6KaXzX3BhAXOUOrFmFQBpccpR1eyL/1
+EggW5bNr6J3LNVgLYPJqUSayM5mbAkSroicCQGkdwuQq+rgGCG2xuIw/kDCyJsEe
+x7oddZsA8+VNeY6LJJWc5ASEstg8oC4bGs3yx5U3KggiUAjXzK0qtiFA7qECQQDS
+N1T11mZstYtgm69+X3yIcGcsbDot4rcxXpjRlnLoxfSA39BIbPE5yFjqaJcJ+Cq+
+gXkxgl4+J6923rl9uTZBAkBZUdXXduTh3emRMr3Q+FUD5z0x85qNJb9wNg75gVo9
+stZN4CYEVN5rHPkJsZC8YL+ydxKI8N1Yx49h/n6UGcwg
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay3/keys/secret_onion_key_ntor b/tests/integration/net/relay3/keys/secret_onion_key_ntor
new file mode 100644
index 0000000..e721c18
Binary files /dev/null and b/tests/integration/net/relay3/keys/secret_onion_key_ntor differ
diff --git a/tests/integration/net/relay3/torrc b/tests/integration/net/relay3/torrc
new file mode 100644
index 0000000..5606b0d
--- /dev/null
+++ b/tests/integration/net/relay3/torrc
@@ -0,0 +1,24 @@
+
+ DataDirectory relay3
+ PidFile relay3/tor.pid
+ Log notice file relay3/notice.log
+ ShutdownWaitLength 2
+ ExitRelay 0
+ Address 127.10.0.6
+ SocksPort 127.10.0.6:2000
+ ControlPort 127.10.0.6:2001
+ CookieAuthentication 1
+ ORPort 127.10.0.6:2002
+ DirPort 127.10.0.6:2003
+ Nickname relay3
+ ContactInfo pastly(a)torproject.org
+
+DirAuthority auth1 orport=2002 no-v2 v3ident=D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD 127.10.0.1:2003 AA45C13025C037F056E734169891878ED0880231
+DirAuthority auth2 orport=2002 no-v2 v3ident=4EE103A081F400E6622F5461D51782B876BB5C24 127.10.0.2:2003 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
+DirAuthority auth3 orport=2002 no-v2 v3ident=8B85069C7FC0593801E6491A34100264FCE28980 127.10.0.3:2003 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
+
+ TestingTorNetwork 1
+ NumCPUs 1
+ LogTimeGranularity 1
+ SafeLogging 0
+
diff --git a/tests/integration/net/relay4/fingerprint b/tests/integration/net/relay4/fingerprint
new file mode 100644
index 0000000..9a077bf
--- /dev/null
+++ b/tests/integration/net/relay4/fingerprint
@@ -0,0 +1 @@
+relay4 4D664E247E530CA5CD5176B8C1A6DABC9531F0B0
diff --git a/tests/integration/net/relay4/keys/ed25519_master_id_public_key b/tests/integration/net/relay4/keys/ed25519_master_id_public_key
new file mode 100644
index 0000000..518a497
Binary files /dev/null and b/tests/integration/net/relay4/keys/ed25519_master_id_public_key differ
diff --git a/tests/integration/net/relay4/keys/ed25519_master_id_secret_key b/tests/integration/net/relay4/keys/ed25519_master_id_secret_key
new file mode 100644
index 0000000..2c15189
Binary files /dev/null and b/tests/integration/net/relay4/keys/ed25519_master_id_secret_key differ
diff --git a/tests/integration/net/relay4/keys/ed25519_signing_cert b/tests/integration/net/relay4/keys/ed25519_signing_cert
new file mode 100644
index 0000000..753bcc5
Binary files /dev/null and b/tests/integration/net/relay4/keys/ed25519_signing_cert differ
diff --git a/tests/integration/net/relay4/keys/ed25519_signing_secret_key b/tests/integration/net/relay4/keys/ed25519_signing_secret_key
new file mode 100644
index 0000000..b05a3e7
Binary files /dev/null and b/tests/integration/net/relay4/keys/ed25519_signing_secret_key differ
diff --git a/tests/integration/net/relay4/keys/secret_id_key b/tests/integration/net/relay4/keys/secret_id_key
new file mode 100644
index 0000000..7d27444
--- /dev/null
+++ b/tests/integration/net/relay4/keys/secret_id_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQDEAaKU5cOPUZf0Vk3XUxQf7JQ29u6I0U4/pHP2sKTl5q2Bkx2o
+pBdEZ0HA6V43oZEAC6gswC+cAkq3YYUkUlt4Es1yWsZzYECYPsXbLEJOL4qRwKC0
+IRjpnPSha+K9VX3DZ9m+V6X5dlNA+u1k9ksBFZzFEfDhqGXcrW/VYddTEwIDAQAB
+AoGAGaelIhwYxq+FViPduGtVXQBYPgGAI0RSG55o10czrivNVgJthV9E9F0XjCp/
+fISXOAxOjNzy3lamdO48wQ5OjmQiaH7kUH2m/v/xn0i4WCVe8OarYDV9f5+Iy4GS
+jADSQu/AWBxVqGYXbVSeBFw++yjx6I5innASZ6liVU4/YxECQQDrFIBXy4DSHVW6
+UlByGmaLoz5dA9YU4/kBrTDDncZvyJke4yk/We5AKTecAnodzhgvc/KlchsKo447
+eNBS6g/dAkEA1XL5BBcUKQrUAfSrTm5Pcgg0mhlovFqCgwiO2SblAodkXFLNxyD8
+twjtYEAP9qZZxT1ej7xKBxUZ3eFVJEY3rwJAX1/Q9k21NQn7xv0wcCqv4gVX/urY
+h186nmiCuUqgwKd1ICfviylUVSmjyyLiIoeEHnR/RIp32CglQ5Gvi4Q07QJANPlQ
+1fQIW9tFHKslbNSxwOJKc8hElyJ7a5vPIBOoGIWTodonGfmU3rRHfXDIxXUpqGr/
+sfqQAMv63HdVEyieHwJBAIk46ICdBT3Sc/sN9JSB/WWczUNa/uaLElFIMjtd9OJz
+QokMFlWLk9gRnm4wx5UaFu3B7TwAfKjBA3DJPIFjbEg=
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay4/keys/secret_onion_key b/tests/integration/net/relay4/keys/secret_onion_key
new file mode 100644
index 0000000..e64cf65
--- /dev/null
+++ b/tests/integration/net/relay4/keys/secret_onion_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDc/Y7E5UsEz+t7YRL9r2OWVuTvZgc33mfLbKsGRo9oqbBD2XZb
+1fwHMI6cTRDzlUiQjpAvdtiZEvIWkK27o0U2tjxMyLgB5zQSggTeoK/A5003xmwS
+jxpgR5k0xAVfxDkuPF74DaTdK4VuHX+pQwxoLPjNmGRZu9gMX7dpYJGaCQIDAQAB
+AoGAFK/ryITKdAXevmsE8xiTEwTJY5vCezlnsARZMjoyvJJ9/KwDx28Nq8Kg5wLT
+3mmQJHAkET1n41SBsxkSGmmbVeowUuTzvak5R/kh2ghLZmpM/hU6A09OLnh8Zcoq
+Ce1i4G80dsvPLoAhhIP+tQ00Upi6rF+NB3RUcSoUZ1GGewECQQD+vfqv5n9GsGJu
+NgyWxdolRwl1xDcr3DjuGpsBwu3jAvO8S4RfW5Q6yCOvnodqbk0g/rYZCrRgNv6B
+T4WW33zpAkEA3hTprrhH9Y7c1YP+49cCxQ2iWdTxPWALyAl1jrDvq9mkXDxts8uW
+f9LA6i1d8BhATrrpYP9OFxMeCZIErB6AIQJASlS++GKmksbXAdetlrUGsUfoH7/w
+ZVDuH7QNtNbfORVcb34NkxGS0BAkMZNtagXjZZRNKENyXHzPiIXesiZmOQJBALj5
+3EZeUfmTfBcP8W9e+HyfRZnjRuhjJo0Aa/1lHMwb5M26u3klWv6u0WZ8USEZYf7x
+qk/Tdvy7PKqmB+RBJ2ECQQCFVN54qO+U2UtNbDUlD2ULX7iBuekAs8HCsUV6KHi3
+99VjxHPqdf2aY9TUAHelBDUzYGkAZYY5omdmdaU21OXn
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay4/keys/secret_onion_key_ntor b/tests/integration/net/relay4/keys/secret_onion_key_ntor
new file mode 100644
index 0000000..9dc7689
Binary files /dev/null and b/tests/integration/net/relay4/keys/secret_onion_key_ntor differ
diff --git a/tests/integration/net/relay4/torrc b/tests/integration/net/relay4/torrc
new file mode 100644
index 0000000..c71bee5
--- /dev/null
+++ b/tests/integration/net/relay4/torrc
@@ -0,0 +1,24 @@
+
+ DataDirectory relay4
+ PidFile relay4/tor.pid
+ Log notice file relay4/notice.log
+ ShutdownWaitLength 2
+ ExitRelay 0
+ Address 127.10.0.7
+ SocksPort 127.10.0.7:2000
+ ControlPort 127.10.0.7:2001
+ CookieAuthentication 1
+ ORPort 127.10.0.7:2002
+ DirPort 127.10.0.7:2003
+ Nickname relay4
+ ContactInfo pastly(a)torproject.org
+
+DirAuthority auth1 orport=2002 no-v2 v3ident=D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD 127.10.0.1:2003 AA45C13025C037F056E734169891878ED0880231
+DirAuthority auth2 orport=2002 no-v2 v3ident=4EE103A081F400E6622F5461D51782B876BB5C24 127.10.0.2:2003 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
+DirAuthority auth3 orport=2002 no-v2 v3ident=8B85069C7FC0593801E6491A34100264FCE28980 127.10.0.3:2003 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
+
+ TestingTorNetwork 1
+ NumCPUs 1
+ LogTimeGranularity 1
+ SafeLogging 0
+
diff --git a/tests/integration/net/relay5/fingerprint b/tests/integration/net/relay5/fingerprint
new file mode 100644
index 0000000..96a995b
--- /dev/null
+++ b/tests/integration/net/relay5/fingerprint
@@ -0,0 +1 @@
+relay5 32B7178F7201F76411A99D3552F340D3597D5629
diff --git a/tests/integration/net/relay5/keys/ed25519_master_id_public_key b/tests/integration/net/relay5/keys/ed25519_master_id_public_key
new file mode 100644
index 0000000..24e888b
Binary files /dev/null and b/tests/integration/net/relay5/keys/ed25519_master_id_public_key differ
diff --git a/tests/integration/net/relay5/keys/ed25519_master_id_secret_key b/tests/integration/net/relay5/keys/ed25519_master_id_secret_key
new file mode 100644
index 0000000..11b9225
Binary files /dev/null and b/tests/integration/net/relay5/keys/ed25519_master_id_secret_key differ
diff --git a/tests/integration/net/relay5/keys/ed25519_signing_cert b/tests/integration/net/relay5/keys/ed25519_signing_cert
new file mode 100644
index 0000000..4a34020
Binary files /dev/null and b/tests/integration/net/relay5/keys/ed25519_signing_cert differ
diff --git a/tests/integration/net/relay5/keys/ed25519_signing_secret_key b/tests/integration/net/relay5/keys/ed25519_signing_secret_key
new file mode 100644
index 0000000..213799f
Binary files /dev/null and b/tests/integration/net/relay5/keys/ed25519_signing_secret_key differ
diff --git a/tests/integration/net/relay5/keys/secret_id_key b/tests/integration/net/relay5/keys/secret_id_key
new file mode 100644
index 0000000..db91965
--- /dev/null
+++ b/tests/integration/net/relay5/keys/secret_id_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQDGsbYyn7+9tDq8dNb77bHzrNZIlVyb9731qDhPg1UyzNOXVQ4k
+fd731TAWExXhjYJaxg2GzCIaOr5Y60pYiuHiBc5b8CFx8p46llVqMSVkLdRVLeDw
+XcEeY7GAUoFZqDCPlG/y8LIzur6fWHSrwgpBd3slf8F5cwmC2Htk0nsdtwIDAQAB
+AoGBALFkkiVKaLamxVXh/tp3kcvbQIkXCNKa8fb0FCoxOAydwD85CeJcmoerxz2+
+FmgEniAK+KKjd8LxNWZP01WP0TAVe2ub0XP1N5NUaV0NPvNwAPR4mRNscEgvprC3
+jHdfN+0EH5j6Wqdgr/VEEIDq6nxX4jtJNSgVrFZOm/G++VkRAkEA8lNdIzOyOK2C
+m6XpsfAuiU/cRK/wjyGLjQQ8qXxArWMYlmy9YLdrdRVIFPK6MWQu/Vzny91hiSIU
+e68djyrgCQJBANHoDEQ3Exx38AfTZPlUZuz06f7WdTOTHVHcxgLJOQIEHW9j1Or2
+5xOkZ+KZ7cUVkv1PzZXJkKUcNbQLK8Tt/78CQHK9BDGhzbZGebwnH/MvzWkY1ivz
+voyXDpOTuQFrIti2PjMjg7vivU+v5vR8RasTS6iNr/d4eDFNYLN7pBxg6bkCQEg7
+Kb1vlkv9mcOXou+Jc8Gmpb7j3YDZ5wT8i8b5p3xiHh7uo54XSH0h3f3EKmXffq1c
+gMpCilvG0VQbY/xoSdECQAlywnXV372n7j4n+rV1WQ0+QZmkxrUu0JnjJX8N4WKa
+KpBB8hMhcu2BczYp3sA4KSz0R241F3VD5rheZqHnTK0=
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay5/keys/secret_onion_key b/tests/integration/net/relay5/keys/secret_onion_key
new file mode 100644
index 0000000..aa7f882
--- /dev/null
+++ b/tests/integration/net/relay5/keys/secret_onion_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQDxY2DbqbMW/2I8GRO4U9Fzt/FO4XoTaV74ZyDfpI/VAJrgl4lr
+h2lDlt9oM/MR9Wp3xtsdx/9OA0lwfO7qugNTB91jUkNmoOhN7sNCM1H/iskw+ka0
+KHI+wLSFJwec9GIiox8K8sOLzwlrpYHxruXR6551bayVW8OsNwKOg9gF/QIDAQAB
+AoGATZVrZC6+6P1cTYSh2fTWtSLB5GCEJAkSBTTgVAFIWWXAYb9S48S6CIdNduh7
+j6IZfjXj50aIwEI+MHF3OOpgdoeaYTm4UlhG/mIw2WiGRTsXnLMOHMKnCWBwKXQ8
+xgXmVMy7o4mzylctIrGlKO32eMY0ONSTEQNXZTBZ124mYOECQQD7Jw0kySDTyHda
+rYWLEBYnEytz/PpJHMOWpqr+l3RHcjjFEBIjM7DLPGVVjNiiiHSdhCM9SHgrDlZa
+6bx2bz9vAkEA9gwUynsyDorOAg78CGtbnYClbm7ehJMTCj308HTlQ68gkbrFBVY/
+ajATpba+ZPI8MN+0YQ3/8bMwn+zHdGZbUwJBAKywD0OJ375/CkIZKceSigjYD3qz
+KUz4MCv38X8YmGU/znUBNddqhVdY8bw/Gf23oadk4e4TVD0WoJ3mNSWiHJUCQGqw
+vms2lHQd2EqoOL1l4Coh2JpUVQTjyYPNbeK+rZN14weOF1TDG2huRHa9ET4wk80V
+k9/p9CvYaaNPRwXARKUCQDUBe+5cxrMzq1ednHAtiQIASKs1h5GZlCJB778hMod3
+OggdXyCTDBGDXLBd+SXBbKrTMivKe0BIlqIpONugTjU=
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay5/keys/secret_onion_key_ntor b/tests/integration/net/relay5/keys/secret_onion_key_ntor
new file mode 100644
index 0000000..4c66dcf
Binary files /dev/null and b/tests/integration/net/relay5/keys/secret_onion_key_ntor differ
diff --git a/tests/integration/net/relay5/torrc b/tests/integration/net/relay5/torrc
new file mode 100644
index 0000000..9c56b02
--- /dev/null
+++ b/tests/integration/net/relay5/torrc
@@ -0,0 +1,24 @@
+
+ DataDirectory relay5
+ PidFile relay5/tor.pid
+ Log notice file relay5/notice.log
+ ShutdownWaitLength 2
+ ExitRelay 0
+ Address 127.10.0.8
+ SocksPort 127.10.0.8:2000
+ ControlPort 127.10.0.8:2001
+ CookieAuthentication 1
+ ORPort 127.10.0.8:2002
+ DirPort 127.10.0.8:2003
+ Nickname relay5
+ ContactInfo pastly(a)torproject.org
+
+DirAuthority auth1 orport=2002 no-v2 v3ident=D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD 127.10.0.1:2003 AA45C13025C037F056E734169891878ED0880231
+DirAuthority auth2 orport=2002 no-v2 v3ident=4EE103A081F400E6622F5461D51782B876BB5C24 127.10.0.2:2003 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
+DirAuthority auth3 orport=2002 no-v2 v3ident=8B85069C7FC0593801E6491A34100264FCE28980 127.10.0.3:2003 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
+
+ TestingTorNetwork 1
+ NumCPUs 1
+ LogTimeGranularity 1
+ SafeLogging 0
+
diff --git a/tests/integration/net/relay6/fingerprint b/tests/integration/net/relay6/fingerprint
new file mode 100644
index 0000000..c016a8b
--- /dev/null
+++ b/tests/integration/net/relay6/fingerprint
@@ -0,0 +1 @@
+relay6 C7C5094677013F5BC124183C71A482D0156CDCFE
diff --git a/tests/integration/net/relay6/keys/ed25519_master_id_public_key b/tests/integration/net/relay6/keys/ed25519_master_id_public_key
new file mode 100644
index 0000000..d7a5607
Binary files /dev/null and b/tests/integration/net/relay6/keys/ed25519_master_id_public_key differ
diff --git a/tests/integration/net/relay6/keys/ed25519_master_id_secret_key b/tests/integration/net/relay6/keys/ed25519_master_id_secret_key
new file mode 100644
index 0000000..49b828b
Binary files /dev/null and b/tests/integration/net/relay6/keys/ed25519_master_id_secret_key differ
diff --git a/tests/integration/net/relay6/keys/ed25519_signing_cert b/tests/integration/net/relay6/keys/ed25519_signing_cert
new file mode 100644
index 0000000..3923225
Binary files /dev/null and b/tests/integration/net/relay6/keys/ed25519_signing_cert differ
diff --git a/tests/integration/net/relay6/keys/ed25519_signing_secret_key b/tests/integration/net/relay6/keys/ed25519_signing_secret_key
new file mode 100644
index 0000000..d713c37
Binary files /dev/null and b/tests/integration/net/relay6/keys/ed25519_signing_secret_key differ
diff --git a/tests/integration/net/relay6/keys/secret_id_key b/tests/integration/net/relay6/keys/secret_id_key
new file mode 100644
index 0000000..2c2493f
--- /dev/null
+++ b/tests/integration/net/relay6/keys/secret_id_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQDM4WCrKcd06PX34O6NScFAoUhvLw36vE4kvDPcbjaCUtg4f/YM
+uxNqRYiRyF6CrnK8QQ0+BILSY3fvleayq+oMIOOp0/6iXZN2DJuyUT5zfwRgaxfn
+REAnn4b3lOV5ROE9OeAj5QSlf786Dz6r1bSr5anDO1lmp7zlrJaRX/uo9QIDAQAB
+AoGBAL8mc8OeKjqYc4x+rvLhYk2DbIpXc4qBD8NUWGqL5Y1378XfFVhRXk7jawTg
+1dTFH8UmSE2ZddkG9spwqBoBLU3R3bc+zORHUKxmzKTSzQxv7IqWjFk8R1wLztPD
+McjRxjtbDlt5reRzAayTNo9Jr/2KXu+uVDAzZGs3WXBfrqYBAkEA7lZrcH8EUyW+
+uNfuo83r2/tgv6a59/Z68VAPrzF2vS4gPYV/a5ICMC/m+xn7V65Fi/sNpkZvTvVy
+19Z9FzzPdQJBANwQOwH+BQ88NXF6XzOYxJNNJhdfgnq4g4HTrmRUZ6rikurfDzQQ
+KQ/NoBpn+iHgkkbBmp5QmO/ZAm8cDAXtw4ECQDN5Qpb3N63ldv1g1U9XR9sovUpm
+7b8Z4o9/ZQPHQQe2kIv46v4GeKaDkfUlNV1IbAjBXb9Ncviwle77ieSc44kCQA3O
+tuUZGxgpnvDPzMlf/HWBkbJFu9oXWaj7ryV8ZkTCkpVKCZoqqWjkbfc6LueRP5xQ
+6XKle/MQmqZ+DAMTOAECQDKLWLO/6vng8CrJsDv5e/3kjFAFSIN5fl25TVZn5Yje
+ImUI3OIWKth4bSogQvVj1M9zU+0D0U4z1/03wMZnEWo=
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay6/keys/secret_onion_key b/tests/integration/net/relay6/keys/secret_onion_key
new file mode 100644
index 0000000..b00908b
--- /dev/null
+++ b/tests/integration/net/relay6/keys/secret_onion_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDWLnWvQkwURtn3LBgL63OPC2ZQ4kTpMqtRxcHgxz37rFPmweUX
+aVipkt2v2YDKlbLYO2gaEYexegta3obDO5g8+w6DTZ2DzZScPyh4LbA3O48VS31T
+/MN/CYYQtBpIJvKZuV61TJZf/Eb34KkIsvngyPWvvIlj/L+2S5veTh45yQIDAQAB
+AoGAT0Y49tqCEEs9J9hhOiA20G42u59UREAl2wloPktgrMNW9qUzpxut3m3mscy+
+d706ygALAwMUB2OVylds59wp91IwntCPtxc7kGe6nBXPipxUOxpnS74PaSjVo3P0
+1Z/tq+5Nx/DQzGyEJdyeGWLZDILjZCdA1CWBYHflC4nqFMUCQQD/jVKHwSq1/Tg2
+GdaI0WpYGeuDDGHOrOaJQnPER45bzeYDzolyCdTVRgnFgnaaAMuEPNmK6gOtXg0E
+RibDUgrbAkEA1o6Sj6bNbPaplLP01YQbvHlhT0KKQSLQhGnw3R55SBMMFfaaPRda
+bvEd4oqRCD2oLQ0bcKuX1wLz+XxUBYplKwJBAL/gJWJmqCIC4YzFc65Axn8l3w4D
+YwCiE2pl6bQrIflOLHEZR1vHg/UqZDXXEiPpiuVcJt7FfENUhaN65Kns1NcCQE+c
+66k+Ha+2/0ncVJb9xET1TTRZ3m84+eKIZQXHjv09hBiKPsU4aygLdClhfVtvdX3y
+BSKTqW3w/JKwnYTIy60CQQCryzKc4d+/OFjBQev5Qy8KkeINTwCEcS9/PqBN546W
+9US8JP4WbYFaJZLnSUHod+CBj7axtEru+mFK3sY8D9Wd
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay6/keys/secret_onion_key_ntor b/tests/integration/net/relay6/keys/secret_onion_key_ntor
new file mode 100644
index 0000000..f3df10d
Binary files /dev/null and b/tests/integration/net/relay6/keys/secret_onion_key_ntor differ
diff --git a/tests/integration/net/relay6/torrc b/tests/integration/net/relay6/torrc
new file mode 100644
index 0000000..d2a3dad
--- /dev/null
+++ b/tests/integration/net/relay6/torrc
@@ -0,0 +1,24 @@
+
+ DataDirectory relay6
+ PidFile relay6/tor.pid
+ Log notice file relay6/notice.log
+ ShutdownWaitLength 2
+ ExitRelay 0
+ Address 127.10.0.9
+ SocksPort 127.10.0.9:2000
+ ControlPort 127.10.0.9:2001
+ CookieAuthentication 1
+ ORPort 127.10.0.9:2002
+ DirPort 127.10.0.9:2003
+ Nickname relay6
+ ContactInfo pastly(a)torproject.org
+
+DirAuthority auth1 orport=2002 no-v2 v3ident=D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD 127.10.0.1:2003 AA45C13025C037F056E734169891878ED0880231
+DirAuthority auth2 orport=2002 no-v2 v3ident=4EE103A081F400E6622F5461D51782B876BB5C24 127.10.0.2:2003 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
+DirAuthority auth3 orport=2002 no-v2 v3ident=8B85069C7FC0593801E6491A34100264FCE28980 127.10.0.3:2003 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
+
+ TestingTorNetwork 1
+ NumCPUs 1
+ LogTimeGranularity 1
+ SafeLogging 0
+
diff --git a/tests/integration/net/relay7/fingerprint b/tests/integration/net/relay7/fingerprint
new file mode 100644
index 0000000..f88bb90
--- /dev/null
+++ b/tests/integration/net/relay7/fingerprint
@@ -0,0 +1 @@
+relay7 E894C65997F8EC96558B554176EEEA39C6A43EF6
diff --git a/tests/integration/net/relay7/keys/ed25519_master_id_public_key b/tests/integration/net/relay7/keys/ed25519_master_id_public_key
new file mode 100644
index 0000000..a3cada5
Binary files /dev/null and b/tests/integration/net/relay7/keys/ed25519_master_id_public_key differ
diff --git a/tests/integration/net/relay7/keys/ed25519_master_id_secret_key b/tests/integration/net/relay7/keys/ed25519_master_id_secret_key
new file mode 100644
index 0000000..caf0bd2
Binary files /dev/null and b/tests/integration/net/relay7/keys/ed25519_master_id_secret_key differ
diff --git a/tests/integration/net/relay7/keys/ed25519_signing_cert b/tests/integration/net/relay7/keys/ed25519_signing_cert
new file mode 100644
index 0000000..ae1edc8
Binary files /dev/null and b/tests/integration/net/relay7/keys/ed25519_signing_cert differ
diff --git a/tests/integration/net/relay7/keys/ed25519_signing_secret_key b/tests/integration/net/relay7/keys/ed25519_signing_secret_key
new file mode 100644
index 0000000..ed0d5e3
Binary files /dev/null and b/tests/integration/net/relay7/keys/ed25519_signing_secret_key differ
diff --git a/tests/integration/net/relay7/keys/secret_id_key b/tests/integration/net/relay7/keys/secret_id_key
new file mode 100644
index 0000000..b8c17dd
--- /dev/null
+++ b/tests/integration/net/relay7/keys/secret_id_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQC8w+hoJy7Y5LTtIKXet4k7iFLAHix9h/0U+QrUJxpLWAJ2quEb
+antK/7yFu+/XUZtK70bSpqCWOzvVvjVjzaCK0hmAbnk8Gt8CinwOJ+KQ1W6tq2D8
+j9HUf6UHRt6lqgTt3aA9LOZk8AFNihpbVy9pI5V6PX0fR1phSVXHrLsXlwIDAQAB
+AoGAMIVzIgKgaiQv1ZxExsEKx4C9NKEM8p+YEGILxIjgm2leCL7X6kIuuxKNlRrA
+Ber2Lgbff5pRQQyszr573tGmaFboyMdEE1NCYz46BLCSN7L1eQQZgkAZLM/j3OP0
+nLfa9XjL/oux/WAuRm5eL/m7/WYj0smioQe0DrET/oz+/+ECQQD2JDHgeCxWR/dq
+agZj1kxH/L4D/KNLDkzL/EnsLdoFAzfMZ+t7ioHeszDAMHvjfbieozUj/cXgXGeF
+bbR2KAh5AkEAxFNognEciwez25Nt/7IOraTQeijF7fCWynlYXHYBV4Jvh2VfGc+6
+jRnbjj4luL9ZYXWNr62RG4pLQw9wiPI8jwJBAOSqc3upqObvLLc7kHwnle46qvxh
+NAKCYm4PD03OuwB1IN1Qnb/DySrvJZcmc7HAFkeqL7AkDjSFI9cdN82dG2ECQBWS
+WJxkk09PdFq/E0oSJXy87E9P5ZekZN0wgh3+tV0JLvoAkHeElKnmWnKBr6FiHQ8R
+XJUeDCCrjGN88c+KVk8CQQCFYcWCA4Pz/g/VfEyQHDdhhizotJHACJZe9Kr+7vNJ
+9Pf/pWbjQnQMpbJl9wTev8lDxYbgKshOh8iqhq2ynCAY
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay7/keys/secret_onion_key b/tests/integration/net/relay7/keys/secret_onion_key
new file mode 100644
index 0000000..9c542d7
--- /dev/null
+++ b/tests/integration/net/relay7/keys/secret_onion_key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDet1J5F17VC0u9mV5X8xkTdQeTdykQ/v3Zxt+gcQOgF9GFwgpS
+7HUnp6BSGEjZZzt9tYZR0it2WvdO4gxLXLWb2jqo6zK0RX9bpH9UF6AmwHfQz8CB
+JFRuWw6Ao27uZWpZZmx/075FqAXtEboXwpgASJFW43HVQgHuggHGFR1gxQIDAQAB
+AoGBAMduRwaxu7RwKgF8XXPJ9pFqwT72fCqA+1VQdR1ZNdLcoTzyNYZtwLairrf0
+kP9EJox5yO5pkYupBz12w2WUffWGuushqrDn+3CcRuQw+gGkZRE8lpUnQwPPynWP
+428854TfojqgEelzUa128HDJkear7Dtfsz31D+Yt4cOcGQfBAkEA8WccQMfhiSRO
+DKLazpXMq0Dufrh6cov+turi04vvoC/6lgc+Hreh62CJVVhp+UDzP0QWRU/5LrKu
+AlLMc2BFFQJBAOwu8a4oEbYBzqAB/L40s9bZJi10FK47OGOz6z2q7SU2UH32EeZR
+OTWM3aeDSpad7HkFHvVtaU+5K9cJy6ZQ+PECQGQnOUuPIf05+L+5WTpYX/+1Ar3E
+X9jiSB0vuke2SQaWoUpZWuZ3nVAATzn/Yogs8D6RSwQat/Et5I/GNliv2jkCQFXb
+et/kkQuo/IQONOKwJfAkYEyFtj7gKE+WSB3S1QKCDCC+IyOmwzVEUA9lGuhF4IDd
+67MsYuwoVFeHqBB9vwECQQCALP4WoHri8nbRVwjlHBSDjrBB5Cn5KF3CQ9Yfcr+u
+Xt0zOoEE+1CuT6HWSn4zXvjsAdj0SNWiZaNP/dvfdWB0
+-----END RSA PRIVATE KEY-----
diff --git a/tests/integration/net/relay7/keys/secret_onion_key_ntor b/tests/integration/net/relay7/keys/secret_onion_key_ntor
new file mode 100644
index 0000000..8dcca5d
Binary files /dev/null and b/tests/integration/net/relay7/keys/secret_onion_key_ntor differ
diff --git a/tests/integration/net/relay7/torrc b/tests/integration/net/relay7/torrc
new file mode 100644
index 0000000..b299d7e
--- /dev/null
+++ b/tests/integration/net/relay7/torrc
@@ -0,0 +1,24 @@
+
+ DataDirectory relay7
+ PidFile relay7/tor.pid
+ Log notice file relay7/notice.log
+ ShutdownWaitLength 2
+ ExitRelay 0
+ Address 127.10.0.10
+ SocksPort 127.10.0.10:2000
+ ControlPort 127.10.0.10:2001
+ CookieAuthentication 1
+ ORPort 127.10.0.10:2002
+ DirPort 127.10.0.10:2003
+ Nickname relay7
+ ContactInfo pastly(a)torproject.org
+
+DirAuthority auth1 orport=2002 no-v2 v3ident=D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD 127.10.0.1:2003 AA45C13025C037F056E734169891878ED0880231
+DirAuthority auth2 orport=2002 no-v2 v3ident=4EE103A081F400E6622F5461D51782B876BB5C24 127.10.0.2:2003 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
+DirAuthority auth3 orport=2002 no-v2 v3ident=8B85069C7FC0593801E6491A34100264FCE28980 127.10.0.3:2003 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
+
+ TestingTorNetwork 1
+ NumCPUs 1
+ LogTimeGranularity 1
+ SafeLogging 0
+
diff --git a/tests/integration/net/start.sh b/tests/integration/net/start.sh
new file mode 100755
index 0000000..f96cf9d
--- /dev/null
+++ b/tests/integration/net/start.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+set -e
+function cleanup {
+ #kill -INT $(cat {auth,relay,exit}*/tor.pid)
+ #kill -INT $(jobs -p)
+ echo -n ''
+}
+trap cleanup EXIT
+
+
+cd $(dirname $0)
+for A in {auth,relay,exit}*
+do
+ tor -f $A/torrc --quiet &
+done
diff --git a/tests/integration/net/stop.sh b/tests/integration/net/stop.sh
new file mode 100755
index 0000000..026c8c9
--- /dev/null
+++ b/tests/integration/net/stop.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+cd $(dirname $0)
+kill -INT $(cat {auth,relay,exit}*/tor.pid)
diff --git a/tests/integration/net/wait.py b/tests/integration/net/wait.py
new file mode 100755
index 0000000..8c8512a
--- /dev/null
+++ b/tests/integration/net/wait.py
@@ -0,0 +1,136 @@
+#!/usr/bin/env python3
+from argparse import RawTextHelpFormatter, ArgumentParser
+from stem.control import Controller
+import time
+import os
+import logging
+
+logger = logging.getLogger(__name__)
+
+
+def get_controller(addr, port):
+ cont = Controller.from_port(addr, port)
+ cont.authenticate()
+ return cont
+
+
+def get_is_bootstrapped(cont, timeout=60):
+ start_time = time.time()
+ while start_time + timeout > time.time():
+ line = cont.get_info('status/bootstrap-phase')
+ state, _, progress, *_ = line.split()
+ progress = int(progress.split('=')[1])
+ if state == 'NOTICE' and progress == 100:
+ logger.debug('Tor is bootstrapped')
+ return True
+ time.sleep(1)
+ logger.debug("Tor didn't bootstrap before timeout. Last line: %s", line)
+ return False
+
+
+def get_has_full_consensus(cont, network_size, timeout=60):
+ start_time = time.time()
+ while start_time + timeout > time.time():
+ relays = [r for r in cont.get_network_statuses()]
+ if len(relays) == network_size:
+ logger.debug('Tor has correct network size %d',
+ network_size)
+ return True
+ elif len(relays) > network_size:
+ logger.warning('Tor has more relays than expected. %d vs %d',
+ len(relays), network_size)
+ return True
+ time.sleep(1)
+ logger.debug('Tor didn\'t reach expected network size %d before '
+ 'timeout', network_size)
+ return False
+
+
+def is_tor_ready(addr, port, network_size):
+ name = '{}:{}'.format(addr, port)
+ with get_controller(addr, port) as cont:
+ if not get_is_bootstrapped(cont):
+ logger.warning('%s not bootstrapped, Tor not ready', name)
+ return False
+ if not get_has_full_consensus(cont, network_size):
+ logger.warning('%s doesn\'t have full consensus, Tor not ready',
+ name)
+ return False
+ logger.info('%s is ready', name)
+ return True
+
+
+def extract_control_port_info(torrc_fname):
+ with open(torrc_fname, 'rt') as fd:
+ for line in fd:
+ if 'ControlPort' not in line:
+ continue
+ line = line.strip()
+ info = line.split()[1]
+ addr, port = info.split(':')
+ return addr, int(port)
+
+
+def main(args):
+ for datadir in args.datadir:
+ logger.info('Checking if %s is ready', datadir)
+ addr, port = extract_control_port_info(os.path.join(datadir, 'torrc'))
+ if not is_tor_ready(addr, port, network_size=args.size):
+ return 1
+ # If we got to this point, it seems like every relay is completely ready.
+ # Do one more check to make sure that's still the case.
+ for datadir in args.datadir:
+ logger.info('Verifying %s is still ready', datadir)
+ addr, port = extract_control_port_info(os.path.join(datadir, 'torrc'))
+ if not is_tor_ready(addr, port, network_size=args.size):
+ return 1
+ return 0
+
+
+if __name__ == '__main__':
+ desc = '''
+Given the data directories for a local tor network, connect to the control
+socket in each directory and verify that the tor on the other end of the socket
+is fully bootstrapped and has the right size of consensus.
+
+The "right size of consensus" is determined based on the number of data
+directories given to check. If that is not okay to assume (for example, there
+are some Tor client [non-relay] data directories given to check), then specify
+the size manually with --size.
+
+Waits up to 60 seconds for each check for each tor.
+
+- In the worst case, this script will take a long time to run (if every tor
+ suddenly passes each check after 59 seconds).
+- In the normal failure case, this script will take about 60 seconds to run
+ (the first tor is not ready and fails its checks).
+- In the normal case, it will run very quickly (every tor is bootstrapped and
+ ready).
+
+Exits with 0 if everything is good. Otherwise exits with a postive integer.
+'''
+ parser = ArgumentParser(
+ formatter_class=RawTextHelpFormatter, description=desc)
+ parser.add_argument('-s', '--size', type=int, help='If given, don\'t '
+ 'assume the network size based on the number of '
+ 'datadirs, but use this size instead.')
+ parser.add_argument('-d', '--debug', action='store_true')
+ parser.add_argument('datadir', nargs='+', type=str)
+ args = parser.parse_args()
+
+ if args.debug:
+ logger.setLevel(logging.DEBUG)
+ else:
+ logger.setLevel(logging.WARNING)
+ ch = logging.StreamHandler()
+ formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
+ ch.setFormatter(formatter)
+ logger.addHandler(ch)
+
+ if not args.size:
+ args.size = len(args.datadir)
+
+ try:
+ exit(main(args))
+ except KeyboardInterrupt:
+ pass
diff --git a/tox.ini b/tox.ini
index eb6a958..4aca0ca 100644
--- a/tox.ini
+++ b/tox.ini
@@ -39,12 +39,12 @@ commands =
ignore_errors = True
deps = .[test]
whitelist_externals =
- tar
+ cp
bash
sleep
wget
commands =
- tar -C {envtmpdir} -vxf {toxinidir}/tests/integration/net.tar
+ cp -af {toxinidir}/tests/integration/net {envtmpdir}
bash {envtmpdir}/net/start.sh
bash -c "time python3 {envtmpdir}/net/wait.py {envtmpdir}/net/{auth,relay,exit}*"
bash -c "python3 {toxinidir}/scripts/tools/sbws-http-server.py --port 28888 &>/dev/null &"
@@ -52,6 +52,7 @@ commands =
wget -O/dev/null http://127.0.0.1:28888/sbws.bin
coverage run -a --rcfile={toxinidir}/.coveragerc --source=sbws -m pytest -s {toxinidir}/tests/integration -vv
bash {envtmpdir}/net/stop.sh
+ # no need to remove .tox/net directory.
[testenv:lint]
skip_install = True
1
0
commit c523619e20a91a1c6ec95b2230eec7060323cf15
Merge: 19fa738 df0a34f
Author: juga0 <juga(a)riseup.net>
Date: Wed Jan 23 15:23:27 2019 +0000
Merge branch 'bug28590_rebased_master'
tests/integration/net.tar | Bin 215040 -> 0 bytes
tests/integration/net/auth1/fingerprint | 1 +
.../net/auth1/keys/authority_certificate | 46 +++++++
.../net/auth1/keys/authority_identity_key | 41 +++++++
.../net/auth1/keys/authority_signing_key | 27 ++++
.../net/auth1/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/auth1/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/auth1/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/auth1/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/auth1/keys/secret_id_key | 15 +++
tests/integration/net/auth1/keys/secret_onion_key | 15 +++
.../net/auth1/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/auth1/torrc | 34 ++++++
tests/integration/net/auth2/fingerprint | 1 +
.../net/auth2/keys/authority_certificate | 46 +++++++
.../net/auth2/keys/authority_identity_key | 41 +++++++
.../net/auth2/keys/authority_signing_key | 27 ++++
.../net/auth2/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/auth2/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/auth2/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/auth2/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/auth2/keys/secret_id_key | 15 +++
tests/integration/net/auth2/keys/secret_onion_key | 15 +++
.../net/auth2/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/auth2/torrc | 34 ++++++
tests/integration/net/auth3/fingerprint | 1 +
.../net/auth3/keys/authority_certificate | 46 +++++++
.../net/auth3/keys/authority_identity_key | 41 +++++++
.../net/auth3/keys/authority_signing_key | 27 ++++
.../net/auth3/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/auth3/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/auth3/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/auth3/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/auth3/keys/secret_id_key | 15 +++
tests/integration/net/auth3/keys/secret_onion_key | 15 +++
.../net/auth3/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/auth3/torrc | 34 ++++++
tests/integration/net/exit1/fingerprint | 1 +
.../net/exit1/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/exit1/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/exit1/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/exit1/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/exit1/keys/secret_id_key | 15 +++
tests/integration/net/exit1/keys/secret_onion_key | 15 +++
.../net/exit1/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/exit1/torrc | 27 ++++
tests/integration/net/exit2/fingerprint | 1 +
.../net/exit2/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/exit2/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/exit2/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/exit2/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/exit2/keys/secret_id_key | 15 +++
tests/integration/net/exit2/keys/secret_onion_key | 15 +++
.../net/exit2/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/exit2/torrc | 27 ++++
tests/integration/net/exit3/fingerprint | 1 +
.../net/exit3/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/exit3/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/exit3/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/exit3/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/exit3/keys/secret_id_key | 15 +++
tests/integration/net/exit3/keys/secret_onion_key | 15 +++
.../net/exit3/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/exit3/torrc | 27 ++++
tests/integration/net/relay1/fingerprint | 1 +
.../net/relay1/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/relay1/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay1/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/relay1/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/relay1/keys/secret_id_key | 15 +++
tests/integration/net/relay1/keys/secret_onion_key | 15 +++
.../net/relay1/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay1/torrc | 24 ++++
tests/integration/net/relay1mbyteMAB/fingerprint | 1 +
.../keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay1mbyteMAB/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../relay1mbyteMAB/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
.../net/relay1mbyteMAB/keys/secret_id_key | 15 +++
.../net/relay1mbyteMAB/keys/secret_onion_key | 15 +++
.../net/relay1mbyteMAB/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay1mbyteMAB/torrc | 25 ++++
tests/integration/net/relay1mbyteRBR/fingerprint | 1 +
.../keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay1mbyteRBR/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../relay1mbyteRBR/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
.../net/relay1mbyteRBR/keys/secret_id_key | 15 +++
.../net/relay1mbyteRBR/keys/secret_onion_key | 15 +++
.../net/relay1mbyteRBR/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay1mbyteRBR/torrc | 25 ++++
tests/integration/net/relay2/fingerprint | 1 +
.../net/relay2/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/relay2/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay2/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/relay2/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/relay2/keys/secret_id_key | 15 +++
tests/integration/net/relay2/keys/secret_onion_key | 15 +++
.../net/relay2/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay2/torrc | 24 ++++
tests/integration/net/relay3/fingerprint | 1 +
.../net/relay3/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/relay3/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay3/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/relay3/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/relay3/keys/secret_id_key | 15 +++
tests/integration/net/relay3/keys/secret_onion_key | 15 +++
.../net/relay3/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay3/torrc | 24 ++++
tests/integration/net/relay4/fingerprint | 1 +
.../net/relay4/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/relay4/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay4/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/relay4/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/relay4/keys/secret_id_key | 15 +++
tests/integration/net/relay4/keys/secret_onion_key | 15 +++
.../net/relay4/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay4/torrc | 24 ++++
tests/integration/net/relay5/fingerprint | 1 +
.../net/relay5/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/relay5/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay5/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/relay5/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/relay5/keys/secret_id_key | 15 +++
tests/integration/net/relay5/keys/secret_onion_key | 15 +++
.../net/relay5/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay5/torrc | 24 ++++
tests/integration/net/relay6/fingerprint | 1 +
.../net/relay6/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/relay6/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay6/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/relay6/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/relay6/keys/secret_id_key | 15 +++
tests/integration/net/relay6/keys/secret_onion_key | 15 +++
.../net/relay6/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay6/torrc | 24 ++++
tests/integration/net/relay7/fingerprint | 1 +
.../net/relay7/keys/ed25519_master_id_public_key | Bin 0 -> 64 bytes
.../net/relay7/keys/ed25519_master_id_secret_key | Bin 0 -> 96 bytes
.../net/relay7/keys/ed25519_signing_cert | Bin 0 -> 172 bytes
.../net/relay7/keys/ed25519_signing_secret_key | Bin 0 -> 96 bytes
tests/integration/net/relay7/keys/secret_id_key | 15 +++
tests/integration/net/relay7/keys/secret_onion_key | 15 +++
.../net/relay7/keys/secret_onion_key_ntor | Bin 0 -> 96 bytes
tests/integration/net/relay7/torrc | 24 ++++
tests/integration/net/start.sh | 15 +++
tests/integration/net/stop.sh | 4 +
tests/integration/net/wait.py | 136 +++++++++++++++++++++
tox.ini | 5 +-
149 files changed, 1366 insertions(+), 2 deletions(-)
1
0