Merge branch '574-upgrade-tor' into 'master'

Upgrade Tor to 0.2.9

Closes #574

See merge request !542
This commit is contained in:
Torsten Grote
2017-06-30 20:36:22 +00:00
2 changed files with 31 additions and 28 deletions

View File

@@ -32,31 +32,31 @@ dependencies {
def torBinaryDir = 'src/main/res/raw' def torBinaryDir = 'src/main/res/raw'
task downloadTorGeoIp(type: Download) { task downloadTorGeoIp(type: Download) {
src 'https://briarproject.org/build/geoip-2015-12-01.zip' src 'https://briarproject.org/build/geoip-2017-05-02.zip'
dest "$torBinaryDir/geoip.zip" dest "$torBinaryDir/geoip.zip"
onlyIfNewer true onlyIfNewer true
} }
task downloadTorBinaryArm(type: Download) { task downloadTorBinaryArm(type: Download) {
src 'https://briarproject.org/build/tor-0.2.7.6-arm.zip' src 'https://briarproject.org/build/tor-0.2.9.11-arm.zip'
dest "$torBinaryDir/tor_arm.zip" dest "$torBinaryDir/tor_arm.zip"
onlyIfNewer true onlyIfNewer true
} }
task downloadTorBinaryArmPie(type: Download) { task downloadTorBinaryArmPie(type: Download) {
src 'https://briarproject.org/build/tor-0.2.7.6-arm-pie.zip' src 'https://briarproject.org/build/tor-0.2.9.11-arm-pie.zip'
dest "$torBinaryDir/tor_arm_pie.zip" dest "$torBinaryDir/tor_arm_pie.zip"
onlyIfNewer true onlyIfNewer true
} }
task downloadTorBinaryX86(type: Download) { task downloadTorBinaryX86(type: Download) {
src 'https://briarproject.org/build/tor-0.2.7.6-x86.zip' src 'https://briarproject.org/build/tor-0.2.9.11-x86.zip'
dest "$torBinaryDir/tor_x86.zip" dest "$torBinaryDir/tor_x86.zip"
onlyIfNewer true onlyIfNewer true
} }
task downloadTorBinaryX86Pie(type: Download) { task downloadTorBinaryX86Pie(type: Download) {
src 'https://briarproject.org/build/tor-0.2.7.6-x86-pie.zip' src 'https://briarproject.org/build/tor-0.2.9.11-x86-pie.zip'
dest "$torBinaryDir/tor_x86_pie.zip" dest "$torBinaryDir/tor_x86_pie.zip"
onlyIfNewer true onlyIfNewer true
} }
@@ -64,31 +64,31 @@ task downloadTorBinaryX86Pie(type: Download) {
task verifyTorGeoIp(type: Verify, dependsOn: 'downloadTorGeoIp') { task verifyTorGeoIp(type: Verify, dependsOn: 'downloadTorGeoIp') {
src "$torBinaryDir/geoip.zip" src "$torBinaryDir/geoip.zip"
algorithm 'SHA-256' algorithm 'SHA-256'
checksum '9bcdaf0a7ba0933735328d8ec466c25c25dbb459efc2bce9e55c774eabea5162' checksum '51f4d1272fb867e1f3b36b67a584e2a33c40b40f62305457d799fd399cd77c9b'
} }
task verifyTorBinaryArm(type: Verify, dependsOn: 'downloadTorBinaryArm') { task verifyTorBinaryArm(type: Verify, dependsOn: 'downloadTorBinaryArm') {
src "$torBinaryDir/tor_arm.zip" src "$torBinaryDir/tor_arm.zip"
algorithm 'SHA-256' algorithm 'SHA-256'
checksum '83272962eda701cd5d74d2418651c4ff0f0b1dff51f558a292d1a1c42bf12146' checksum '1da6008663a8ad98b349e62acbbf42c379f65ec504fa467cb119c187cd5a4c6b'
} }
task verifyTorBinaryArmPie(type: Verify, dependsOn: 'downloadTorBinaryArmPie') { task verifyTorBinaryArmPie(type: Verify, dependsOn: 'downloadTorBinaryArmPie') {
src "$torBinaryDir/tor_arm_pie.zip" src "$torBinaryDir/tor_arm_pie.zip"
algorithm 'SHA-256' algorithm 'SHA-256'
checksum 'd0300d1e45de11ebb24ed62b9c492be9c2e88590b7822195ab38c7a76ffcf646' checksum 'eb061f880829e05f104690ac744848133f2dacef04759d425a2cff0df32c271e'
} }
task verifyTorBinaryX86(type: Verify, dependsOn: 'downloadTorBinaryX86') { task verifyTorBinaryX86(type: Verify, dependsOn: 'downloadTorBinaryX86') {
src "$torBinaryDir/tor_x86.zip" src "$torBinaryDir/tor_x86.zip"
algorithm 'SHA-256' algorithm 'SHA-256'
checksum 'b8813d97b01ee1b9c9a4233c1b9bbe9f9f6b494ae6f9cbd84de8a3911911615e' checksum 'f5308aff8303daca082f82227d02b51ddedba4ab1d1420739ada0427ae5dbb41'
} }
task verifyTorBinaryX86Pie(type: Verify, dependsOn: 'downloadTorBinaryX86Pie') { task verifyTorBinaryX86Pie(type: Verify, dependsOn: 'downloadTorBinaryX86Pie') {
src "$torBinaryDir/tor_x86_pie.zip" src "$torBinaryDir/tor_x86_pie.zip"
algorithm 'SHA-256' algorithm 'SHA-256'
checksum '9c66e765aa196dc089951a1b2140cc8290305c2fcbf365121f99e01a233baf4e' checksum '889a6c81ac73d05d35ed610ca5a913cee44d333e4ae1749c2a107f2f7dd8197b'
} }
project.afterEvaluate { project.afterEvaluate {

View File

@@ -1,8 +1,8 @@
diff --git a/src/or/control.c b/src/or/control.c diff --git a/src/or/control.c b/src/or/control.c
index 220e7e5..a54c8a2 100644 index c8c5062..f38ba23 100644
--- a/src/or/control.c --- a/src/or/control.c
+++ b/src/or/control.c +++ b/src/or/control.c
@@ -176,6 +176,8 @@ static int handle_control_hsfetch(control_connection_t *conn, uint32_t len, @@ -196,6 +196,8 @@ static int handle_control_hsfetch(control_connection_t *conn, uint32_t len,
const char *body); const char *body);
static int handle_control_hspost(control_connection_t *conn, uint32_t len, static int handle_control_hspost(control_connection_t *conn, uint32_t len,
const char *body); const char *body);
@@ -11,7 +11,7 @@ index 220e7e5..a54c8a2 100644
static int handle_control_add_onion(control_connection_t *conn, uint32_t len, static int handle_control_add_onion(control_connection_t *conn, uint32_t len,
const char *body); const char *body);
static int handle_control_del_onion(control_connection_t *conn, uint32_t len, static int handle_control_del_onion(control_connection_t *conn, uint32_t len,
@@ -3725,6 +3727,33 @@ handle_control_hspost(control_connection_t *conn, @@ -4246,6 +4248,33 @@ handle_control_hspost(control_connection_t *conn,
return 0; return 0;
} }
@@ -45,7 +45,7 @@ index 220e7e5..a54c8a2 100644
/** Called when we get a ADD_ONION command; parse the body, and set up /** Called when we get a ADD_ONION command; parse the body, and set up
* the new ephemeral Onion Service. */ * the new ephemeral Onion Service. */
static int static int
@@ -4396,6 +4425,9 @@ connection_control_process_inbuf(control_connection_t *conn) @@ -5065,6 +5094,9 @@ connection_control_process_inbuf(control_connection_t *conn)
} else if (!strcasecmp(conn->incoming_cmd, "+HSPOST")) { } else if (!strcasecmp(conn->incoming_cmd, "+HSPOST")) {
if (handle_control_hspost(conn, cmd_data_len, args)) if (handle_control_hspost(conn, cmd_data_len, args))
return -1; return -1;
@@ -56,10 +56,10 @@ index 220e7e5..a54c8a2 100644
int ret = handle_control_add_onion(conn, cmd_data_len, args); int ret = handle_control_add_onion(conn, cmd_data_len, args);
memwipe(args, 0, cmd_data_len); /* Scrub the private key. */ memwipe(args, 0, cmd_data_len); /* Scrub the private key. */
diff --git a/src/or/rendcache.c b/src/or/rendcache.c diff --git a/src/or/rendcache.c b/src/or/rendcache.c
index d4bdd68..b9d79b8 100644 index aa69d73..473a6a4 100644
--- a/src/or/rendcache.c --- a/src/or/rendcache.c
+++ b/src/or/rendcache.c +++ b/src/or/rendcache.c
@@ -535,6 +535,34 @@ rend_cache_lookup_entry(const char *query, int version, rend_cache_entry_t **e) @@ -587,6 +587,34 @@ rend_cache_lookup_v2_desc_as_service(const char *query, rend_cache_entry_t **e)
return ret; return ret;
} }
@@ -95,19 +95,19 @@ index d4bdd68..b9d79b8 100644
* copy the pointer to it to *<b>desc</b>. Return 1 on success, 0 on * copy the pointer to it to *<b>desc</b>. Return 1 on success, 0 on
* well-formed-but-not-found, and -1 on failure. * well-formed-but-not-found, and -1 on failure.
diff --git a/src/or/rendcache.h b/src/or/rendcache.h diff --git a/src/or/rendcache.h b/src/or/rendcache.h
index 0512058..2c8ebfd 100644 index 270b614..69d1b1b 100644
--- a/src/or/rendcache.h --- a/src/or/rendcache.h
+++ b/src/or/rendcache.h +++ b/src/or/rendcache.h
@@ -56,6 +56,7 @@ void rend_cache_purge(void); @@ -61,6 +61,7 @@ void rend_cache_purge(void);
void rend_cache_free_all(void); void rend_cache_free_all(void);
int rend_cache_lookup_entry(const char *query, int version, int rend_cache_lookup_entry(const char *query, int version,
rend_cache_entry_t **entry_out); rend_cache_entry_t **entry_out);
+void rend_cache_remove_entry(const char *service_id); +void rend_cache_remove_entry(const char *service_id);
int rend_cache_lookup_v2_desc_as_service(const char *query,
rend_cache_entry_t **entry_out);
int rend_cache_lookup_v2_desc_as_dir(const char *query, const char **desc); int rend_cache_lookup_v2_desc_as_dir(const char *query, const char **desc);
/** Return value from rend_cache_store_v2_desc_as_{dir,client}. */
typedef enum {
diff --git a/src/or/rendclient.c b/src/or/rendclient.c diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index a39e518..909e47f 100644 index a93bc94..f311e1f 100644
--- a/src/or/rendclient.c --- a/src/or/rendclient.c
+++ b/src/or/rendclient.c +++ b/src/or/rendclient.c
@@ -32,6 +32,9 @@ static extend_info_t *rend_client_get_random_intro_impl( @@ -32,6 +32,9 @@ static extend_info_t *rend_client_get_random_intro_impl(
@@ -137,7 +137,7 @@ index a39e518..909e47f 100644
* send the introduction request. */ * send the introduction request. */
void void
diff --git a/src/or/rendclient.h b/src/or/rendclient.h diff --git a/src/or/rendclient.h b/src/or/rendclient.h
index 124433e..b27d2db 100644 index b8f8c2f..b1da48c 100644
--- a/src/or/rendclient.h --- a/src/or/rendclient.h
+++ b/src/or/rendclient.h +++ b/src/or/rendclient.h
@@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
@@ -148,3 +148,6 @@ index 124433e..b27d2db 100644
void rend_client_introcirc_has_opened(origin_circuit_t *circ); void rend_client_introcirc_has_opened(origin_circuit_t *circ);
void rend_client_rendcirc_has_opened(origin_circuit_t *circ); void rend_client_rendcirc_has_opened(origin_circuit_t *circ);
--
2.9.3