[tor-commits] [translation/tor-browser-manual] Update translations for tor-browser-manual

2017-05-02 Thread translation
commit 53254645d3b4bf62fffa72f70a75708ab3b43fa0
Author: Translation commit bot 
Date:   Wed May 3 01:48:47 2017 +

Update translations for tor-browser-manual
---
 es_AR/es_AR.po | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/es_AR/es_AR.po b/es_AR/es_AR.po
index 839f546..3bd5a81 100644
--- a/es_AR/es_AR.po
+++ b/es_AR/es_AR.po
@@ -2,12 +2,13 @@
 # Nico Edu , 2016
 # psss , 2016
 # ezemelano , 2016
+# Joaquín Serna , 2017
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "POT-Creation-Date: 2016-12-06 16:36-0600\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: ezemelano , 2016\n"
+"Last-Translator: Joaquín Serna , 2017\n"
 "Language-Team: Spanish (Argentina) 
(https://www.transifex.com/otf/teams/1519/es_AR/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -23,16 +24,20 @@ msgstr ""
 #: about-tor-browser.page:7
 msgid "Learn what Tor Browser can do to protect your privacy and anonymity"
 msgstr ""
+"Aprende que puede hacer el navegador Tor para proreger tu privacidad y "
+"anonimato"
 
 #: about-tor-browser.page:10
 msgid "About Tor Browser"
-msgstr ""
+msgstr "Acerca del navegador Tor"
 
 #: about-tor-browser.page:12
 msgid ""
 "Tor Browser uses the Tor network to protect your privacy and anonymity. "
 "Using the Tor network has two main properties:"
 msgstr ""
+"El navegador Tor usa la red Tor para proteger tu privacidad y anonimato. "
+"Usar la red Tor tiene dos propiedades principales:"
 
 #: about-tor-browser.page:18
 msgid ""

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


[tor-commits] [translation/torbutton-aboutdialogdtd] Update translations for torbutton-aboutdialogdtd

2017-05-02 Thread translation
commit 569bb1c7c23ba5ef51955b90508a0bdd66fa8fe3
Author: Translation commit bot 
Date:   Wed May 3 01:47:18 2017 +

Update translations for torbutton-aboutdialogdtd
---
 es_AR/aboutdialog.dtd | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/es_AR/aboutdialog.dtd b/es_AR/aboutdialog.dtd
index 8d4e529..321b361 100644
--- a/es_AR/aboutdialog.dtd
+++ b/es_AR/aboutdialog.dtd
@@ -1,6 +1,6 @@
-
+
 
-
+
 
 
 

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


[tor-commits] [translation/torbutton-torbuttondtd] Update translations for torbutton-torbuttondtd

2017-05-02 Thread translation
commit 0c72f025cfd629dcfd7a3cf60160018908dc34c8
Author: Translation commit bot 
Date:   Wed May 3 01:46:52 2017 +

Update translations for torbutton-torbuttondtd
---
 es_AR/torbutton.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/es_AR/torbutton.dtd b/es_AR/torbutton.dtd
index eeb22a1..8ae3f56 100644
--- a/es_AR/torbutton.dtd
+++ b/es_AR/torbutton.dtd
@@ -2,7 +2,7 @@
 
 
 
-
+
 
 
 

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


[tor-commits] [translation/tails-persistence-setup] Update translations for tails-persistence-setup

2017-05-02 Thread translation
commit 6858f10efa3dc0c39e40c4f5585861e5c0bb090c
Author: Translation commit bot 
Date:   Wed May 3 01:45:39 2017 +

Update translations for tails-persistence-setup
---
 es_AR/es_AR.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/es_AR/es_AR.po b/es_AR/es_AR.po
index 2548530..314e170 100644
--- a/es_AR/es_AR.po
+++ b/es_AR/es_AR.po
@@ -12,7 +12,7 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: Tails developers \n"
 "POT-Creation-Date: 2016-05-25 02:27+0200\n"
-"PO-Revision-Date: 2017-05-02 03:53+\n"
+"PO-Revision-Date: 2017-05-03 01:23+\n"
 "Last-Translator: Joaquín Serna\n"
 "Language-Team: Spanish (Argentina) 
(http://www.transifex.com/otf/torproject/language/es_AR/)\n"
 "MIME-Version: 1.0\n"
@@ -27,7 +27,7 @@ msgstr "Datos personales"
 
 #: ../lib/Tails/Persistence/Configuration/Presets.pm:50
 msgid "Keep files stored in the `Persistent' directory"
-msgstr ""
+msgstr "Mantener los archivos almacenados en el directorio `Persistente'"
 
 #: ../lib/Tails/Persistence/Configuration/Presets.pm:58
 msgid "GnuPG"

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


[tor-commits] [translation/tails-greeter-2] Update translations for tails-greeter-2

2017-05-02 Thread translation
commit 265bbf1a024bee824a8dad027a6262dc1ca99f81
Author: Translation commit bot 
Date:   Wed May 3 01:18:40 2017 +

Update translations for tails-greeter-2
---
 es_AR/es_AR.po | 42 --
 1 file changed, 24 insertions(+), 18 deletions(-)

diff --git a/es_AR/es_AR.po b/es_AR/es_AR.po
index 6a01bc3..4c1492c 100644
--- a/es_AR/es_AR.po
+++ b/es_AR/es_AR.po
@@ -10,7 +10,7 @@ msgstr ""
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-03-20 09:46+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: Pablo Di Noto , 2016\n"
+"Last-Translator: Joaquín Serna , 2017\n"
 "Language-Team: Spanish (Argentina) 
(https://www.transifex.com/otf/teams/1519/es_AR/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -20,7 +20,7 @@ msgstr ""
 
 #: ../data/greeter.ui.h:1
 msgid "Administration Password"
-msgstr ""
+msgstr "Contraseña de Administración"
 
 #: ../data/greeter.ui.h:2
 msgid ""
@@ -28,22 +28,25 @@ msgid ""
 "tasks. Otherwise, the administration password is disabled for better "
 "security."
 msgstr ""
+"Configura una contraseña de administración si necesitas realizar alguna "
+"tarea administrativa. Si no lo hace, la contraseña de administrador se "
+"deshabilita para mayor seguridad."
 
 #: ../data/greeter.ui.h:3
 msgid "Enter an administration password"
-msgstr ""
+msgstr "Ingresa una contraseña de administración"
 
 #: ../data/greeter.ui.h:4
 msgid "Confirm"
-msgstr ""
+msgstr "Confirmar"
 
 #: ../data/greeter.ui.h:5
 msgid "Confirm your administration password"
-msgstr ""
+msgstr "Confirma tu contraseña de administración"
 
 #: ../data/greeter.ui.h:6
 msgid "Disable"
-msgstr ""
+msgstr "Deshabilitar"
 
 #. This string will never be displayed in the 1st version of the greeter.
 #: ../data/greeter.ui.h:8
@@ -56,6 +59,8 @@ msgid ""
 "This option makes Tails look like Microsoft Windows 10. This can be useful "
 "to avoid attracting suspicion in public places."
 msgstr ""
+"Esta opción hace a Tails parecer como Microsoft Windows 10. Esto puede ser "
+"útil para evitar atraer sospecha en lugares públicos."
 
 #. This string will never be displayed in the 1st version of the greeter.
 #: ../data/greeter.ui.h:12
@@ -85,6 +90,7 @@ msgstr ""
 #: ../data/greeter.ui.h:17 ../tailsgreeter/gui.py:529
 msgid "Cannot unlock encrypted storage with this passphrase."
 msgstr ""
+"No se puede desbloquear el almacenamiento cifrado con esta contraseña."
 
 #: ../data/greeter.ui.h:18
 msgid ""
@@ -94,7 +100,7 @@ msgstr ""
 
 #: ../data/greeter.ui.h:19
 msgid "Welcome to Tails!"
-msgstr ""
+msgstr "¡Bienvenido a Tails!"
 
 #. This string will never be displayed in the 1st version of the greeter.
 #: ../data/greeter.ui.h:21
@@ -105,11 +111,11 @@ msgstr ""
 
 #: ../data/greeter.ui.h:22
 msgid "Language & Region"
-msgstr ""
+msgstr "Idioma y Región"
 
 #: ../data/greeter.ui.h:23
 msgid "Default Settings"
-msgstr ""
+msgstr "Configuración por defecto"
 
 #: ../data/greeter.ui.h:24
 msgid "Save Language & Region Settings"
@@ -117,7 +123,7 @@ msgstr ""
 
 #: ../data/greeter.ui.h:25
 msgid "_Language"
-msgstr ""
+msgstr "_Idioma"
 
 #: ../data/greeter.ui.h:26
 msgid "_Keyboard Layout"
@@ -125,11 +131,11 @@ msgstr ""
 
 #: ../data/greeter.ui.h:27
 msgid "_Formats"
-msgstr ""
+msgstr "_Formatos"
 
 #: ../data/greeter.ui.h:28
 msgid "_Time Zone"
-msgstr ""
+msgstr "_Zona Horaria"
 
 #: ../data/greeter.ui.h:29
 msgid "Encrypted _Persistent Storage"
@@ -137,11 +143,11 @@ msgstr ""
 
 #: ../data/greeter.ui.h:30
 msgid "Show Passphrase"
-msgstr ""
+msgstr "Mostrar Contraseña"
 
 #: ../data/greeter.ui.h:31
 msgid "Configure Persistent Storage"
-msgstr ""
+msgstr "Configurar el Almacenamiento Persistente"
 
 #: ../data/greeter.ui.h:32
 msgid "Enter your passphrase to unlock the persistent storage"
@@ -150,7 +156,7 @@ msgstr ""
 #: ../data/greeter.ui.h:33 ../tailsgreeter/gui.py:475
 #: ../tailsgreeter/gui.py:525
 msgid "Unlock"
-msgstr ""
+msgstr "Desbloquear"
 
 #: ../data/greeter.ui.h:34
 msgid "Relock Persistent Storage"
@@ -166,7 +172,7 @@ msgstr ""
 
 #: ../data/greeter.ui.h:37
 msgid "Save Additional Settings"
-msgstr ""
+msgstr "Guardar Configuraciones Adicionales"
 
 #: ../data/greeter.ui.h:38
 msgid "Add an additional setting"
@@ -174,7 +180,7 @@ msgstr ""
 
 #: ../data/greeter.ui.h:39
 msgid "Network Configuration"
-msgstr ""
+msgstr "Configuración de Red"
 
 #: ../data/greeter.ui.h:40
 msgid ""
@@ -185,7 +191,7 @@ msgstr ""
 
 #: ../data/greeter.ui.h:41
 msgid "Connect directly to the Tor network (default)"
-msgstr ""
+msgstr "Conectar directamente a la red Tor (default)"
 
 #: ../data/greeter.ui.h:42
 msgid "Configure a Tor bridge, firewall, or proxy settings"

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


[tor-commits] [translation/tails-iuk] Update translations for tails-iuk

2017-05-02 Thread translation
commit 55801345fa76943ae3c773d87c882a1cc12fc709
Author: Translation commit bot 
Date:   Wed May 3 01:16:57 2017 +

Update translations for tails-iuk
---
 es_AR.po | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/es_AR.po b/es_AR.po
index 5cc1183..24b6431 100644
--- a/es_AR.po
+++ b/es_AR.po
@@ -3,16 +3,17 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
+# Joaquín Serna, 2017
 # Leandro Vasco , 2014
 # ezemelano , 2014
-# psss , 2016
+# psss , 2016
 msgid ""
 msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: Tails developers \n"
-"POT-Creation-Date: 2016-05-25 16:55+0200\n"
-"PO-Revision-Date: 2016-08-16 12:03+\n"
-"Last-Translator: psss \n"
+"POT-Creation-Date: 2017-04-18 12:13+0200\n"
+"PO-Revision-Date: 2017-05-03 00:59+\n"
+"Last-Translator: Joaquín Serna\n"
 "Language-Team: Spanish (Argentina) 
(http://www.transifex.com/otf/torproject/language/es_AR/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -25,7 +26,7 @@ msgstr ""
 msgid ""
 "For debugging information, execute the following command: sudo tails-"
 "debugging-info"
-msgstr ""
+msgstr "Para información de depuración, ejecute el siguiente comando: sudo 
tails-debugging-info"
 
 #: ../lib/Tails/IUK/Frontend.pm:217
 msgid "Error while checking for upgrades"
@@ -38,7 +39,7 @@ msgid ""
 "Check your network connection, and restart Tails to try upgrading again.\n"
 "\n"
 "If the problem persists, go to 
file:///usr/share/doc/tails/website/doc/upgrade/error/check.en.html"
-msgstr ""
+msgstr "No se pudo determinar si hay actualizaciones disponibles desde 
nuestro sitio web.\n\nComprueba tu conexión de red, y reinicia Tails para 
intentar actualizarlo nuevamente.\n\nSi el problema persiste, ve a 
file:///usr/share/doc/tails/website/doc/upgrade/error/check.es.html"
 
 #: ../lib/Tails/IUK/Frontend.pm:235
 msgid "no automatic upgrade is available from our website for this version"
@@ -148,7 +149,7 @@ msgstr "Descargando actualización"
 #: ../lib/Tails/IUK/Frontend.pm:472
 #, perl-brace-format
 msgid "Downloading the upgrade to %{name}s %{version}s..."
-msgstr ""
+msgstr "Descargando la actualización para %{name}s %{version}s..."
 
 #: ../lib/Tails/IUK/Frontend.pm:513
 msgid ""
@@ -186,7 +187,7 @@ msgstr ""
 
 #: ../lib/Tails/IUK/Frontend.pm:591
 msgid "Error while choosing a download server"
-msgstr ""
+msgstr "Error mientras se elegía el servidor de descarga"
 
 #: ../lib/Tails/IUK/Frontend.pm:608
 msgid ""
@@ -235,7 +236,7 @@ msgid ""
 "Your Tails device is being upgraded...\n"
 "\n"
 "For security reasons, the networking is now disabled."
-msgstr ""
+msgstr "Tu dispositivo Tails está siendo actualizado...\n\nPor razones 
de seguridad, se ha deshabilitado la red."
 
 #: ../lib/Tails/IUK/Frontend.pm:692
 msgid ""

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


[tor-commits] [tor/master] Break connection_dir_client_reached_eof() into smaller functions

2017-05-02 Thread nickm
commit db86b9194dfc6759cd731f8eedc37b7534afbf0d
Author: Nick Mathewson 
Date:   Tue May 2 13:06:25 2017 -0400

Break connection_dir_client_reached_eof() into smaller functions

This was a >630-line function, which doesn't make anybody happy.  It
was also mostly composed of a bunch of if-statements that handled
different directory responses differently depending on the original
purpose of the directory connection.  The logical refactoring here
is to move the body of each switch statement into a separate handler
function, and to invoke those functions from a separate switch
statement.

This commit leaves whitespace mostly untouched, for ease of review.
I'll reindent in the next commit.
---
 changes/refactor_reached_eof |   5 +
 src/or/directory.c   | 319 +--
 2 files changed, 286 insertions(+), 38 deletions(-)

diff --git a/changes/refactor_reached_eof b/changes/refactor_reached_eof
new file mode 100644
index 000..33ab931
--- /dev/null
+++ b/changes/refactor_reached_eof
@@ -0,0 +1,5 @@
+  o Code simplification and refactoring:
+
+- Break up the 630-line function connection_dir_client_reached_eof() into
+  a dozen smaller functions. This change should help maintainability and
+  readability of the client directory code.
diff --git a/src/or/directory.c b/src/or/directory.c
index 2b9f18a..0635be1 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -2073,6 +2073,39 @@ load_downloaded_routers(const char *body, smartlist_t 
*which,
   return added;
 }
 
+/** A structure to hold arguments passed into each directory response
+ * handler */
+typedef struct response_handler_args_t {
+  int status_code;
+  const char *reason;
+  const char *body;
+  size_t body_len;
+  const char *headers;
+} response_handler_args_t;
+
+static int handle_response_fetch_consensus(dir_connection_t *,
+   const response_handler_args_t *);
+static int handle_response_fetch_certificate(dir_connection_t *,
+ const response_handler_args_t *);
+static int handle_response_fetch_status_vote(dir_connection_t *,
+ const response_handler_args_t *);
+static int handle_response_fetch_detached_signatures(dir_connection_t *,
+ const response_handler_args_t *);
+static int handle_response_fetch_desc(dir_connection_t *,
+ const response_handler_args_t *);
+static int handle_response_fetch_microdesc(dir_connection_t *,
+   const response_handler_args_t *);
+static int handle_response_upload_dir(dir_connection_t *,
+  const response_handler_args_t *);
+static int handle_response_upload_vote(dir_connection_t *,
+   const response_handler_args_t *);
+static int handle_response_upload_signatures(dir_connection_t *,
+ const response_handler_args_t *);
+static int handle_response_fetch_renddesc_v2(dir_connection_t *,
+ const response_handler_args_t *);
+static int handle_response_upload_renddesc_v2(dir_connection_t *,
+  const response_handler_args_t *);
+
 /** We are a client, and we've finished reading the server's
  * response. Parse it and act appropriately.
  *
@@ -2098,8 +2131,6 @@ connection_dir_client_reached_eof(dir_connection_t *conn)
   int allow_partial = (conn->base_.purpose == DIR_PURPOSE_FETCH_SERVERDESC ||
conn->base_.purpose == DIR_PURPOSE_FETCH_EXTRAINFO ||
conn->base_.purpose == DIR_PURPOSE_FETCH_MICRODESC);
-  time_t now = time(NULL);
-  int src_code;
   size_t received_bytes;
 
   received_bytes = connection_get_inbuf_len(TO_CONN(conn));
@@ -2193,6 +2224,7 @@ connection_dir_client_reached_eof(dir_connection_t *conn)
  "'%s:%d'. I'll try again soon.",
  status_code, escaped(reason), conn->base_.address,
  conn->base_.port);
+time_t now = approx_time();
 if ((rs = router_get_mutable_consensus_status_by_id(id_digest)))
   rs->last_dir_503_at = now;
 if ((ds = router_get_fallback_dirserver_by_digest(id_digest)))
@@ -2260,7 +2292,77 @@ connection_dir_client_reached_eof(dir_connection_t *conn)
 }
   }
 
-  if (conn->base_.purpose == DIR_PURPOSE_FETCH_CONSENSUS) {
+  int rv;
+  response_handler_args_t args;
+  memset(&args, 0, sizeof(args));
+  args.status_code = status_code;
+  args.reason = reason;
+  args.body = body;
+  args.body_len = body_len;
+  args.headers = headers;
+
+  switch (conn->base_.purpose) {
+case DIR_PURPOSE_FETCH_CONSENSUS:
+  rv = handle_response_fetch_consensus(conn, &args);
+  break;
+case DIR_PURPOSE_FETCH_CERTIFICATE:
+  rv = hand

[tor-commits] [tor/master] Merge branch 'refactor_dir_client_handler'

2017-05-02 Thread nickm
commit e0b1fd4d3da05701c0970dabd93010d6c7550d43
Merge: 7bc9f93 e0c937f
Author: Nick Mathewson 
Date:   Tue May 2 20:42:00 2017 -0400

Merge branch 'refactor_dir_client_handler'

 changes/refactor_reached_eof |5 +
 src/or/directory.c   | 1092 ++
 2 files changed, 674 insertions(+), 423 deletions(-)

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


[tor-commits] [tor/master] Reindent the just-extracted directory response handler functions

2017-05-02 Thread nickm
commit e0c937f316bce05691cd861d9cc5b58f8ff0d967
Author: Nick Mathewson 
Date:   Tue May 2 13:11:44 2017 -0400

Reindent the just-extracted directory response handler functions
---
 src/or/directory.c | 815 +++--
 1 file changed, 409 insertions(+), 406 deletions(-)

diff --git a/src/or/directory.c b/src/or/directory.c
index 0635be1..48bada2 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -2363,43 +2363,43 @@ handle_response_fetch_consensus(dir_connection_t *conn,
   const char *reason = args->reason;
   const time_t now = approx_time();
 
-int r;
-const char *flavname = conn->requested_resource;
-if (status_code != 200) {
-  int severity = (status_code == 304) ? LOG_INFO : LOG_WARN;
-  tor_log(severity, LD_DIR,
-  "Received http status code %d (%s) from server "
-  "'%s:%d' while fetching consensus directory.",
-   status_code, escaped(reason), conn->base_.address,
-   conn->base_.port);
-  networkstatus_consensus_download_failed(status_code, flavname);
-  return -1;
-}
-log_info(LD_DIR,"Received consensus directory (body size %d) from server "
- "'%s:%d'", (int)body_len, conn->base_.address, conn->base_.port);
-if ((r=networkstatus_set_current_consensus(body, flavname, 0,
-   conn->identity_digest))<0) {
-  log_fn(r<-1?LOG_WARN:LOG_INFO, LD_DIR,
- "Unable to load %s consensus directory downloaded from "
- "server '%s:%d'. I'll try again soon.",
- flavname, conn->base_.address, conn->base_.port);
-  networkstatus_consensus_download_failed(0, flavname);
-  return -1;
-}
+  int r;
+  const char *flavname = conn->requested_resource;
+  if (status_code != 200) {
+int severity = (status_code == 304) ? LOG_INFO : LOG_WARN;
+tor_log(severity, LD_DIR,
+"Received http status code %d (%s) from server "
+"'%s:%d' while fetching consensus directory.",
+status_code, escaped(reason), conn->base_.address,
+conn->base_.port);
+networkstatus_consensus_download_failed(status_code, flavname);
+return -1;
+  }
+  log_info(LD_DIR,"Received consensus directory (body size %d) from server "
+   "'%s:%d'", (int)body_len, conn->base_.address, conn->base_.port);
+  if ((r=networkstatus_set_current_consensus(body, flavname, 0,
+ conn->identity_digest))<0) {
+log_fn(r<-1?LOG_WARN:LOG_INFO, LD_DIR,
+   "Unable to load %s consensus directory downloaded from "
+   "server '%s:%d'. I'll try again soon.",
+   flavname, conn->base_.address, conn->base_.port);
+networkstatus_consensus_download_failed(0, flavname);
+return -1;
+  }
 
-/* If we launched other fetches for this consensus, cancel them. */
-connection_dir_close_consensus_fetches(conn, flavname);
-
-/* launches router downloads as needed */
-routers_update_all_from_networkstatus(now, 3);
-update_microdescs_from_networkstatus(now);
-update_microdesc_downloads(now);
-directory_info_has_arrived(now, 0, 0);
-if (authdir_mode_v3(get_options())) {
-  sr_act_post_consensus(
-   networkstatus_get_latest_consensus_by_flavor(FLAV_NS));
-}
-log_info(LD_DIR, "Successfully loaded consensus.");
+  /* If we launched other fetches for this consensus, cancel them. */
+  connection_dir_close_consensus_fetches(conn, flavname);
+
+  /* launches router downloads as needed */
+  routers_update_all_from_networkstatus(now, 3);
+  update_microdescs_from_networkstatus(now);
+  update_microdesc_downloads(now);
+  directory_info_has_arrived(now, 0, 0);
+  if (authdir_mode_v3(get_options())) {
+sr_act_post_consensus(
+ networkstatus_get_latest_consensus_by_flavor(FLAV_NS));
+  }
+  log_info(LD_DIR, "Successfully loaded consensus.");
 
   return 0;
 }
@@ -2419,59 +2419,58 @@ handle_response_fetch_certificate(dir_connection_t 
*conn,
   const size_t body_len = args->body_len;
 
   if (status_code != 200) {
-  log_warn(LD_DIR,
-  "Received http status code %d (%s) from server "
-  "'%s:%d' while fetching \"/tor/keys/%s\".",
-   status_code, escaped(reason), conn->base_.address,
-   conn->base_.port, conn->requested_resource);
-  connection_dir_download_cert_failed(conn, status_code);
-  return -1;
-}
-log_info(LD_DIR,"Received authority certificates (body size %d) from "
- "server '%s:%d'",
- (int)body_len, conn->base_.address, conn->base_.port);
-
-/*
- * Tell trusted_dirs_load_certs_from_string() whether it was by fp
- * or fp-sk pair.
- */
-int src_code = -1;
-if (!strcmpstart(conn->requested_resource, "fp/")) {
-  src_code = TRUSTED_DIRS_CERTS_SRC_DL_BY_ID_DIGEST;
-} else if (!strcmpstart(conn->requested_resource, "fp-sk/")) {
- 

[tor-commits] [chutney/master] Give chutney a CHUTNEY_DEBUG option

2017-05-02 Thread teor
commit 876933cb3173b0cc14848189b7dac41c7905560f
Author: Nick Mathewson 
Date:   Tue May 2 19:24:56 2017 -0400

Give chutney a CHUTNEY_DEBUG option

test-network.sh gets a --debug flag, and they both get documented in
the README.  debug_flag is no longer recommended.
---
 README  | 1 +
 lib/chutney/Traffic.py  | 4 ++--
 scripts/chutney_tests/verify.py | 4 +---
 tools/test-network.sh   | 5 -
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/README b/README
index d184947..8030842 100644
--- a/README
+++ b/README
@@ -57,6 +57,7 @@ Warning Options:
   --only-warningsCHUTNEY_WARNINGS_ONLY=true
 
 Expert Options:
+  --debugCHUTNEY_DEBUG=true
   --coverage USE_COVERAGE_BINARY=true
   --net-dir  CHUTNEY_DATA_DIR
   --dry-run  NETWORK_DRY_RUN=true
diff --git a/lib/chutney/Traffic.py b/lib/chutney/Traffic.py
index b5f75fd..a22d16b 100644
--- a/lib/chutney/Traffic.py
+++ b/lib/chutney/Traffic.py
@@ -28,11 +28,11 @@ import select
 import struct
 import errno
 import time
+import os
 
 # Set debug_flag=True in order to debug this program or to get hints
 # about what's going wrong in your system.
-debug_flag = False
-
+debug_flag = os.environ.get("CHUTNEY_DEBUG", "") != ""
 
 def debug(s):
 "Print a debug message on stdout if debug_flag is True."
diff --git a/scripts/chutney_tests/verify.py b/scripts/chutney_tests/verify.py
index b887ee7..98beb74 100644
--- a/scripts/chutney_tests/verify.py
+++ b/scripts/chutney_tests/verify.py
@@ -19,9 +19,7 @@ def run_test(network):
 time.sleep(5)
 print("Transmission: %s" % ("Success" if status else "Failure"))
 if not status:
-# TODO: allow the debug flag to be passed as an argument to
-# src/test/test-network.sh and chutney
-print("Set 'debug_flag = True' in Traffic.py to diagnose.")
+print("Set CHUTNEY_DEBUG to diagnose.")
 return status
 
 
diff --git a/tools/test-network.sh b/tools/test-network.sh
index 9da20b1..7ea0fd4 100755
--- a/tools/test-network.sh
+++ b/tools/test-network.sh
@@ -35,7 +35,10 @@ do
   # the name or path of a tor-gencert binary
   export CHUTNEY_TOR_GENCERT="$2"
   shift
-;;
+  ;;
+--debug)
+  export CHUTEY_DEBUG="yes"
+  ;;
 --flavor|--flavour|--network-flavor|--network-flavour)
   export NETWORK_FLAVOUR="$2"
   shift

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


[tor-commits] [tor/master] Merge branch 'teor_connection-with-client-v2_squashed'

2017-05-02 Thread nickm
commit 7bc9f93abbfcabba1acde441b5fac98d4676c08e
Merge: a91f948 f9af7e8
Author: Nick Mathewson 
Date:   Tue May 2 19:18:04 2017 -0400

Merge branch 'teor_connection-with-client-v2_squashed'

 changes/bug21406|  5 +
 src/or/channel.h|  4 ++--
 src/or/channeltls.c |  4 
 src/or/command.c| 10 --
 src/or/or.h |  4 
 5 files changed, 19 insertions(+), 8 deletions(-)

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


[tor-commits] [tor/master] Accurately identify client connections by their lack of peer authentication

2017-05-02 Thread nickm
commit f9af7e8bd01d4b7a70776a96c649a89cf1717dd1
Author: teor 
Date:   Wed Mar 1 16:23:02 2017 +1100

Accurately identify client connections by their lack of peer authentication

This means that we bail out earlier if asked to extend to a client.

Follow-up to 21407.
Fixes bug 21406; bugfix on 0.2.4.23.
---
 changes/bug21406|  5 +
 src/or/channel.h|  4 ++--
 src/or/channeltls.c |  4 
 src/or/command.c| 10 --
 4 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/changes/bug21406 b/changes/bug21406
new file mode 100644
index 000..170e631
--- /dev/null
+++ b/changes/bug21406
@@ -0,0 +1,5 @@
+  o Minor bugfixes (code correctness):
+- Accurately identify client connections using their lack of peer
+  authentication. This means that we bail out earlier if asked to extend
+  to a client. Follow-up to 21407.
+  Fixes bug 21406; bugfix on 0.2.4.23.
diff --git a/src/or/channel.h b/src/or/channel.h
index 26aa93b..748a099 100644
--- a/src/or/channel.h
+++ b/src/or/channel.h
@@ -214,8 +214,8 @@ struct channel_s {
   unsigned int is_bad_for_new_circs:1;
 
   /** True iff we have decided that the other end of this connection
-   * is a client.  Channels with this flag set should never be used
-   * to satisfy an EXTEND request.  */
+   * is a client or bridge relay.  Connections with this flag set should never
+   * be used to satisfy an EXTEND request. */
   unsigned int is_client:1;
 
   /** Set if the channel was initiated remotely (came from a listener) */
diff --git a/src/or/channeltls.c b/src/or/channeltls.c
index dbed95f..e734913 100644
--- a/src/or/channeltls.c
+++ b/src/or/channeltls.c
@@ -1654,6 +1654,10 @@ channel_tls_process_netinfo_cell(cell_t *cell, 
channel_tls_t *chan)
 tor_assert(tor_mem_is_zero(
   (const char*)(chan->conn->handshake_state->
 authenticated_ed25519_peer_id.pubkey), 32));
+/* If the client never authenticated, it's a tor client or bridge
+ * relay, and we must not use it for EXTEND requests (nor could we, as
+ * there are no authenticated peer IDs) */
+channel_mark_client(TLS_CHAN_TO_BASE(chan));
 channel_set_circid_type(TLS_CHAN_TO_BASE(chan), NULL,
chan->conn->link_proto < MIN_LINK_PROTO_FOR_WIDE_CIRC_IDS);
 
diff --git a/src/or/command.c b/src/or/command.c
index 5866c38..4d3830f 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -344,8 +344,14 @@ command_process_create_cell(cell_t *cell, channel_t *chan)
 int len;
 created_cell_t created_cell;
 
-/* Make sure we never try to use the OR connection on which we
- * received this cell to satisfy an EXTEND request,  */
+/* If the client used CREATE_FAST, it's probably a tor client or bridge
+ * relay, and we must not use it for EXTEND requests (in most cases, we
+ * won't have an authenticated peer ID for the extend).
+ * Public relays on 0.2.9 and later will use CREATE_FAST if they have no
+ * ntor onion key for this relay, but that should be a rare occurrence.
+ * Clients on 0.3.1 and later avoid using CREATE_FAST as much as they can,
+ * even during bootstrap, so the CREATE_FAST check is most accurate for
+ * earlier tor client versions. */
 channel_mark_client(chan);
 
 memset(&created_cell, 0, sizeof(created_cell));



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


[tor-commits] [tor/master] Remove the unused field or_connection_t.is_connection_with_client

2017-05-02 Thread nickm
commit 934003587305dcfb2cbc7f01e7248e3bd378317b
Author: teor 
Date:   Wed Mar 1 16:22:37 2017 +1100

Remove the unused field or_connection_t.is_connection_with_client

To discover if a connection is from a tor client, use:
channel_is_client(TLS_CHAN_TO_BASE(or_connection_t.chan))

Part of 21406.
---
 src/or/or.h | 4 
 1 file changed, 4 deletions(-)

diff --git a/src/or/or.h b/src/or/or.h
index 0db9f23..a1a0bd4 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1543,10 +1543,6 @@ typedef struct or_connection_t {
* NETINFO cell listed the address we're connected to as recognized. */
   unsigned int is_canonical:1;
 
-  /** True iff we have decided that the other end of this connection
-   * is a client.  Connections with this flag set should never be used
-   * to satisfy an EXTEND request.  */
-  unsigned int is_connection_with_client:1;
   /** True iff this is an outgoing connection. */
   unsigned int is_outgoing:1;
   unsigned int proxy_type:2; /**< One of PROXY_NONE...PROXY_SOCKS5 */



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


[tor-commits] [tor/master] Delete useless checks in confparse.c

2017-05-02 Thread nickm
commit 5494087ed76475d30d80b47205cf8a0c5fb8ea69
Author: Taylor Yu 
Date:   Mon May 1 14:00:06 2017 -0400

Delete useless checks in confparse.c

config_parse_interval() and config_parse_msec_interval() were checking
whether the variable "ok" (a pointer to an int) was null, rather than
derefencing it.  Both functions are static, and all existing callers
pass a valid pointer to those static functions.  The callers do check
the variables (also confusingly named "ok") whose addresses they pass
as the "ok" arguments, so even if the pointer check were corrected to
be a dereference, it would be redundant.

Fixes #22103.
---
 src/or/confparse.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/src/or/confparse.c b/src/or/confparse.c
index 75ec92e..abae7e3 100644
--- a/src/or/confparse.c
+++ b/src/or/confparse.c
@@ -1190,8 +1190,6 @@ config_parse_msec_interval(const char *s, int *ok)
 {
   uint64_t r;
   r = config_parse_units(s, time_msec_units, ok);
-  if (!ok)
-return -1;
   if (r > INT_MAX) {
 log_warn(LD_CONFIG, "Msec interval '%s' is too long", s);
 *ok = 0;
@@ -1209,8 +1207,6 @@ config_parse_interval(const char *s, int *ok)
 {
   uint64_t r;
   r = config_parse_units(s, time_units, ok);
-  if (!ok)
-return -1;
   if (r > INT_MAX) {
 log_warn(LD_CONFIG, "Interval '%s' is too long", s);
 *ok = 0;



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


[tor-commits] [tor/master] Add tests for #22103

2017-05-02 Thread nickm
commit a91f948ccac5e681de9e8e63efb267c7ad9e9f5f
Author: Taylor Yu 
Date:   Tue May 2 15:49:36 2017 -0400

Add tests for #22103

Also factor out the error message comparisions from
test_options_validate_impl() into a separate function so it can check
for error messages in different phases of config parsing.
---
 src/test/test_options.c | 119 +---
 1 file changed, 82 insertions(+), 37 deletions(-)

diff --git a/src/test/test_options.c b/src/test/test_options.c
index 1ba6a05..29f6665 100644
--- a/src/test/test_options.c
+++ b/src/test/test_options.c
@@ -105,27 +105,13 @@ clear_log_messages(void)
   "EDE6D711294FADF8E7951F4DE6CA56B58 194.109.206.212:80 7EA6 EAD6 FD83" \
   " 083C 538F 4403 8BBF A077 587D D755\n"
 
-static void
-test_options_validate_impl(const char *configuration,
-   const char *expect_errmsg,
-   int expect_log_severity,
-   const char *expect_log)
+static int
+test_options_checkmsgs(const char *configuration,
+   const char *expect_errmsg,
+   int expect_log_severity,
+   const char *expect_log,
+   char *msg)
 {
-  or_options_t *opt=NULL;
-  or_options_t *dflt;
-  config_line_t *cl=NULL;
-  char *msg=NULL;
-  int r;
-
-  setup_options(opt, dflt);
-
-  r = config_get_lines(configuration, &cl, 1);
-  tt_int_op(r, OP_EQ, 0);
-
-  r = config_assign(&options_format, opt, cl, 0, &msg);
-  tt_int_op(r, OP_EQ, 0);
-
-  r = options_validate(NULL, opt, dflt, 0, &msg);
   if (expect_errmsg && !msg) {
 TT_DIE(("Expected error message <%s> from <%s>, but got none.",
 expect_errmsg, configuration));
@@ -136,8 +122,6 @@ test_options_validate_impl(const char *configuration,
 TT_DIE(("Expected no error message from <%s> but got <%s>.",
 configuration, msg));
   }
-  tt_int_op((r == 0), OP_EQ, (msg == NULL));
-
   if (expect_log) {
 int found = 0;
 if (messages) {
@@ -157,6 +141,56 @@ test_options_validate_impl(const char *configuration,
   configuration, msg));
 }
   }
+  return 0;
+
+ done:
+  return -1;
+}
+
+/* Which phases of config parsing/validation to check for messages/logs */
+enum { PH_GETLINES, PH_ASSIGN, PH_VALIDATE };
+
+static void
+test_options_validate_impl(const char *configuration,
+   const char *expect_errmsg,
+   int expect_log_severity,
+   const char *expect_log,
+   int phase)
+{
+  or_options_t *opt=NULL;
+  or_options_t *dflt;
+  config_line_t *cl=NULL;
+  char *msg=NULL;
+  int r;
+
+  setup_options(opt, dflt);
+
+  r = config_get_lines(configuration, &cl, 1);
+  if (phase == PH_GETLINES) {
+if (test_options_checkmsgs(configuration, expect_errmsg,
+   expect_log_severity,
+   expect_log, msg))
+  goto done;
+  }
+  tt_int_op((r == 0), OP_EQ, (msg == NULL));
+
+  r = config_assign(&options_format, opt, cl, 0, &msg);
+  if (phase == PH_ASSIGN) {
+if (test_options_checkmsgs(configuration, expect_errmsg,
+   expect_log_severity,
+   expect_log, msg))
+  goto done;
+  }
+  tt_int_op((r == 0), OP_EQ, (msg == NULL));
+
+  r = options_validate(NULL, opt, dflt, 0, &msg);
+  if (phase == PH_VALIDATE) {
+if (test_options_checkmsgs(configuration, expect_errmsg,
+   expect_log_severity,
+   expect_log, msg))
+  goto done;
+  }
+  tt_int_op((r == 0), OP_EQ, (msg == NULL));
 
  done:
   escaped(NULL);
@@ -168,14 +202,14 @@ test_options_validate_impl(const char *configuration,
   clear_log_messages();
 }
 
-#define WANT_ERR(config, msg)   \
-  test_options_validate_impl((config), (msg), 0, NULL)
-#define WANT_LOG(config, severity, msg) \
-  test_options_validate_impl((config), NULL, (severity), (msg))
-#define WANT_ERR_LOG(config, msg, severity, logmsg) \
-  test_options_validate_impl((config), (msg), (severity), (logmsg))
-#define OK(config)  \
-  test_options_validate_impl((config), NULL, 0, NULL)
+#define WANT_ERR(config, msg, ph)   \
+  test_options_validate_impl((config), (msg), 0, NULL, (ph))
+#define WANT_LOG(config, severity, msg, ph) \
+  test_options_validate_impl((config), NULL, (severity), (msg), (ph))
+#define WANT_ERR_LOG(config, msg, severity, logmsg, ph) \
+  test_options_validate_impl((config), (msg), (severity), (logmsg), (ph))
+#define OK(config, ph)  \
+  test_options_validate_impl((config), NULL, 0, NULL, (ph))
 
 static void
 test_options_validate(void *arg)
@@ -184,21 +218,32 @@ test_options_validate(void *arg)

[tor-commits] [torspec/master] fix trivial typo

2017-05-02 Thread arma
commit f9b2bdb3f58991446af0d1d99b25e4990d138af9
Author: Roger Dingledine 
Date:   Tue May 2 19:01:11 2017 -0400

fix trivial typo
---
 proposals/274-rotate-onion-keys-less.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proposals/274-rotate-onion-keys-less.txt 
b/proposals/274-rotate-onion-keys-less.txt
index 4099759..7c17873 100644
--- a/proposals/274-rotate-onion-keys-less.txt
+++ b/proposals/274-rotate-onion-keys-less.txt
@@ -41,7 +41,7 @@ Implemented-In: 0.3.1.1-alpha
The number of microdescriptors to actually download should
decrease by a similar number.
 
-   This amount to a significant reduction: currently, by
+   This amounts to a significant reduction: currently, by
back-of-the-envelope estimates, an always-on client that downloads
all the directory info in a month downloads about 449MB of compressed
consensuses and something around 97 MB of compressed

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


[tor-commits] [atlas/master] Remove the data-original-title attribute

2017-05-02 Thread irl
commit 7b0f624a3f2c69231570dd964400fade8510ec30
Author: cypherpunks 
Date:   Sun Apr 23 19:38:05 2017 +

Remove the data-original-title attribute

The Bootstrap Tooltip plugin overwrites the data-original-title
attribute when the title attribute is specified. All of the elements
that specify the data-original-title attribute also specify the title
attribute which makes the former serve no purpose.

Also the title attribute has been standardized while the
data-original-title attribute is not.

Closes #22047.
---
 templates/details/bridge.html | 24 +++---
 templates/details/router.html | 46 +--
 2 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/templates/details/bridge.html b/templates/details/bridge.html
index dae5a6b..fda73f6 100644
--- a/templates/details/bridge.html
+++ b/templates/details/bridge.html
@@ -14,14 +14,14 @@
 
 Configuration
 
-  Nickname
+  Nickname
   <%= _.escape(relay.get('nickname')) %>
 
-  OR Addresses
+  OR 
Addresses
   <%= relay.get('or_addresses') %>
 
   
-  Advertised Bandwidth
+  Advertised Bandwidth
   
   <%= relay.get('bandwidth_hr') ? relay.get('bandwidth_hr') : 'not 
defined' %>
 
@@ -36,20 +36,20 @@
 <% } %>
 
 
-Hashed Fingerprint
+Hashed Fingerprint
 <%= relay.get('fingerprint') %>
 
 <% if (relay.get('running') === true) { %>
-Uptime
+Uptime
 <%= relay.get('uptime_hrfull') %>
 <% } else { %>
-Downtime
+Downtime
 <%= relay.get('downtime') %>
-Last Seen
+Last Seen
 <%= relay.get('last_seen') %>
 <% } %>
 
-Flags
+Flags
 <% _.each(relay.get('flags'), function(flag) { %>
 
 
@@ -58,7 +58,7 @@
 <% }); %>
 
 
-Properties
+Properties
 
 <% var propertyCount = 0; %>
 <% if (relay.get('recommended_version') === false) {
@@ -72,13 +72,13 @@
 <%=propertyCount==0?'none':''%>
 
 
-Last Restarted
+Last Restarted
 <%= relay.get('last_restarted') %>
 
-Platform
+Platform
 <%= _.escape(relay.get('platform')) %>
 
-Transport 
protocols
+Transport protocols
 <%= relay.get('transports') ? relay.get('transports') : 'none' %>
 
 
diff --git a/templates/details/router.html b/templates/details/router.html
index 5ffec67..430091b 100644
--- a/templates/details/router.html
+++ b/templates/details/router.html
@@ -14,23 +14,23 @@
 
 Configuration
 
-  Nickname
+  Nickname
   <%= _.escape(relay.get('nickname')) %>
 
-  OR Addresses
+  OR 
Addresses
   <%= relay.get('or_addresses') %>
 
-  Contact
+  Contact
   <%= _.escape( relay.get('contact')!='undefined' ? 
relay.get('contact') : 'none' ) %>
 
-  Dir 
Address
+  Dir Address
   <%= relay.get('dir_address') ? relay.get('dir_address') : 'none' 
%>
 
   
-  Advertised Bandwidth
+  Advertised Bandwidth
   
-  <%= 
relay.get('bandwidth_hr') %>
-  IPv4 Exit Policy Summary
+  <%= relay.get('bandwidth_hr') %>
+  IPv4 Exit Policy Summary
   
   <% if ('accept' in relay.get('exit_policy_summary')) { %>
 accept<% 
_.each(relay.get('exit_policy_summary')['accept'],
@@ -39,7 +39,7 @@
 reject<% 
_.each(relay.get('exit_policy_summary')['reject'],
   function(ports) { %>  <%= $.trim(ports) %><% });} %>
   
-  IPv6 Exit Policy Summary
+  IPv6 Exit Policy Summary
   
   <% if (relay.get('exit_policy_v6_summary') && ('accept' in 
relay.get('exit_policy_v6_summary'))) { %>
 accept<% 
_.each(relay.get('exit_policy_v6_summary')['accept'],
@@ -51,7 +51,7 @@
 reject  1-65535
   <% } %>
   
-  Exit 
Policy
+  Exit Policy
   
   <% _.each(relay.get('exit_policy'), 
function(line) { %>
 <%= $.trim(line) %><% }); %>
@@ -68,20 +68,20 @@
 <% } %>
 
 
-Fingerprint
+Fingerprint
 <%= relay.get('fingerprint') %>
 
 <% if (relay.get('running') === true) { %>
-Uptime
+Uptime
 <%= relay.get('uptime_hrfull') %>
 <% } else { %>
-Downtime
+Downtime
 <%= relay.get('downtime') %>
-Last Seen
+Last Seen
 <%= relay.get('last_seen') %>
 <% } %>
 
-Flags
+Flags
 <% _.each(relay.get('flags'), function(flag) { %>
 
 
@@ -90,7 +90,7 @@
 <% }); %>
 
 
-Properties
+Properties
 
 <% var propertyCount = 0; %>
 <% if (relay.get('recommended_version') === false) {
@@ -104,35 +104,35 @@
 <%=propertyCount==0?'none':''%>
 
 
-Country
+Country
 <% if (relay.get('country')) { %> <%= relay.get('countryname') %><% } else { 
%>Unknown<% } %>
 
-AS Number
+AS 
Number
 <%= relay.get('as_no') ? _.escape(relay.get('as_no')) : "unknown" 
%>
 
-AS Name
+AS Name
 <%= relay.get('as_name') ? _.escape(relay.get('as_name')

[tor-commits] [atlas/master] Make the `Learn more` button more prominent

2017-05-02 Thread irl
commit ae5673e61758526b87acd15cc76505c6b5b92194
Author: cypherpunks 
Date:   Mon Apr 24 17:47:38 2017 +

Make the `Learn more` button more prominent

The changes to make the button more prominent include using primary
button styling which changes the colour to a darker blue and removing
the guillemet.

Additionally, the learn-more class is removed from the button because
this class is unused.
---
 templates/search/main.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/search/main.html b/templates/search/main.html
index 6060dae..6c8508a 100644
--- a/templates/search/main.html
+++ b/templates/search/main.html
@@ -2,7 +2,7 @@
 
 Welcome to Atlas.
 Atlas is a web application to learn about currently running Tor 
relays. Enter your search in the above box to get started.
-Learn more »
+Learn 
more
 
 
 

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


[tor-commits] [atlas/master] Replace the About footer link with a Wiki link

2017-05-02 Thread irl
commit 5598a1e83d87b5f2aaf02cf2b5ed9370557e1945
Author: cypherpunks 
Date:   Mon Apr 24 18:25:09 2017 +

Replace the About footer link with a Wiki link

The About link in the footer is redundant because there is already a
link to the About page in the navigation bar. Furthermore, there was no
reference to the Atlas wiki page so the Wiki link now replaces the About
link.

Closes #22057.
---
 index.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.html b/index.html
index b13fceb..9584f6d 100644
--- a/index.html
+++ b/index.html
@@ -64,7 +64,7 @@
   
   
   The Tor Project - 
-  About -
+  https://trac.torproject.org/projects/tor/wiki/doc/Atlas";>Wiki -
   https://gitweb.torproject.org/atlas.git";>Source code -
   https://trac.torproject.org/projects/tor/newticket?component=Metrics/Atlas";>Report
 a bug
   - mailto:i...@torproject.org";>Contact



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


[tor-commits] [atlas/master] Replace custom splash styling with an hero-unit

2017-05-02 Thread irl
commit 811cb09856615b928ba4e0903723b80128199311
Author: cypherpunks 
Date:   Sat Apr 22 12:21:34 2017 +

Replace custom splash styling with an hero-unit

The hero-unit by Bootstrap offers similar functionality to the custom
splash screen and reduces the amount of custom CSS.

Closes #22056.
---
 css/style.css  | 42 --
 templates/search/main.html |  2 +-
 2 files changed, 1 insertion(+), 43 deletions(-)

diff --git a/css/style.css b/css/style.css
index e4a7f07..e05774f 100644
--- a/css/style.css
+++ b/css/style.css
@@ -3,41 +3,6 @@
 height: 362px;
 }
 
-.splash {
-padding-top: 56px;
-padding-bottom: 72px;
-position: relative;
-}
-
-
-.splash h1 {
-text-align: center;
-font-size: 80px;
-letter-spacing: -1px;
-line-height: 1;
-margin-bottom: 18px;
-}
-
-.splash p {
-margin-left: 5%;
-margin-right: 5%;
-line-height: 36px;
-font-weight: 300;
-font-size: 30px;
-}
-
-.splash .learn-more {
-margin-left: 5%;
-margin-right: 5%;
-text-align: center;
-font-size: 30px;
-line-height: 36px;
-}
-
-.splash .learn-more {
-
-}
-
 .progress {
 width: 50%;
 margin: 100px auto;
@@ -104,13 +69,6 @@ input {
 .navbar-search input {
 max-width:100%;
 }
-.splash h1 {
-font-size:40px;
-}
-.splash p {
-line-height: 30px;
-font-size: 24px;
-}
 .span6.hide {
 display: none !important;
 }
diff --git a/templates/search/main.html b/templates/search/main.html
index c8b82bc..6060dae 100644
--- a/templates/search/main.html
+++ b/templates/search/main.html
@@ -1,5 +1,5 @@
  
-
+
 Welcome to Atlas.
 Atlas is a web application to learn about currently running Tor 
relays. Enter your search in the above box to get started.
 Learn more »



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


[tor-commits] [translation/https_everywhere] Update translations for https_everywhere

2017-05-02 Thread translation
commit ee63bbf302f99f9112c1555df83095d6521347cc
Author: Translation commit bot 
Date:   Tue May 2 20:15:22 2017 +

Update translations for https_everywhere
---
 es_AR/ssl-observatory.dtd | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/es_AR/ssl-observatory.dtd b/es_AR/ssl-observatory.dtd
index 305afcc..9dabb39 100644
--- a/es_AR/ssl-observatory.dtd
+++ b/es_AR/ssl-observatory.dtd
@@ -3,9 +3,9 @@
 
 
 
-
+
 
 

[tor-commits] [stem/master] BridgeExtraInfoDescriptor creation

2017-05-02 Thread atagar
commit ceeec7989007371508b024d779fc12fd62a68bd6
Author: Damian Johnson 
Date:   Mon May 1 11:11:18 2017 -0700

BridgeExtraInfoDescriptor creation
---
 stem/descriptor/extrainfo_descriptor.py  | 13 +++
 test/mocking.py  | 32 
 test/unit/descriptor/extrainfo_descriptor.py | 27 +--
 3 files changed, 29 insertions(+), 43 deletions(-)

diff --git a/stem/descriptor/extrainfo_descriptor.py 
b/stem/descriptor/extrainfo_descriptor.py
index 7a2e7b1..848ba3e 100644
--- a/stem/descriptor/extrainfo_descriptor.py
+++ b/stem/descriptor/extrainfo_descriptor.py
@@ -166,6 +166,15 @@ RELAY_EXTRAINFO_FOOTER = (
   ('router-signature', '\n-BEGIN SIGNATURE-%s-END SIGNATURE-' 
% CRYPTO_BLOB),
 )
 
+BRIDGE_EXTRAINFO_HEADER = (
+  ('extra-info', 'ec2bridgereaac65a3 
1EC248422B57D9C0BD751892FE787585407479A4'),
+  ('published', '2012-05-05 17:03:50'),
+)
+
+BRIDGE_EXTRAINFO_FOOTER = (
+  ('router-digest', '006FD96BA35E7785A6A3B8B75FE2E2435A13BDB4'),
+)
+
 
 _timestamp_re = re.compile('^(.*) \(([0-9]+) s\)( .*)?$')
 _locale_re = re.compile('^[a-zA-Z0-9\?]{2}$')
@@ -961,6 +970,10 @@ class BridgeExtraInfoDescriptor(ExtraInfoDescriptor):
 'router-digest': _parse_router_digest_line,
   })
 
+  @classmethod
+  def content(cls, attr = None, exclude = ()):
+return _descriptor_content(attr, exclude, BRIDGE_EXTRAINFO_HEADER, 
BRIDGE_EXTRAINFO_FOOTER)
+
   def digest(self):
 return self._digest
 
diff --git a/test/mocking.py b/test/mocking.py
index dc08a61..ce9a458 100644
--- a/test/mocking.py
+++ b/test/mocking.py
@@ -16,9 +16,6 @@ Helper functions for creating mock objects.
 stem.descriptor.microdescriptor
   get_microdescriptor - Microdescriptor
 
-stem.descriptor.extrainfo_descriptor
-  get_bridge_extrainfo_descriptor - BridgeExtraInfoDescriptor
-
 stem.descriptor.networkstatus
   get_directory_authority- DirectoryAuthority
   get_key_certificate- KeyCertificate
@@ -75,15 +72,6 @@ DOC_SIG = stem.descriptor.networkstatus.DocumentSignature(
   'BF112F1C6D5543CFD0A32215ACABD4197B5279AD',
   '-BEGIN SIGNATURE-%s-END SIGNATURE-' % CRYPTO_BLOB)
 
-BRIDGE_EXTRAINFO_HEADER = (
-  ('extra-info', 'ec2bridgereaac65a3 
1EC248422B57D9C0BD751892FE787585407479A4'),
-  ('published', '2012-05-05 17:03:50'),
-)
-
-BRIDGE_EXTRAINFO_FOOTER = (
-  ('router-digest', '006FD96BA35E7785A6A3B8B75FE2E2435A13BDB4'),
-)
-
 MICRODESCRIPTOR = (
   ('onion-key', '\n-BEGIN RSA PUBLIC KEY-%s-END RSA PUBLIC 
KEY-' % CRYPTO_BLOB),
 )
@@ -331,26 +319,6 @@ def _get_descriptor_content(attr = None, exclude = (), 
header_template = (), foo
   return stem.util.str_tools._to_bytes('\n'.join(header_content + remainder + 
footer_content))
 
 
-def get_bridge_extrainfo_descriptor(attr = None, exclude = (), content = 
False):
-  """
-  Provides the descriptor content for...
-  stem.descriptor.extrainfo_descriptor.BridgeExtraInfoDescriptor
-
-  :param dict attr: keyword/value mappings to be included in the descriptor
-  :param list exclude: mandatory keywords to exclude from the descriptor
-  :param bool content: provides the str content of the descriptor rather than 
the class if True
-
-  :returns: BridgeExtraInfoDescriptor for the requested descriptor content
-  """
-
-  desc_content = _get_descriptor_content(attr, exclude, 
BRIDGE_EXTRAINFO_HEADER, BRIDGE_EXTRAINFO_FOOTER)
-
-  if content:
-return desc_content
-  else:
-return 
stem.descriptor.extrainfo_descriptor.BridgeExtraInfoDescriptor(desc_content, 
validate = True)
-
-
 def get_microdescriptor(attr = None, exclude = (), content = False):
   """
   Provides the descriptor content for...
diff --git a/test/unit/descriptor/extrainfo_descriptor.py 
b/test/unit/descriptor/extrainfo_descriptor.py
index 61f5ee7..2269000 100644
--- a/test/unit/descriptor/extrainfo_descriptor.py
+++ b/test/unit/descriptor/extrainfo_descriptor.py
@@ -8,9 +8,14 @@ import unittest
 
 import stem.descriptor
 
-from stem.descriptor.extrainfo_descriptor import RelayExtraInfoDescriptor, 
DirResponse, DirStat
+from stem.descriptor.extrainfo_descriptor import (
+  RelayExtraInfoDescriptor,
+  BridgeExtraInfoDescriptor,
+  DirResponse,
+  DirStat,
+)
 
-from test.mocking import get_bridge_extrainfo_descriptor, CRYPTO_BLOB
+from test.mocking import CRYPTO_BLOB
 
 from test.unit.descriptor import get_resource
 
@@ -677,7 +682,7 @@ 
k0d2aofcVbHr4fPQOSST0LXDrhFl5Fqo5um296zpJGvRUeO6S44U/EfJAGShtqWw
 Basic sanity check that we can parse a descriptor with minimal attributes.
 """
 
-desc = get_bridge_extrainfo_descriptor()
+desc = BridgeExtraInfoDescriptor.create()
 
 self.assertEqual('ec2bridgereaac65a3', desc.nickname)
 self.assertEqual('1EC248422B57D9C0BD751892FE787585407479A4', 
desc.fingerprint)
@@ -692,13 +697,13 @@ 
k0d2aofcVbHr4fPQOSST0LXDrhFl5Fqo5um296zpJGvRUeO6S44U/EfJAGShtqWw
 Parses the 'bridge-ip-versions' line, which only ap

[tor-commits] [stem/master] RelayDescriptor creation

2017-05-02 Thread atagar
commit dafb4a6a96c0c1eb138a7c7d9499c5577864dc67
Author: Damian Johnson 
Date:   Sun Apr 30 16:37:16 2017 -0700

RelayDescriptor creation

Implementing a function for creating our first descriptor type (relay server
descriptors). This replacing our mocking util's 
get_relay_server_descriptor()
with RelayDescriptor.create() and RelayDescriptor.content().

This is a little different from the API I was previously planning on but 
think
I like this better.
---
 stem/descriptor/__init__.py   | 154 --
 stem/descriptor/server_descriptor.py  |  30 +-
 test/mocking.py   |  41 
 test/unit/descriptor/export.py|  14 +--
 test/unit/descriptor/server_descriptor.py |  95 --
 test/unit/tutorial.py |   8 +-
 test/unit/tutorial_examples.py|  10 +-
 7 files changed, 188 insertions(+), 164 deletions(-)

diff --git a/stem/descriptor/__init__.py b/stem/descriptor/__init__.py
index d50b661..32b7d7c 100644
--- a/stem/descriptor/__init__.py
+++ b/stem/descriptor/__init__.py
@@ -18,22 +18,6 @@ Package for parsing and processing descriptor data.
 |- get_unrecognized_lines - unparsed descriptor content
 +- __str__ - string that the descriptor was made from
 
-.. data:: DescriptorType (enum)
-
-  Common descriptor types.
-
-  .. versionadded:: 1.6.0
-
-  === ===
-  DescriptorType  Description
-  === ===
-  **SERVER**  
:class:`~stem.descriptor.server_descriptor.RelayDescriptor`
-  **EXTRA**   
:class:`~stem.descriptor.extrainfo_descriptor.RelayExtraInfoDescriptor`
-  **MICRO**   :class:`~stem.descriptor.microdescriptor.Microdescriptor`
-  **CONSENSUS**   
:class:`~stem.descriptor.networkstatus.NetworkStatusDocumentV3`
-  **HIDDEN_SERVICE**  
:class:`~stem.descriptor.hidden_service_descriptor.HiddenServiceDescriptor`
-  === ===
-
 .. data:: DocumentHandler (enum)
 
   Ways in which we can parse a
@@ -97,20 +81,18 @@ PGP_BLOCK_START = re.compile('^-BEGIN ([%s%s]+)-$' 
% (KEYWORD_CHAR, WHIT
 PGP_BLOCK_END = '-END %s-'
 EMPTY_COLLECTION = ([], {}, set())
 
+CRYPTO_BLOB = """
+MIGJAoGBAJv5IIWQ+WDWYUdyA/0L8qbIkEVH/cwryZWoIaPAzINfrw1WfNZGtBmg
+skFtXhOHHqTRN4GPPrZsAIUOQGzQtGb66IQgT4tO/pj+P6QmSCCdTfhvGfgTCsC+
+WPi4Fl2qryzTb3QO5r5x7T8OsG2IBUET1bLQzmtbC560SYR49IvVAgMBAAE=
+"""
+
 DocumentHandler = stem.util.enum.UppercaseEnum(
   'ENTRIES',
   'DOCUMENT',
   'BARE_DOCUMENT',
 )
 
-DescriptorType = stem.util.enum.Enum(
-  ('SERVER', 'server-descriptor 1.0'),
-  ('EXTRAINFO', 'extra-info 1.0'),
-  ('MICRO', 'microdescriptor 1.0'),
-  ('CONSENSUS', 'network-status-consensus-3 1.0'),
-  ('HIDDEN_SERVICE', 'hidden-service-descriptor 1.0'),
-)
-
 
 def parse_file(descriptor_file, descriptor_type = None, validate = False, 
document_handler = DocumentHandler.ENTRIES, normalize_newlines = None, 
**kwargs):
   """
@@ -353,39 +335,64 @@ def _parse_metrics_file(descriptor_type, major_version, 
minor_version, descripto
 raise TypeError("Unrecognized metrics descriptor format. type: '%s', 
version: '%i.%i'" % (descriptor_type, major_version, minor_version))
 
 
-def create(desc_type, attr = None, exclude = (), validate = False, sign = 
False):
+def _descriptor_content(attr = None, exclude = (), header_template = (), 
footer_template = ()):
   """
-  Creates a descriptor with the given attributes.
+  Constructs a minimal descriptor with the given attributes. The content we
+  provide back is of the form...
 
-  .. versionadded:: 1.6.0
+  * header_template (with matching attr filled in)
+  * unused attr entries
+  * footer_template (with matching attr filled in)
 
-  :param DescriptorType desc_type: type of descriptor to be created
-  :param dict attr: keyword/value mappings to be included in the descriptor
-  :param list exclude: mandatory keywords to exclude from the descriptor, this
-results in an invalid descriptor
-  :param bool validate: checks the validity of the descriptor's content if
-**True**, skips these checks otherwise
-  :param bool sign_content: includes cryptographic digest if True
+  So for instance...
+
+  ::
 
-  :returns: :class:`~stem.descriptor.Descriptor` subclass
+_descriptor_content(
+  attr = {'nickname': 'caerSidi', 'contact': 'atagar'},
+  header_template = (
+('nickname', 'foobar'),
+('fingerprint', '12345'),
+  ),
+)
 
-  :raises:
-* **ValueError** if the contents is malformed and validate is True
-* **ImportError** if cryptography is unavailable and sign is True
+  ... would result in...
+
+  ::
+
+nickname caerSidi
+fingerprint 12345
+contact atagar
+
+  :param dict attr: keyword/value mappings to be included in the descriptor
+  :param list exclude: mandatory keywords to exclude from the descriptor
+  :param tuple header_template: key/value pairs for mandatory fields 

[tor-commits] [stem/master] Merge remaining mocking module into util

2017-05-02 Thread atagar
commit b164478ea9c0275bc668cef32e84f4026c05a246
Author: Damian Johnson 
Date:   Tue May 2 09:37:47 2017 -0700

Merge remaining mocking module into util

Without descriptor creation there's really not much left. Merging the few
remaining helpers into the util module.
---
 test/__init__.py   |   3 +-
 test/integ/control/base_controller.py  |   4 +-
 test/integ/control/controller.py   |  10 +--
 test/integ/socket/control_message.py   |   4 +-
 test/mocking.py| 118 
 test/unit/connection/authentication.py |   9 +--
 test/unit/control/controller.py|   7 +-
 test/unit/doctest.py   |   3 +-
 test/unit/interpreter/commands.py  |  11 +--
 test/unit/response/add_onion.py|  14 ++--
 test/unit/response/authchallenge.py|   6 +-
 test/unit/response/events.py   |   5 +-
 test/unit/response/getconf.py  |  14 ++--
 test/unit/response/getinfo.py  |  16 ++---
 test/unit/response/mapaddress.py   |  14 ++--
 test/unit/response/protocolinfo.py |  25 +++
 test/unit/response/singleline.py   |  12 ++--
 test/unit/tutorial_examples.py |   5 +-
 test/unit/util/proc.py |   5 +-
 test/util.py   | 120 ++---
 20 files changed, 195 insertions(+), 210 deletions(-)

diff --git a/test/__init__.py b/test/__init__.py
index 7ab0853..8ea70d2 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -6,10 +6,9 @@ Unit and integration tests for the stem library.
 """
 
 __all__ = [
-  'mocking',
   'network',
   'output',
   'prompt',
   'runner',
-  'utils',
+  'util',
 ]
diff --git a/test/integ/control/base_controller.py 
b/test/integ/control/base_controller.py
index 0a51e1f..1e64445 100644
--- a/test/integ/control/base_controller.py
+++ b/test/integ/control/base_controller.py
@@ -11,8 +11,8 @@ import stem.control
 import stem.socket
 import stem.util.system
 
-import test.mocking
 import test.runner
+import test.util
 
 from test.util import require_controller
 
@@ -154,7 +154,7 @@ class TestBaseController(unittest.TestCase):
   controller.msg('SETEVENTS CONF_CHANGED')
 
   for i in range(10):
-controller.msg('SETCONF NodeFamily=%s' % 
test.mocking.random_fingerprint())
+controller.msg('SETCONF NodeFamily=%s' % 
test.util.random_fingerprint())
 test.runner.exercise_controller(self, controller)
 
   controller.msg('SETEVENTS')
diff --git a/test/integ/control/controller.py b/test/integ/control/controller.py
index 48a50fe..895d435 100644
--- a/test/integ/control/controller.py
+++ b/test/integ/control/controller.py
@@ -18,7 +18,6 @@ import stem.response.protocolinfo
 import stem.socket
 import stem.util.str_tools
 import stem.version
-import test.mocking
 import test.network
 import test.runner
 
@@ -29,6 +28,7 @@ from stem.version import Requirement
 
 from test.util import (
   register_new_capability,
+  random_fingerprint,
   tor_version,
   only_run_once,
   require_controller,
@@ -150,7 +150,7 @@ class TestController(unittest.TestCase):
   controller.add_event_listener(listener2, EventType.CONF_CHANGED, 
EventType.DEBUG)
 
   # The NodeFamily is a harmless option we can toggle
-  controller.set_conf('NodeFamily', test.mocking.random_fingerprint())
+  controller.set_conf('NodeFamily', random_fingerprint())
 
   # Wait for the event. Assert that we get it within 10 seconds
   event_notice1.wait(10)
@@ -167,7 +167,7 @@ class TestController(unittest.TestCase):
 
   buffer2_size = len(event_buffer2)
 
-  controller.set_conf('NodeFamily', test.mocking.random_fingerprint())
+  controller.set_conf('NodeFamily', random_fingerprint())
   event_notice1.wait(10)
   self.assertEqual(len(event_buffer1), 2)
   event_notice1.clear()
@@ -204,7 +204,7 @@ class TestController(unittest.TestCase):
 
   # trigger an event
 
-  controller.set_conf('NodeFamily', test.mocking.random_fingerprint())
+  controller.set_conf('NodeFamily', random_fingerprint())
   event_notice.wait(4)
   self.assertTrue(len(event_buffer) >= 1)
 
@@ -217,7 +217,7 @@ class TestController(unittest.TestCase):
   controller.connect()
   controller.authenticate(password = test.runner.CONTROL_PASSWORD)
   self.assertTrue(len(event_buffer) == 0)
-  controller.set_conf('NodeFamily', test.mocking.random_fingerprint())
+  controller.set_conf('NodeFamily', random_fingerprint())
 
   event_notice.wait(4)
   self.assertTrue(len(event_buffer) >= 1)
diff --git a/test/integ/socket/control_message.py 
b/test/integ/socket/control_message.py
index 13075ca..646f732 100644
--- a/test/integ/socket/control_message.py
+++ b/test/integ/socket/control_message.py
@@ -7,12 +7,12 @@ import unittest
 
 import stem.socket
 import stem.version
-import test.mocking
 import test.runner
 
 from test.util import (
   require_controller,
   require_ve

[tor-commits] [stem/master] Describe descriptor creation in our tutorials

2017-05-02 Thread atagar
commit 5caf80b2bd39964599ce70b5acca9e224c0f3b93
Author: Damian Johnson 
Date:   Tue May 2 12:50:14 2017 -0700

Describe descriptor creation in our tutorials

Noting our new capability in our tutorials with a couple examples.
---
 docs/_static/example/create_descriptor.py |  9 +
 docs/_static/example/create_descriptor_content.py |  3 ++
 docs/change_log.rst   |  1 +
 docs/tutorials/mirror_mirror_on_the_wall.rst  | 40 +++
 4 files changed, 53 insertions(+)

diff --git a/docs/_static/example/create_descriptor.py 
b/docs/_static/example/create_descriptor.py
new file mode 100644
index 000..29c5654
--- /dev/null
+++ b/docs/_static/example/create_descriptor.py
@@ -0,0 +1,9 @@
+from stem.descriptor.server_descriptor import RelayDescriptor
+
+# prints 'caerSidi (71.35.133.197:9001)'
+desc = RelayDescriptor.create()
+print("%s (%s:%s)" % (desc.nickname, desc.address, desc.or_port))
+
+# prints 'demo (127.0.0.1:80)'
+desc = RelayDescriptor.create({'router': 'demo 127.0.0.1 80 0 0'})
+print("%s (%s:%s)" % (desc.nickname, desc.address, desc.or_port))
diff --git a/docs/_static/example/create_descriptor_content.py 
b/docs/_static/example/create_descriptor_content.py
new file mode 100644
index 000..e4a9f2b
--- /dev/null
+++ b/docs/_static/example/create_descriptor_content.py
@@ -0,0 +1,3 @@
+from stem.descriptor.server_descriptor import RelayDescriptor
+
+print(RelayDescriptor.content({'router': 'demo 127.0.0.1 80 0 0'}))
diff --git a/docs/change_log.rst b/docs/change_log.rst
index f8985f9..b99d0b4 100644
--- a/docs/change_log.rst
+++ b/docs/change_log.rst
@@ -53,6 +53,7 @@ The following are only available within Stem's `git repository
 
  * **Descriptors**
 
+  * Supporting `descriptor creation 
`_ 
(:trac:`10227`)
   * Support and validation for `ed25519 certificates 
`_ (`spec 
`_, :trac:`21558`)
   * Moved from the deprecated `pycrypto 
`_ module to `cryptography 
`_ for validating signatures 
(:trac:`21086`)
   * Sped descriptor reading by ~25% by deferring defaulting when validating
diff --git a/docs/tutorials/mirror_mirror_on_the_wall.rst 
b/docs/tutorials/mirror_mirror_on_the_wall.rst
index 9d018fc..d9ba6e0 100644
--- a/docs/tutorials/mirror_mirror_on_the_wall.rst
+++ b/docs/tutorials/mirror_mirror_on_the_wall.rst
@@ -9,6 +9,7 @@ with what they are and where to get them then you may want to 
skip to the end.
 * :ref:`where-can-i-get-the-current-descriptors`
 * :ref:`where-can-i-get-past-descriptors`
 * :ref:`can-i-get-descriptors-from-the-tor-process`
+* :ref:`can-i-create-descriptors`
 * :ref:`validating-the-descriptors-content`
 * :ref:`saving-and-loading-descriptors`
 * :ref:`putting-it-together`
@@ -164,6 +165,45 @@ through Tor's control socket...
 
 .. _validating-the-descriptors-content:
 
+.. _can-i-create-descriptors:
+
+Can I create descriptors?
+-
+
+Besides reading descriptors you can create them too. This is most commonly done
+for test data. To do so simply use the
+:func:`~stem.descriptor.__init__.Descriptor.create` method of
+:class:`~stem.descriptor.__init__.Descriptor` subclasses...
+
+.. literalinclude:: /_static/example/create_descriptor.py
+   :language: python
+
+Unspecified mandatory fields are filled with mock data. You can also use
+:func:`~stem.descriptor.__init__.Descriptor.content` to get a string
+descriptor...
+
+.. literalinclude:: /_static/example/create_descriptor_content.py
+   :language: python
+
+::
+
+  router demo 127.0.0.1 80 0 0
+  published 2012-03-01 17:15:27
+  bandwidth 153600 256000 104590
+  reject *:*
+  onion-key
+  -BEGIN RSA PUBLIC KEY-
+  MIGJAoGBAJv5IIWQ+WDWYUdyA/0L8qbIkEVH/cwryZWoIaPAzINfrw1WfNZGtBmg
+  skFtXhOHHqTRN4GPPrZsAIUOQGzQtGb66IQgT4tO/pj+P6QmSCCdTfhvGfgTCsC+
+  WPi4Fl2qryzTb3QO5r5x7T8OsG2IBUET1bLQzmtbC560SYR49IvVAgMBAAE=
+  -END RSA PUBLIC KEY-
+  signing-key
+  ...
+
+**Note:** Stem doesn't yet support signing its descriptors (:trac:`10227`).
+Until it does try using `leekspin `_
+instead.
+
 Validating the descriptor's content
 ---
 



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


[tor-commits] [stem/master] expect_invalid_attr() testing helper

2017-05-02 Thread atagar
commit 13224f9ecda24fd8b56af6a3f9f8a4a897191a61
Author: Damian Johnson 
Date:   Mon May 1 11:49:08 2017 -0700

expect_invalid_attr() testing helper

Four unit test modules define their own nearly identical 
_expect_invalid_attr()
helper. Creating a unified one they can share. Presently I can only swap 
two of
the modules over because it requires create(). I'll migrate the rest as we 
add
it.
---
 test/unit/descriptor/__init__.py | 25 
 test/unit/descriptor/extrainfo_descriptor.py | 90 +---
 test/unit/descriptor/server_descriptor.py| 60 +++
 3 files changed, 76 insertions(+), 99 deletions(-)

diff --git a/test/unit/descriptor/__init__.py b/test/unit/descriptor/__init__.py
index b7696ac..cd35ae1 100644
--- a/test/unit/descriptor/__init__.py
+++ b/test/unit/descriptor/__init__.py
@@ -23,3 +23,28 @@ def get_resource(filename):
   """
 
   return os.path.join(DESCRIPTOR_TEST_DATA, filename)
+
+
+def base_expect_invalid_attr(cls, default_attr, default_value, test, 
desc_attrs, attr = None, expected_value = None):
+  return base_expect_invalid_attr_for_text(cls, default_attr, default_value, 
test, cls.content(desc_attrs), attr, expected_value)
+
+
+def base_expect_invalid_attr_for_text(cls, default_attr, default_value, test, 
desc_text, attr = None, expected_value = None):
+  """
+  Asserts that construction will fail due to desc_text having a malformed
+  attribute. If an attr is provided then we check that it matches an expected
+  value when we're constructed without validation.
+  """
+
+  test.assertRaises(ValueError, cls, desc_text, True)
+  desc = cls(desc_text, validate = False)
+
+  if attr:
+# check that the invalid attribute matches the expected value when
+# constructed without validation
+
+test.assertEqual(expected_value, getattr(desc, attr))
+  elif default_attr and default_value:
+test.assertEqual(default_value, getattr(desc, default_attr))  # check a 
default attribute
+
+  return desc
diff --git a/test/unit/descriptor/extrainfo_descriptor.py 
b/test/unit/descriptor/extrainfo_descriptor.py
index 2269000..a59d0f0 100644
--- a/test/unit/descriptor/extrainfo_descriptor.py
+++ b/test/unit/descriptor/extrainfo_descriptor.py
@@ -3,6 +3,7 @@ Unit tests for stem.descriptor.extrainfo_descriptor.
 """
 
 import datetime
+import functools
 import re
 import unittest
 
@@ -15,9 +16,14 @@ from stem.descriptor.extrainfo_descriptor import (
   DirStat,
 )
 
-from test.mocking import CRYPTO_BLOB
+from test.unit.descriptor import (
+  get_resource,
+  base_expect_invalid_attr,
+  base_expect_invalid_attr_for_text,
+)
 
-from test.unit.descriptor import get_resource
+expect_invalid_attr = functools.partial(base_expect_invalid_attr, 
RelayExtraInfoDescriptor, 'nickname', 'ninja')
+expect_invalid_attr_for_text = 
functools.partial(base_expect_invalid_attr_for_text, RelayExtraInfoDescriptor, 
'nickname', 'ninja')
 
 
 class TestExtraInfoDescriptor(unittest.TestCase):
@@ -191,7 +197,7 @@ 
k0d2aofcVbHr4fPQOSST0LXDrhFl5Fqo5um296zpJGvRUeO6S44U/EfJAGShtqWw
 desc = RelayExtraInfoDescriptor.create()
 self.assertEqual('ninja', desc.nickname)
 self.assertEqual('B2289C3EAB83ECD6EB916A2F481A02E6B76A0A48', 
desc.fingerprint)
-self.assertTrue(CRYPTO_BLOB in desc.signature)
+self.assertTrue(stem.descriptor.CRYPTO_BLOB in desc.signature)
 
   def test_unrecognized_line(self):
 """
@@ -206,16 +212,14 @@ 
k0d2aofcVbHr4fPQOSST0LXDrhFl5Fqo5um296zpJGvRUeO6S44U/EfJAGShtqWw
 Includes a line prior to the 'extra-info' entry.
 """
 
-desc_text = b'exit-streams-opened port=80\n' + 
RelayExtraInfoDescriptor.content()
-self._expect_invalid_attr(desc_text)
+expect_invalid_attr_for_text(self, b'exit-streams-opened port=80\n' + 
RelayExtraInfoDescriptor.content())
 
   def test_trailing_line(self):
 """
 Includes a line after the 'router-signature' entry.
 """
 
-desc_text = RelayExtraInfoDescriptor.content() + b'\nexit-streams-opened 
port=80'
-self._expect_invalid_attr(desc_text)
+expect_invalid_attr_for_text(self, RelayExtraInfoDescriptor.content() + 
b'\nexit-streams-opened port=80')
 
   def test_extrainfo_line_missing_fields(self):
 """
@@ -232,8 +236,7 @@ 
k0d2aofcVbHr4fPQOSST0LXDrhFl5Fqo5um296zpJGvRUeO6S44U/EfJAGShtqWw
 )
 
 for entry in test_entries:
-  desc_text = RelayExtraInfoDescriptor.content({'extra-info': entry})
-  desc = self._expect_invalid_attr(desc_text, 'nickname')
+  desc = expect_invalid_attr(self, {'extra-info': entry}, 'nickname')
   self.assertEqual(None, desc.nickname)
   self.assertEqual(None, desc.fingerprint)
 
@@ -259,11 +262,8 @@ 
k0d2aofcVbHr4fPQOSST0LXDrhFl5Fqo5um296zpJGvRUeO6S44U/EfJAGShtqWw
 )
 
 for entry in test_entries:
-  desc_text = RelayExtraInfoDescriptor.content({'geoip-db-digest': entry})
-  self._expect_invalid_attr(desc_text, 'geoip_db_digest')
-
-  desc_text = RelayExtraInfoDescr

[tor-commits] [stem/master] Note how to get hidden service descriptors

2017-05-02 Thread atagar
commit 5681ad9fc5af54b23aa6227d4688e1ab183ddaa4
Author: Damian Johnson 
Date:   Mon May 1 12:37:47 2017 -0700

Note how to get hidden service descriptors
---
 stem/descriptor/hidden_service_descriptor.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/stem/descriptor/hidden_service_descriptor.py 
b/stem/descriptor/hidden_service_descriptor.py
index fb88368..129bc83 100644
--- a/stem/descriptor/hidden_service_descriptor.py
+++ b/stem/descriptor/hidden_service_descriptor.py
@@ -9,6 +9,9 @@ Unlike other descriptor types these describe a hidden service 
rather than a
 relay. They're created by the service, and can only be fetched via relays with
 the HSDir flag.
 
+These are only available through the Controller's
+:func:`~stem.control.get_hidden_service_descriptor` method.
+
 **Module Overview:**
 
 ::
@@ -18,9 +21,6 @@ the HSDir flag.
 .. versionadded:: 1.4.0
 """
 
-# TODO: Add a description for how to retrieve them when tor supports that
-# (#14847) and then update #15009.
-
 import base64
 import binascii
 import collections



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


[tor-commits] [stem/master] Drop sign_descriptor_content() testing helper

2017-05-02 Thread atagar
commit 6bc661515d20e733b730ea6722a4e3d3e72adddb
Author: Damian Johnson 
Date:   Sun Apr 30 23:36:42 2017 -0700

Drop sign_descriptor_content() testing helper

This helper wasn't used by our tests any longer, and on reflection I can't 
make
the router-signature it generates pass validation. There's one clear bug 
that
slipped in a while ago: "b'b'.join()" should be "b'\n'.join()". But 
correcting
that didn't make the function work.

For now just dropping the broken helper. It would be swt to be able to 
sign
the descriptors we create but that's gonna take a bit of work.
---
 stem/descriptor/__init__.py  |  13 ++---
 stem/descriptor/server_descriptor.py |   6 +-
 test/mocking.py  | 108 ---
 test/unit/tutorial.py|   2 -
 4 files changed, 7 insertions(+), 122 deletions(-)

diff --git a/stem/descriptor/__init__.py b/stem/descriptor/__init__.py
index 32b7d7c..c790e65 100644
--- a/stem/descriptor/__init__.py
+++ b/stem/descriptor/__init__.py
@@ -530,7 +530,7 @@ class Descriptor(object):
 self._unrecognized_lines = []
 
   @classmethod
-  def content(cls, attr = None, exclude = (), sign = False):
+  def content(cls, attr = None, exclude = ()):
 """
 Creates descriptor content with the given attributes. Mandatory fields are
 filled with dummy information unless data is supplied.
@@ -540,19 +540,16 @@ class Descriptor(object):
 :param dict attr: keyword/value mappings to be included in the descriptor
 :param list exclude: mandatory keywords to exclude from the descriptor, 
this
   results in an invalid descriptor
-:param bool sign_content: includes cryptographic digest if True
 
 :returns: **str** with the content of a descriptor
 
-:raises:
-  * **ImportError** if cryptography is unavailable and sign is True
-  * **NotImplementedError** if not implemented for this descriptor type
+:raises: **NotImplementedError** if not implemented for this descriptor 
type
 """
 
 raise NotImplementedError("The create and content methods haven't been 
implemented for %s" % cls.__name__)
 
   @classmethod
-  def create(cls, attr = None, exclude = (), validate = True, sign = False):
+  def create(cls, attr = None, exclude = (), validate = True):
 """
 Creates a descriptor with the given attributes. Mandatory fields are filled
 with dummy information unless data is supplied.
@@ -564,17 +561,15 @@ class Descriptor(object):
   results in an invalid descriptor
 :param bool validate: checks the validity of the descriptor's content if
   **True**, skips these checks otherwise
-:param bool sign_content: includes cryptographic digest if True
 
 :returns: :class:`~stem.descriptor.Descriptor` subclass
 
 :raises:
   * **ValueError** if the contents is malformed and validate is True
-  * **ImportError** if cryptography is unavailable and sign is True
   * **NotImplementedError** if not implemented for this descriptor type
 """
 
-return cls(cls.content(attr, exclude, sign), validate = validate)
+return cls(cls.content(attr, exclude), validate = validate)
 
   def get_path(self):
 """
diff --git a/stem/descriptor/server_descriptor.py 
b/stem/descriptor/server_descriptor.py
index 9f7c846..b4dcd23 100644
--- a/stem/descriptor/server_descriptor.py
+++ b/stem/descriptor/server_descriptor.py
@@ -809,12 +809,12 @@ class RelayDescriptor(ServerDescriptor):
 self.certificate.validate(self)
 
   @classmethod
-  def content(cls, attr = None, exclude = (), sign = False):
+  def content(cls, attr = None, exclude = ()):
 return _descriptor_content(attr, exclude, RELAY_SERVER_HEADER, 
RELAY_SERVER_FOOTER)
 
   @classmethod
-  def create(cls, attr = None, exclude = (), validate = True, sign = False):
-return cls(cls.content(attr, exclude, sign), validate = validate, 
skip_crypto_validation = not sign)
+  def create(cls, attr = None, exclude = (), validate = True):
+return cls(cls.content(attr, exclude), validate = validate, 
skip_crypto_validation = True)
 
   @lru_cache()
   def digest(self):
diff --git a/test/mocking.py b/test/mocking.py
index 4843a97..990aa89 100644
--- a/test/mocking.py
+++ b/test/mocking.py
@@ -663,111 +663,3 @@ def get_network_status_document_v3(attr = None, exclude = 
(), authorities = None
 return desc_content
   else:
 return stem.descriptor.networkstatus.NetworkStatusDocumentV3(desc_content, 
validate = True)
-
-
-def sign_descriptor_content(desc_content):
-  """
-  Add a valid signature to the supplied descriptor string.
-
-  If cryptography is available the function will generate a key pair, and use
-  it to sign the descriptor string. Any existing fingerprint, signing-key or
-  router-signature data will be overwritten. If the library's unavailable the
-  code will return the unaltered descriptor.
-
-  :param str desc_content: the descriptor string to sign
-  :returns

[tor-commits] [stem/master] Rename _get_descriptor_components()

2017-05-02 Thread atagar
commit 90cb14b9e0d46a38e522d0e2d29f67099822cee1
Author: Damian Johnson 
Date:   Mon May 1 11:59:29 2017 -0700

Rename _get_descriptor_components()

When able we're dropping the 'get_' prefix from methods. This one's private 
so
trivial to tweak.
---
 stem/descriptor/__init__.py  |  2 +-
 stem/descriptor/extrainfo_descriptor.py  |  4 ++--
 stem/descriptor/hidden_service_descriptor.py |  6 +++---
 stem/descriptor/microdescriptor.py   |  4 ++--
 stem/descriptor/networkstatus.py | 12 ++--
 stem/descriptor/router_status_entry.py   |  4 ++--
 stem/descriptor/server_descriptor.py |  4 ++--
 stem/descriptor/tordnsel.py  |  4 ++--
 8 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/stem/descriptor/__init__.py b/stem/descriptor/__init__.py
index 2b8ed5b..c414a4c 100644
--- a/stem/descriptor/__init__.py
+++ b/stem/descriptor/__init__.py
@@ -936,7 +936,7 @@ def _get_pseudo_pgp_block(remaining_contents):
 return None
 
 
-def _get_descriptor_components(raw_contents, validate, extra_keywords = (), 
non_ascii_fields = ()):
+def _descriptor_components(raw_contents, validate, extra_keywords = (), 
non_ascii_fields = ()):
   """
   Initial breakup of the server descriptor contents to make parsing easier.
 
diff --git a/stem/descriptor/extrainfo_descriptor.py 
b/stem/descriptor/extrainfo_descriptor.py
index 848ba3e..2843c8a 100644
--- a/stem/descriptor/extrainfo_descriptor.py
+++ b/stem/descriptor/extrainfo_descriptor.py
@@ -82,7 +82,7 @@ from stem.descriptor import (
   Descriptor,
   _descriptor_content,
   _read_until_keywords,
-  _get_descriptor_components,
+  _descriptor_components,
   _value,
   _values,
   _parse_simple_line,
@@ -862,7 +862,7 @@ class ExtraInfoDescriptor(Descriptor):
 """
 
 super(ExtraInfoDescriptor, self).__init__(raw_contents, lazy_load = not 
validate)
-entries = _get_descriptor_components(raw_contents, validate)
+entries = _descriptor_components(raw_contents, validate)
 
 if validate:
   for keyword in self._required_fields():
diff --git a/stem/descriptor/hidden_service_descriptor.py 
b/stem/descriptor/hidden_service_descriptor.py
index 9c87500..fb88368 100644
--- a/stem/descriptor/hidden_service_descriptor.py
+++ b/stem/descriptor/hidden_service_descriptor.py
@@ -33,7 +33,7 @@ import stem.util.str_tools
 from stem.descriptor import (
   PGP_BLOCK_END,
   Descriptor,
-  _get_descriptor_components,
+  _descriptor_components,
   _read_until_keywords,
   _bytes_for_block,
   _value,
@@ -232,7 +232,7 @@ class HiddenServiceDescriptor(Descriptor):
 
   def __init__(self, raw_contents, validate = False):
 super(HiddenServiceDescriptor, self).__init__(raw_contents, lazy_load = 
not validate)
-entries = _get_descriptor_components(raw_contents, validate, 
non_ascii_fields = ('introduction-points'))
+entries = _descriptor_components(raw_contents, validate, non_ascii_fields 
= ('introduction-points'))
 
 if validate:
   for keyword in REQUIRED_FIELDS:
@@ -371,7 +371,7 @@ class HiddenServiceDescriptor(Descriptor):
 break  # reached the end
 
   attr = dict(INTRODUCTION_POINTS_ATTR)
-  entries = _get_descriptor_components(content, False)
+  entries = _descriptor_components(content, False)
 
   for keyword, values in list(entries.items()):
 value, block_type, block_contents = values[0]
diff --git a/stem/descriptor/microdescriptor.py 
b/stem/descriptor/microdescriptor.py
index ce3eb08..a1e5346 100644
--- a/stem/descriptor/microdescriptor.py
+++ b/stem/descriptor/microdescriptor.py
@@ -70,7 +70,7 @@ import stem.exit_policy
 
 from stem.descriptor import (
   Descriptor,
-  _get_descriptor_components,
+  _descriptor_components,
   _read_until_keywords,
   _values,
   _parse_simple_line,
@@ -259,7 +259,7 @@ class Microdescriptor(Descriptor):
   def __init__(self, raw_contents, validate = False, annotations = None):
 super(Microdescriptor, self).__init__(raw_contents, lazy_load = not 
validate)
 self._annotation_lines = annotations if annotations else []
-entries = _get_descriptor_components(raw_contents, validate)
+entries = _descriptor_components(raw_contents, validate)
 
 if validate:
   self.digest = hashlib.sha256(self.get_bytes()).hexdigest().upper()
diff --git a/stem/descriptor/networkstatus.py b/stem/descriptor/networkstatus.py
index cb801f0..2b00ebc 100644
--- a/stem/descriptor/networkstatus.py
+++ b/stem/descriptor/networkstatus.py
@@ -66,7 +66,7 @@ from stem.descriptor import (
   PGP_BLOCK_END,
   Descriptor,
   DocumentHandler,
-  _get_descriptor_components,
+  _descriptor_components,
   _read_until_keywords,
   _value,
   _parse_simple_line,
@@ -471,7 +471,7 @@ class NetworkStatusDocumentV2(NetworkStatusDocument):
 
 self.routers = dict((desc.fingerprint, desc) for desc in router_iter)
 
-entries = _get_descriptor_components(document_content + b'\n' + 
document_file.read(), validate)
+   

[tor-commits] [stem/master] DescriptorType enum

2017-05-02 Thread atagar
commit bda32a24cc543d07e3dbc7d993f9ac08517030a9
Author: Damian Johnson 
Date:   Mon Apr 24 09:11:01 2017 -0700

DescriptorType enum

Adding an enumeration for the common descriptor types. This is something I 
want
for descriptor creation, but that aside it can be used for parse so...

  stem.descriptor.parse(my_input, 'server-descriptor 1.0')

... becomes..

  stem.descriptor.parse(my_input, DescriptorType.SERVER)
---
 stem/descriptor/__init__.py | 24 
 1 file changed, 24 insertions(+)

diff --git a/stem/descriptor/__init__.py b/stem/descriptor/__init__.py
index 6e8c5a4..f80e6f6 100644
--- a/stem/descriptor/__init__.py
+++ b/stem/descriptor/__init__.py
@@ -17,6 +17,22 @@ Package for parsing and processing descriptor data.
 |- get_unrecognized_lines - unparsed descriptor content
 +- __str__ - string that the descriptor was made from
 
+.. data:: DescriptorType (enum)
+
+  Common descriptor types.
+
+  .. versionadded:: 1.6.0
+
+  === ===
+  DescriptorType  Description
+  === ===
+  **SERVER**  
:class:`~stem.descriptor.server_descriptor.RelayDescriptor`
+  **EXTRA**   
:class:`~stem.descriptor.extrainfo_descriptor.RelayExtraInfoDescriptor`
+  **MICRO**   :class:`~stem.descriptor.microdescriptor.Microdescriptor`
+  **CONSENSUS**   
:class:`~stem.descriptor.networkstatus.NetworkStatusDocumentV3`
+  **HIDDEN_SERVICE**  
:class:`~stem.descriptor.hidden_service_descriptor.HiddenServiceDescriptor`
+  === ===
+
 .. data:: DocumentHandler (enum)
 
   Ways in which we can parse a
@@ -86,6 +102,14 @@ DocumentHandler = stem.util.enum.UppercaseEnum(
   'BARE_DOCUMENT',
 )
 
+DescriptorType = stem.util.enum.Enum(
+  ('SERVER', 'server-descriptor 1.0'),
+  ('EXTRAINFO', 'extra-info 1.0'),
+  ('MICRO', 'microdescriptor 1.0'),
+  ('CONSENSUS', 'network-status-consensus-3 1.0'),
+  ('HIDDEN_SERVICE', 'hidden-service-descriptor 1.0'),
+)
+
 
 def parse_file(descriptor_file, descriptor_type = None, validate = False, 
document_handler = DocumentHandler.ENTRIES, normalize_newlines = None, 
**kwargs):
   """



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


[tor-commits] [stem/master] Support descriptor creation

2017-05-02 Thread atagar
commit b2a54ada71c9ee1442780d8df4c8ffa892fd285f
Merge: eb70413 5caf80b
Author: Damian Johnson 
Date:   Tue May 2 12:52:45 2017 -0700

Support descriptor creation

We've always supported descriptor creation in our tests but this turns out 
to
be a capability others want too...

  https://trac.torproject.org/projects/tor/ticket/10227

This is done via a simple create() and content() static method on Descriptor
classes...

  RelayDescriptor.create({'router': 'demo 127.0.0.1 80 0 0'})

Isis made her own library for this, which unlike us supports signing
descriptors. Definitely a capability we should incorporate. :P

  https://pypi.python.org/pypi/leekspin
  https://gitweb.torproject.org/user/isis/leekspin.git/

 docs/_static/example/create_descriptor.py  |   9 +
 docs/_static/example/create_descriptor_content.py  |   3 +
 docs/change_log.rst|   1 +
 docs/tutorials/mirror_mirror_on_the_wall.rst   |  40 +
 stem/descriptor/__init__.py| 115 ++-
 stem/descriptor/extrainfo_descriptor.py|  32 +-
 stem/descriptor/hidden_service_descriptor.py   |  43 +-
 stem/descriptor/microdescriptor.py |  14 +-
 stem/descriptor/networkstatus.py   | 161 +++-
 stem/descriptor/router_status_entry.py |  32 +-
 stem/descriptor/server_descriptor.py   |  46 +-
 stem/descriptor/tordnsel.py|   4 +-
 test/__init__.py   |   3 +-
 test/integ/control/base_controller.py  |   4 +-
 test/integ/control/controller.py   |  10 +-
 test/integ/socket/control_message.py   |   4 +-
 test/mocking.py| 814 -
 test/unit/connection/authentication.py |   9 +-
 test/unit/control/controller.py|   7 +-
 test/unit/descriptor/__init__.py   |  25 +
 test/unit/descriptor/export.py |  20 +-
 test/unit/descriptor/extrainfo_descriptor.py   | 158 ++--
 test/unit/descriptor/hidden_service_descriptor.py  |  65 +-
 test/unit/descriptor/microdescriptor.py|  41 +-
 .../networkstatus/directory_authority.py   |  43 +-
 test/unit/descriptor/networkstatus/document_v2.py  |  12 +-
 test/unit/descriptor/networkstatus/document_v3.py  | 171 +++--
 .../descriptor/networkstatus/key_certificate.py|  47 +-
 test/unit/descriptor/router_status_entry.py| 118 ++-
 test/unit/descriptor/server_descriptor.py  | 152 ++--
 test/unit/doctest.py   |   3 +-
 test/unit/interpreter/commands.py  |  11 +-
 test/unit/response/add_onion.py|  14 +-
 test/unit/response/authchallenge.py|   6 +-
 test/unit/response/events.py   |  12 +-
 test/unit/response/getconf.py  |  14 +-
 test/unit/response/getinfo.py  |  16 +-
 test/unit/response/mapaddress.py   |  14 +-
 test/unit/response/protocolinfo.py |  25 +-
 test/unit/response/singleline.py   |  12 +-
 test/unit/tutorial.py  |  23 +-
 test/unit/tutorial_examples.py |  37 +-
 test/unit/util/proc.py |   5 +-
 test/util.py   | 120 ++-
 44 files changed, 1075 insertions(+), 1440 deletions(-)

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


[tor-commits] [stem/master] HidenServiceDescriptor creation

2017-05-02 Thread atagar
commit cf869a877683254ca7b262a989551bc9c6b76204
Author: Damian Johnson 
Date:   Mon May 1 12:56:36 2017 -0700

HidenServiceDescriptor creation
---
 stem/descriptor/hidden_service_descriptor.py  | 31 ++-
 test/mocking.py   | 51 --
 test/unit/descriptor/hidden_service_descriptor.py | 65 ---
 3 files changed, 52 insertions(+), 95 deletions(-)

diff --git a/stem/descriptor/hidden_service_descriptor.py 
b/stem/descriptor/hidden_service_descriptor.py
index 129bc83..a3b12b5 100644
--- a/stem/descriptor/hidden_service_descriptor.py
+++ b/stem/descriptor/hidden_service_descriptor.py
@@ -31,8 +31,10 @@ import stem.util.connection
 import stem.util.str_tools
 
 from stem.descriptor import (
+  CRYPTO_BLOB,
   PGP_BLOCK_END,
   Descriptor,
+  _descriptor_content,
   _descriptor_components,
   _read_until_keywords,
   _bytes_for_block,
@@ -80,6 +82,20 @@ SINGLE_INTRODUCTION_POINT_FIELDS = [
 BASIC_AUTH = 1
 STEALTH_AUTH = 2
 
+HIDDEN_SERVICE_HEADER = (
+  ('rendezvous-service-descriptor', 'y3olqqblqw2gbh6phimfuiroechjjafa'),
+  ('version', '2'),
+  ('permanent-key', '\n-BEGIN RSA PUBLIC KEY-%s-END RSA PUBLIC 
KEY-' % CRYPTO_BLOB),
+  ('secret-id-part', 'e24kgecavwsznj7gpbktqsiwgvngsf4e'),
+  ('publication-time', '2015-02-23 20:00:00'),
+  ('protocol-versions', '2,3'),
+  ('introduction-points', '\n-BEGIN MESSAGE-\n-END MESSAGE-'),
+)
+
+HIDDEN_SERVICE_FOOTER = (
+  ('signature', '\n-BEGIN SIGNATURE-%s-END SIGNATURE-' % 
CRYPTO_BLOB),
+)
+
 
 class IntroductionPoints(collections.namedtuple('IntroductionPoints', 
INTRODUCTION_POINTS_ATTR.keys())):
   """
@@ -204,6 +220,9 @@ class HiddenServiceDescriptor(Descriptor):
  Moved from the deprecated `pycrypto
  `_ module to `cryptography
  `_ for validating signatures.
+
+  .. versionchanged:: 1.6.0
+ Added the **skip_crypto_validation** constructor argument.
   """
 
   ATTRIBUTES = {
@@ -230,7 +249,15 @@ class HiddenServiceDescriptor(Descriptor):
 'signature': _parse_signature_line,
   }
 
-  def __init__(self, raw_contents, validate = False):
+  @classmethod
+  def content(cls, attr = None, exclude = ()):
+return _descriptor_content(attr, exclude, HIDDEN_SERVICE_HEADER, 
HIDDEN_SERVICE_FOOTER)
+
+  @classmethod
+  def create(cls, attr = None, exclude = (), validate = True):
+return cls(cls.content(attr, exclude), validate = validate, 
skip_crypto_validation = True)
+
+  def __init__(self, raw_contents, validate = False, skip_crypto_validation = 
False):
 super(HiddenServiceDescriptor, self).__init__(raw_contents, lazy_load = 
not validate)
 entries = _descriptor_components(raw_contents, validate, non_ascii_fields 
= ('introduction-points'))
 
@@ -248,7 +275,7 @@ class HiddenServiceDescriptor(Descriptor):
 
   self._parse(entries, validate)
 
-  if stem.prereq.is_crypto_available():
+  if not skip_crypto_validation and stem.prereq.is_crypto_available():
 signed_digest = self._digest_for_signature(self.permanent_key, 
self.signature)
 content_digest = 
self._digest_for_content(b'rendezvous-service-descriptor ', b'\nsignature\n')
 
diff --git a/test/mocking.py b/test/mocking.py
index f1d859e..09d3631 100644
--- a/test/mocking.py
+++ b/test/mocking.py
@@ -23,17 +23,12 @@ Helper functions for creating mock objects.
   get_router_status_entry_v2   - RouterStatusEntryV2
   get_router_status_entry_v3   - RouterStatusEntryV3
   get_router_status_entry_micro_v3 - RouterStatusEntryMicroV3
-
-stem.descriptor.hidden-service_descriptor
-  get_hidden_service_descriptor - HiddenServiceDescriptor
 """
 
-import base64
 import hashlib
 import itertools
 import os
 import re
-import textwrap
 
 import stem.descriptor.extrainfo_descriptor
 import stem.descriptor.hidden_service_descriptor
@@ -46,12 +41,6 @@ import stem.response
 import stem.util.str_tools
 
 try:
-  # added in python 3.3
-  from unittest.mock import Mock, patch
-except ImportError:
-  from mock import Mock, patch
-
-try:
   # added in python 2.7
   from collections import OrderedDict
 except ImportError:
@@ -138,20 +127,6 @@ NETWORK_STATUS_DOCUMENT_FOOTER = (
   ('directory-signature', '%s %s\n%s' % (DOC_SIG.identity, DOC_SIG.key_digest, 
DOC_SIG.signature)),
 )
 
-HIDDEN_SERVICE_HEADER = (
-  ('rendezvous-service-descriptor', 'y3olqqblqw2gbh6phimfuiroechjjafa'),
-  ('version', '2'),
-  ('permanent-key', '\n-BEGIN RSA PUBLIC KEY-%s-END RSA PUBLIC 
KEY-' % CRYPTO_BLOB),
-  ('secret-id-part', 'e24kgecavwsznj7gpbktqsiwgvngsf4e'),
-  ('publication-time', '2015-02-23 20:00:00'),
-  ('protocol-versions', '2,3'),
-  ('introduction-points', '\n-BEGIN MESSAGE-\n-END MESSAGE-'),
-)
-
-HIDDEN_SERVICE_FOOTER = (
-  ('signature', '\n-BEGIN SIGNATURE-%s-END SIGNATURE-' % 
CRYPTO_BLOB),
-)
-

[tor-commits] [stem/master] RouterStatusEntry creation

2017-05-02 Thread atagar
commit 5245c052ba5cd9cd80d45f7bbda4eade2425d8ba
Author: Damian Johnson 
Date:   Mon May 1 14:08:18 2017 -0700

RouterStatusEntry creation
---
 stem/descriptor/router_status_entry.py|  28 +
 test/mocking.py   |  80 ---
 test/unit/descriptor/networkstatus/document_v3.py |  26 +++--
 test/unit/descriptor/router_status_entry.py   | 118 +-
 test/unit/response/events.py  |   7 +-
 test/unit/tutorial.py |   7 +-
 test/unit/tutorial_examples.py|  18 ++--
 7 files changed, 101 insertions(+), 183 deletions(-)

diff --git a/stem/descriptor/router_status_entry.py 
b/stem/descriptor/router_status_entry.py
index 129f6f7..973f833 100644
--- a/stem/descriptor/router_status_entry.py
+++ b/stem/descriptor/router_status_entry.py
@@ -29,6 +29,7 @@ import stem.util.str_tools
 from stem.descriptor import (
   KEYWORD_LINE,
   Descriptor,
+  _descriptor_content,
   _value,
   _values,
   _descriptor_components,
@@ -36,6 +37,21 @@ from stem.descriptor import (
   _read_until_keywords,
 )
 
+ROUTER_STATUS_ENTRY_V2_HEADER = (
+  ('r', 'caerSidi p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE 
2012-08-06 11:19:31 71.35.150.29 9001 0'),
+)
+
+ROUTER_STATUS_ENTRY_V3_HEADER = (
+  ('r', 'caerSidi p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE 
2012-08-06 11:19:31 71.35.150.29 9001 0'),
+  ('s', 'Fast Named Running Stable Valid'),
+)
+
+ROUTER_STATUS_ENTRY_MICRO_V3_HEADER = (
+  ('r', 'Konata ARIJF2zbqirB9IwsW0mQznccWww 2012-09-24 13:40:40 69.64.48.168 
9001 9030'),
+  ('m', 'aiUklwBrua82obG5AsTX+iEpkjQA2+AQHxZ7GwMfY70'),
+  ('s', 'Fast Guard HSDir Named Running Stable V2Dir Valid'),
+)
+
 _parse_pr_line = _parse_protocol_line('pr', 'protocols')
 
 
@@ -511,6 +527,10 @@ class RouterStatusEntryV2(RouterStatusEntry):
 'digest': (None, _parse_r_line),
   })
 
+  @classmethod
+  def content(cls, attr = None, exclude = ()):
+return _descriptor_content(attr, exclude, ROUTER_STATUS_ENTRY_V2_HEADER)
+
   def _name(self, is_plural = False):
 return 'Router status entries (v2)' if is_plural else 'Router status entry 
(v2)'
 
@@ -604,6 +624,10 @@ class RouterStatusEntryV3(RouterStatusEntry):
 'm': _parse_m_line,
   })
 
+  @classmethod
+  def content(cls, attr = None, exclude = ()):
+return _descriptor_content(attr, exclude, ROUTER_STATUS_ENTRY_V3_HEADER)
+
   def _name(self, is_plural = False):
 return 'Router status entries (v3)' if is_plural else 'Router status entry 
(v3)'
 
@@ -673,6 +697,10 @@ class RouterStatusEntryMicroV3(RouterStatusEntry):
 'pr': _parse_pr_line,
   })
 
+  @classmethod
+  def content(cls, attr = None, exclude = ()):
+return _descriptor_content(attr, exclude, 
ROUTER_STATUS_ENTRY_MICRO_V3_HEADER)
+
   def _name(self, is_plural = False):
 return 'Router status entries (micro v3)' if is_plural else 'Router status 
entry (micro v3)'
 
diff --git a/test/mocking.py b/test/mocking.py
index 09d3631..c88784a 100644
--- a/test/mocking.py
+++ b/test/mocking.py
@@ -18,11 +18,6 @@ Helper functions for creating mock objects.
   get_key_certificate- KeyCertificate
   get_network_status_document_v2 - NetworkStatusDocumentV2
   get_network_status_document_v3 - NetworkStatusDocumentV3
-
-stem.descriptor.router_status_entry
-  get_router_status_entry_v2   - RouterStatusEntryV2
-  get_router_status_entry_v3   - RouterStatusEntryV3
-  get_router_status_entry_micro_v3 - RouterStatusEntryMicroV3
 """
 
 import hashlib
@@ -58,21 +53,6 @@ DOC_SIG = stem.descriptor.networkstatus.DocumentSignature(
   'BF112F1C6D5543CFD0A32215ACABD4197B5279AD',
   '-BEGIN SIGNATURE-%s-END SIGNATURE-' % CRYPTO_BLOB)
 
-ROUTER_STATUS_ENTRY_V2_HEADER = (
-  ('r', 'caerSidi p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE 
2012-08-06 11:19:31 71.35.150.29 9001 0'),
-)
-
-ROUTER_STATUS_ENTRY_V3_HEADER = (
-  ('r', 'caerSidi p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE 
2012-08-06 11:19:31 71.35.150.29 9001 0'),
-  ('s', 'Fast Named Running Stable Valid'),
-)
-
-ROUTER_STATUS_ENTRY_MICRO_V3_HEADER = (
-  ('r', 'Konata ARIJF2zbqirB9IwsW0mQznccWww 2012-09-24 13:40:40 69.64.48.168 
9001 9030'),
-  ('m', 'aiUklwBrua82obG5AsTX+iEpkjQA2+AQHxZ7GwMfY70'),
-  ('s', 'Fast Guard HSDir Named Running Stable V2Dir Valid'),
-)
-
 AUTHORITY_HEADER = (
   ('dir-source', 'turtles 27B6B5996C426270A5C95488AA5BCEB6BCC86956 
no.place.com 76.73.17.194 9030 9090'),
   ('contact', 'Mike Perry '),
@@ -287,66 +267,6 @@ def _get_descriptor_content(attr = None, exclude = (), 
header_template = (), foo
   return stem.util.str_tools._to_bytes('\n'.join(header_content + remainder + 
footer_content))
 
 
-def get_router_status_entry_v2(attr = None, exclude = (), content = False):
-  """
-  Provides the descriptor content for...
-  stem.descriptor.router_status_entry.RouterStatusEntryV2
-
-  :param dict attr: keyword/

[tor-commits] [stem/master] NetworkStatusDocument creation

2017-05-02 Thread atagar
commit 72679be355dfcde7513040b336d6c1824ea3d853
Author: Damian Johnson 
Date:   Mon May 1 16:56:54 2017 -0700

NetworkStatusDocument creation
---
 stem/descriptor/__init__.py|   4 +-
 stem/descriptor/networkstatus.py   | 149 +++
 test/mocking.py| 296 -
 .../networkstatus/directory_authority.py   |  43 +--
 test/unit/descriptor/networkstatus/document_v2.py  |  12 +-
 test/unit/descriptor/networkstatus/document_v3.py  | 145 +-
 .../descriptor/networkstatus/key_certificate.py|  47 ++--
 test/unit/tutorial.py  |  10 +-
 test/unit/tutorial_examples.py |  10 +-
 9 files changed, 283 insertions(+), 433 deletions(-)

diff --git a/stem/descriptor/__init__.py b/stem/descriptor/__init__.py
index c414a4c..1826b36 100644
--- a/stem/descriptor/__init__.py
+++ b/stem/descriptor/__init__.py
@@ -383,7 +383,9 @@ def _descriptor_content(attr = None, exclude = (), 
header_template = (), footer_
 
   value = attr.pop(keyword, value)
 
-  if not value:
+  if value is None:
+continue
+  elif value == '':
 content.append(keyword)
   elif value.startswith('\n'):
 # some values like crypto follow the line instead
diff --git a/stem/descriptor/networkstatus.py b/stem/descriptor/networkstatus.py
index 2b00ebc..ff9f105 100644
--- a/stem/descriptor/networkstatus.py
+++ b/stem/descriptor/networkstatus.py
@@ -63,9 +63,11 @@ import stem.util.tor_tools
 import stem.version
 
 from stem.descriptor import (
+  CRYPTO_BLOB,
   PGP_BLOCK_END,
   Descriptor,
   DocumentHandler,
+  _descriptor_content,
   _descriptor_components,
   _read_until_keywords,
   _value,
@@ -206,6 +208,57 @@ PARAM_RANGE = {
   'AuthDirNumSRVAgreements': (1, MAX_PARAM),
 }
 
+AUTHORITY_HEADER = (
+  ('dir-source', 'turtles 27B6B5996C426270A5C95488AA5BCEB6BCC86956 
no.place.com 76.73.17.194 9030 9090'),
+  ('contact', 'Mike Perry '),
+)
+
+KEY_CERTIFICATE_HEADER = (
+  ('dir-key-certificate-version', '3'),
+  ('fingerprint', '27B6B5996C426270A5C95488AA5BCEB6BCC86956'),
+  ('dir-key-published', '2011-11-28 21:51:04'),
+  ('dir-key-expires', '2012-11-28 21:51:04'),
+  ('dir-identity-key', '\n-BEGIN RSA PUBLIC KEY-%s-END RSA PUBLIC 
KEY-' % CRYPTO_BLOB),
+  ('dir-signing-key', '\n-BEGIN RSA PUBLIC KEY-%s-END RSA PUBLIC 
KEY-' % CRYPTO_BLOB),
+)
+
+KEY_CERTIFICATE_FOOTER = (
+  ('dir-key-certification', '\n-BEGIN SIGNATURE-%s-END 
SIGNATURE-' % CRYPTO_BLOB),
+)
+
+NETWORK_STATUS_DOCUMENT_HEADER_V2 = (
+  ('network-status-version', '2'),
+  ('dir-source', '18.244.0.114 18.244.0.114 80'),
+  ('fingerprint', '719BE45DE224B607C53707D0E2143E2D423E74CF'),
+  ('contact', 'arma at mit dot edu'),
+  ('published', '2005-12-16 00:13:46'),
+  ('dir-signing-key', '\n-BEGIN RSA PUBLIC KEY-%s-END RSA PUBLIC 
KEY-' % CRYPTO_BLOB),
+)
+
+NETWORK_STATUS_DOCUMENT_FOOTER_V2 = (
+  ('directory-signature', 'moria2\n-BEGIN SIGNATURE-%s-END 
SIGNATURE-' % CRYPTO_BLOB),
+)
+
+NETWORK_STATUS_DOCUMENT_HEADER = (
+  ('network-status-version', '3'),
+  ('vote-status', 'consensus'),
+  ('consensus-methods', None),
+  ('consensus-method', None),
+  ('published', None),
+  ('valid-after', '2012-09-02 22:00:00'),
+  ('fresh-until', '2012-09-02 22:00:00'),
+  ('valid-until', '2012-09-02 22:00:00'),
+  ('voting-delay', '300 300'),
+  ('client-versions', None),
+  ('server-versions', None),
+  ('package', None),
+  ('known-flags', 'Authority BadExit Exit Fast Guard HSDir Named Running 
Stable Unnamed V2Dir Valid'),
+  ('params', None),
+)
+
+VOTE_HEADER_DEFAULTS = {'consensus-methods': '1 9', 'published': '2012-09-02 
22:00:00'}
+CONSENSUS_HEADER_DEFAULTS = {'consensus-method': '9'}
+
 
 class PackageVersion(collections.namedtuple('PackageVersion', ['name', 
'version', 'url', 'digests'])):
   """
@@ -449,6 +502,10 @@ class NetworkStatusDocumentV2(NetworkStatusDocument):
 'directory-signature': _parse_directory_signature_line,
   }
 
+  @classmethod
+  def content(cls, attr = None, exclude = ()):
+return _descriptor_content(attr, exclude, 
NETWORK_STATUS_DOCUMENT_HEADER_V2, NETWORK_STATUS_DOCUMENT_FOOTER_V2)
+
   def __init__(self, raw_content, validate = False):
 super(NetworkStatusDocumentV2, self).__init__(raw_content, lazy_load = not 
validate)
 
@@ -893,6 +950,60 @@ class NetworkStatusDocumentV3(NetworkStatusDocument):
 'directory-signature': _parse_footer_directory_signature_line,
   }
 
+  @classmethod
+  def content(cls, attr = None, exclude = (), authorities = None, routers = 
None):
+attr = {} if attr is None else dict(attr)
+
+is_vote = attr.get('vote-status') == 'vote'
+extra_defaults = VOTE_HEADER_DEFAULTS if is_vote else 
CONSENSUS_HEADER_DEFAULTS
+
+if is_vote and authorities is None:
+  authorities = [DirectoryAuthority.create(is_vote = is_vote)]
+
+for k, v in e

[tor-commits] [stem/master] Microdescriptor creation

2017-05-02 Thread atagar
commit 72b90a84f8bd9557c201be7c45c79a1ea73e1bed
Author: Damian Johnson 
Date:   Mon May 1 12:15:13 2017 -0700

Microdescriptor creation
---
 stem/descriptor/microdescriptor.py  | 10 
 test/mocking.py | 27 --
 test/unit/descriptor/microdescriptor.py | 41 -
 3 files changed, 30 insertions(+), 48 deletions(-)

diff --git a/stem/descriptor/microdescriptor.py 
b/stem/descriptor/microdescriptor.py
index a1e5346..fb3c1e6 100644
--- a/stem/descriptor/microdescriptor.py
+++ b/stem/descriptor/microdescriptor.py
@@ -69,7 +69,9 @@ import hashlib
 import stem.exit_policy
 
 from stem.descriptor import (
+  CRYPTO_BLOB,
   Descriptor,
+  _descriptor_content,
   _descriptor_components,
   _read_until_keywords,
   _values,
@@ -102,6 +104,10 @@ SINGLE_FIELDS = (
   'pr',
 )
 
+MICRODESCRIPTOR = (
+  ('onion-key', '\n-BEGIN RSA PUBLIC KEY-%s-END RSA PUBLIC 
KEY-' % CRYPTO_BLOB),
+)
+
 
 def _parse_file(descriptor_file, validate = False, **kwargs):
   """
@@ -256,6 +262,10 @@ class Microdescriptor(Descriptor):
 'id': _parse_id_line,
   }
 
+  @classmethod
+  def content(cls, attr = None, exclude = ()):
+return _descriptor_content(attr, exclude, MICRODESCRIPTOR)
+
   def __init__(self, raw_contents, validate = False, annotations = None):
 super(Microdescriptor, self).__init__(raw_contents, lazy_load = not 
validate)
 self._annotation_lines = annotations if annotations else []
diff --git a/test/mocking.py b/test/mocking.py
index ce9a458..f1d859e 100644
--- a/test/mocking.py
+++ b/test/mocking.py
@@ -13,9 +13,6 @@ Helper functions for creating mock objects.
 get_message - stem.response.ControlMessage
 get_protocolinfo_response   - 
stem.response.protocolinfo.ProtocolInfoResponse
 
-stem.descriptor.microdescriptor
-  get_microdescriptor - Microdescriptor
-
 stem.descriptor.networkstatus
   get_directory_authority- DirectoryAuthority
   get_key_certificate- KeyCertificate
@@ -72,10 +69,6 @@ DOC_SIG = stem.descriptor.networkstatus.DocumentSignature(
   'BF112F1C6D5543CFD0A32215ACABD4197B5279AD',
   '-BEGIN SIGNATURE-%s-END SIGNATURE-' % CRYPTO_BLOB)
 
-MICRODESCRIPTOR = (
-  ('onion-key', '\n-BEGIN RSA PUBLIC KEY-%s-END RSA PUBLIC 
KEY-' % CRYPTO_BLOB),
-)
-
 ROUTER_STATUS_ENTRY_V2_HEADER = (
   ('r', 'caerSidi p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE 
2012-08-06 11:19:31 71.35.150.29 9001 0'),
 )
@@ -319,26 +312,6 @@ def _get_descriptor_content(attr = None, exclude = (), 
header_template = (), foo
   return stem.util.str_tools._to_bytes('\n'.join(header_content + remainder + 
footer_content))
 
 
-def get_microdescriptor(attr = None, exclude = (), content = False):
-  """
-  Provides the descriptor content for...
-  stem.descriptor.microdescriptor.Microdescriptor
-
-  :param dict attr: keyword/value mappings to be included in the descriptor
-  :param list exclude: mandatory keywords to exclude from the descriptor
-  :param bool content: provides the str content of the descriptor rather than 
the class if True
-
-  :returns: Microdescriptor for the requested descriptor content
-  """
-
-  desc_content = _get_descriptor_content(attr, exclude, MICRODESCRIPTOR)
-
-  if content:
-return desc_content
-  else:
-return stem.descriptor.microdescriptor.Microdescriptor(desc_content, 
validate = True)
-
-
 def get_router_status_entry_v2(attr = None, exclude = (), content = False):
   """
   Provides the descriptor content for...
diff --git a/test/unit/descriptor/microdescriptor.py 
b/test/unit/descriptor/microdescriptor.py
index f9350d2..35b8de0 100644
--- a/test/unit/descriptor/microdescriptor.py
+++ b/test/unit/descriptor/microdescriptor.py
@@ -11,11 +11,6 @@ import stem.descriptor
 from stem.util import str_type
 from stem.descriptor.microdescriptor import Microdescriptor
 
-from test.mocking import (
-  get_microdescriptor,
-  CRYPTO_BLOB,
-)
-
 from test.unit.descriptor import get_resource
 
 FIRST_ONION_KEY = """\
@@ -87,9 +82,9 @@ class TestMicrodescriptor(unittest.TestCase):
 attributes.
 """
 
-desc = get_microdescriptor()
+desc = Microdescriptor.create()
 
-self.assertTrue(CRYPTO_BLOB in desc.onion_key)
+self.assertTrue(stem.descriptor.CRYPTO_BLOB in desc.onion_key)
 self.assertEqual(None, desc.ntor_onion_key)
 self.assertEqual([], desc.or_addresses)
 self.assertEqual([], desc.family)
@@ -106,7 +101,7 @@ class TestMicrodescriptor(unittest.TestCase):
 Includes unrecognized content in the descriptor.
 """
 
-desc = get_microdescriptor({'pepperjack': 'is oh so tasty!'})
+desc = Microdescriptor.create({'pepperjack': 'is oh so tasty!'})
 self.assertEqual(['pepperjack is oh so tasty!'], 
desc.get_unrecognized_lines())
 
   def test_proceeding_line(self):
@@ -114,7 +109,7 @@ class TestMicrodescriptor(unittest.TestCase):
 Includes a l

[tor-commits] [stem/master] BridgeDescriptor creation

2017-05-02 Thread atagar
commit ab765d3233090d0014b939b4f0d3e89e70d96c89
Author: Damian Johnson 
Date:   Mon May 1 10:39:50 2017 -0700

BridgeDescriptor creation
---
 stem/descriptor/server_descriptor.py  | 12 +++
 test/mocking.py   | 31 ---
 test/unit/descriptor/export.py| 10 ++---
 test/unit/descriptor/server_descriptor.py | 35 ++-
 4 files changed, 30 insertions(+), 58 deletions(-)

diff --git a/stem/descriptor/server_descriptor.py 
b/stem/descriptor/server_descriptor.py
index b4dcd23..d764588 100644
--- a/stem/descriptor/server_descriptor.py
+++ b/stem/descriptor/server_descriptor.py
@@ -125,6 +125,14 @@ RELAY_SERVER_FOOTER = (
   ('router-signature', '\n-BEGIN SIGNATURE-%s-END SIGNATURE-' 
% CRYPTO_BLOB),
 )
 
+BRIDGE_SERVER_HEADER = (
+  ('router', 'Unnamed 10.45.227.253 9001 0 0'),
+  ('router-digest', '006FD96BA35E7785A6A3B8B75FE2E2435A13BDB4'),
+  ('published', '2012-03-22 17:34:38'),
+  ('bandwidth', '409600 819200 5120'),
+  ('reject', '*:*'),
+)
+
 
 def _parse_file(descriptor_file, is_bridge = False, validate = False, 
**kwargs):
   """
@@ -900,6 +908,10 @@ class BridgeDescriptor(ServerDescriptor):
 'router-digest': _parse_router_digest_line,
   })
 
+  @classmethod
+  def content(cls, attr = None, exclude = ()):
+return _descriptor_content(attr, exclude, BRIDGE_SERVER_HEADER)
+
   def digest(self):
 return self._digest
 
diff --git a/test/mocking.py b/test/mocking.py
index 990aa89..caf7d44 100644
--- a/test/mocking.py
+++ b/test/mocking.py
@@ -13,9 +13,6 @@ Helper functions for creating mock objects.
 get_message - stem.response.ControlMessage
 get_protocolinfo_response   - 
stem.response.protocolinfo.ProtocolInfoResponse
 
-stem.descriptor.server_descriptor
-  get_bridge_server_descriptor - BridgeDescriptor
-
 stem.descriptor.microdescriptor
   get_microdescriptor - Microdescriptor
 
@@ -79,14 +76,6 @@ DOC_SIG = stem.descriptor.networkstatus.DocumentSignature(
   'BF112F1C6D5543CFD0A32215ACABD4197B5279AD',
   '-BEGIN SIGNATURE-%s-END SIGNATURE-' % CRYPTO_BLOB)
 
-BRIDGE_SERVER_HEADER = (
-  ('router', 'Unnamed 10.45.227.253 9001 0 0'),
-  ('router-digest', '006FD96BA35E7785A6A3B8B75FE2E2435A13BDB4'),
-  ('published', '2012-03-22 17:34:38'),
-  ('bandwidth', '409600 819200 5120'),
-  ('reject', '*:*'),
-)
-
 RELAY_EXTRAINFO_HEADER = (
   ('extra-info', 'ninja B2289C3EAB83ECD6EB916A2F481A02E6B76A0A48'),
   ('published', '2012-05-05 17:03:50'),
@@ -352,26 +341,6 @@ def _get_descriptor_content(attr = None, exclude = (), 
header_template = (), foo
   return stem.util.str_tools._to_bytes('\n'.join(header_content + remainder + 
footer_content))
 
 
-def get_bridge_server_descriptor(attr = None, exclude = (), content = False):
-  """
-  Provides the descriptor content for...
-  stem.descriptor.server_descriptor.BridgeDescriptor
-
-  :param dict attr: keyword/value mappings to be included in the descriptor
-  :param list exclude: mandatory keywords to exclude from the descriptor
-  :param bool content: provides the str content of the descriptor rather than 
the class if True
-
-  :returns: BridgeDescriptor for the requested descriptor content
-  """
-
-  desc_content = _get_descriptor_content(attr, exclude, BRIDGE_SERVER_HEADER)
-
-  if content:
-return desc_content
-  else:
-return stem.descriptor.server_descriptor.BridgeDescriptor(desc_content, 
validate = True)
-
-
 def get_relay_extrainfo_descriptor(attr = None, exclude = (), content = False):
   """
   Provides the descriptor content for...
diff --git a/test/unit/descriptor/export.py b/test/unit/descriptor/export.py
index 009c43d..cd005d1 100644
--- a/test/unit/descriptor/export.py
+++ b/test/unit/descriptor/export.py
@@ -11,13 +11,9 @@ except ImportError:
 
 import stem.prereq
 
-from stem.descriptor.server_descriptor import RelayDescriptor
+from stem.descriptor.server_descriptor import RelayDescriptor, BridgeDescriptor
 from stem.descriptor.export import export_csv, export_csv_file
 
-from test.mocking import (
-  get_bridge_server_descriptor,
-)
-
 
 class TestExport(unittest.TestCase):
   def test_minimal_descriptor(self):
@@ -104,6 +100,4 @@ class TestExport(unittest.TestCase):
 Attempts to make a csv with multiple descriptor types.
 """
 
-server_desc = RelayDescriptor.create()
-bridge_desc = get_bridge_server_descriptor()
-self.assertRaises(ValueError, export_csv, (server_desc, bridge_desc))
+self.assertRaises(ValueError, export_csv, (RelayDescriptor.create(), 
BridgeDescriptor.create()))
diff --git a/test/unit/descriptor/server_descriptor.py 
b/test/unit/descriptor/server_descriptor.py
index 1b754bf..f30fed6 100644
--- a/test/unit/descriptor/server_descriptor.py
+++ b/test/unit/descriptor/server_descriptor.py
@@ -20,11 +20,6 @@ from stem.util import str_type
 from stem.descriptor.certificate import CertType, ExtensionType
 from stem.d

[tor-commits] [stem/master] RelayExtraInfoDescriptor creation

2017-05-02 Thread atagar
commit 7b5be00d5ddf5f668d5a366845693cfa215ed0b6
Author: Damian Johnson 
Date:   Mon May 1 11:02:18 2017 -0700

RelayExtraInfoDescriptor creation
---
 stem/descriptor/extrainfo_descriptor.py  | 15 ++
 test/mocking.py  | 30 ---
 test/unit/descriptor/extrainfo_descriptor.py | 81 ++--
 3 files changed, 55 insertions(+), 71 deletions(-)

diff --git a/stem/descriptor/extrainfo_descriptor.py 
b/stem/descriptor/extrainfo_descriptor.py
index 716b75c..7a2e7b1 100644
--- a/stem/descriptor/extrainfo_descriptor.py
+++ b/stem/descriptor/extrainfo_descriptor.py
@@ -77,8 +77,10 @@ import stem.util.enum
 import stem.util.str_tools
 
 from stem.descriptor import (
+  CRYPTO_BLOB,
   PGP_BLOCK_END,
   Descriptor,
+  _descriptor_content,
   _read_until_keywords,
   _get_descriptor_components,
   _value,
@@ -155,6 +157,15 @@ SINGLE_FIELDS = (
   'exit-streams-opened',
 )
 
+RELAY_EXTRAINFO_HEADER = (
+  ('extra-info', 'ninja B2289C3EAB83ECD6EB916A2F481A02E6B76A0A48'),
+  ('published', '2012-05-05 17:03:50'),
+)
+
+RELAY_EXTRAINFO_FOOTER = (
+  ('router-signature', '\n-BEGIN SIGNATURE-%s-END SIGNATURE-' 
% CRYPTO_BLOB),
+)
+
 
 _timestamp_re = re.compile('^(.*) \(([0-9]+) s\)( .*)?$')
 _locale_re = re.compile('^[a-zA-Z0-9\?]{2}$')
@@ -914,6 +925,10 @@ class RelayExtraInfoDescriptor(ExtraInfoDescriptor):
 'router-signature': _parse_router_signature_line,
   })
 
+  @classmethod
+  def content(cls, attr = None, exclude = ()):
+return _descriptor_content(attr, exclude, RELAY_EXTRAINFO_HEADER, 
RELAY_EXTRAINFO_FOOTER)
+
   @lru_cache()
   def digest(self):
 # our digest is calculated from everything except our signature
diff --git a/test/mocking.py b/test/mocking.py
index caf7d44..dc08a61 100644
--- a/test/mocking.py
+++ b/test/mocking.py
@@ -17,7 +17,6 @@ Helper functions for creating mock objects.
   get_microdescriptor - Microdescriptor
 
 stem.descriptor.extrainfo_descriptor
-  get_relay_extrainfo_descriptor  - RelayExtraInfoDescriptor
   get_bridge_extrainfo_descriptor - BridgeExtraInfoDescriptor
 
 stem.descriptor.networkstatus
@@ -76,15 +75,6 @@ DOC_SIG = stem.descriptor.networkstatus.DocumentSignature(
   'BF112F1C6D5543CFD0A32215ACABD4197B5279AD',
   '-BEGIN SIGNATURE-%s-END SIGNATURE-' % CRYPTO_BLOB)
 
-RELAY_EXTRAINFO_HEADER = (
-  ('extra-info', 'ninja B2289C3EAB83ECD6EB916A2F481A02E6B76A0A48'),
-  ('published', '2012-05-05 17:03:50'),
-)
-
-RELAY_EXTRAINFO_FOOTER = (
-  ('router-signature', '\n-BEGIN SIGNATURE-%s-END SIGNATURE-' 
% CRYPTO_BLOB),
-)
-
 BRIDGE_EXTRAINFO_HEADER = (
   ('extra-info', 'ec2bridgereaac65a3 
1EC248422B57D9C0BD751892FE787585407479A4'),
   ('published', '2012-05-05 17:03:50'),
@@ -341,26 +331,6 @@ def _get_descriptor_content(attr = None, exclude = (), 
header_template = (), foo
   return stem.util.str_tools._to_bytes('\n'.join(header_content + remainder + 
footer_content))
 
 
-def get_relay_extrainfo_descriptor(attr = None, exclude = (), content = False):
-  """
-  Provides the descriptor content for...
-  stem.descriptor.extrainfo_descriptor.RelayExtraInfoDescriptor
-
-  :param dict attr: keyword/value mappings to be included in the descriptor
-  :param list exclude: mandatory keywords to exclude from the descriptor
-  :param bool content: provides the str content of the descriptor rather than 
the class if True
-
-  :returns: RelayExtraInfoDescriptor for the requested descriptor content
-  """
-
-  desc_content = _get_descriptor_content(attr, exclude, 
RELAY_EXTRAINFO_HEADER, RELAY_EXTRAINFO_FOOTER)
-
-  if content:
-return desc_content
-  else:
-return 
stem.descriptor.extrainfo_descriptor.RelayExtraInfoDescriptor(desc_content, 
validate = True)
-
-
 def get_bridge_extrainfo_descriptor(attr = None, exclude = (), content = 
False):
   """
   Provides the descriptor content for...
diff --git a/test/unit/descriptor/extrainfo_descriptor.py 
b/test/unit/descriptor/extrainfo_descriptor.py
index cab3440..61f5ee7 100644
--- a/test/unit/descriptor/extrainfo_descriptor.py
+++ b/test/unit/descriptor/extrainfo_descriptor.py
@@ -10,7 +10,7 @@ import stem.descriptor
 
 from stem.descriptor.extrainfo_descriptor import RelayExtraInfoDescriptor, 
DirResponse, DirStat
 
-from test.mocking import get_relay_extrainfo_descriptor, 
get_bridge_extrainfo_descriptor, CRYPTO_BLOB
+from test.mocking import get_bridge_extrainfo_descriptor, CRYPTO_BLOB
 
 from test.unit.descriptor import get_resource
 
@@ -183,8 +183,7 @@ 
k0d2aofcVbHr4fPQOSST0LXDrhFl5Fqo5um296zpJGvRUeO6S44U/EfJAGShtqWw
 attributes.
 """
 
-desc = get_relay_extrainfo_descriptor()
-
+desc = RelayExtraInfoDescriptor.create()
 self.assertEqual('ninja', desc.nickname)
 self.assertEqual('B2289C3EAB83ECD6EB916A2F481A02E6B76A0A48', 
desc.fingerprint)
 self.assertTrue(CRYPTO_BLOB in desc.signature)
@@ -194,7 +193,7 @@ 
k0d2aofcVbHr4fPQOSST0LXDrhFl5Fqo5um296zpJGvRUeO6S44U/EfJAG

[tor-commits] [stem/master] Note that created descriptors aren't signed

2017-05-02 Thread atagar
commit f655c68408924c87fc6dd170d0e108b8dd72a904
Author: Damian Johnson 
Date:   Mon May 1 11:56:53 2017 -0700

Note that created descriptors aren't signed

Love to have this capability but until we do we should note this.
---
 stem/descriptor/__init__.py | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/stem/descriptor/__init__.py b/stem/descriptor/__init__.py
index c790e65..2b8ed5b 100644
--- a/stem/descriptor/__init__.py
+++ b/stem/descriptor/__init__.py
@@ -533,7 +533,8 @@ class Descriptor(object):
   def content(cls, attr = None, exclude = ()):
 """
 Creates descriptor content with the given attributes. Mandatory fields are
-filled with dummy information unless data is supplied.
+filled with dummy information unless data is supplied. This doesn't yet
+create a valid signature.
 
 .. versionadded:: 1.6.0
 
@@ -552,7 +553,8 @@ class Descriptor(object):
   def create(cls, attr = None, exclude = (), validate = True):
 """
 Creates a descriptor with the given attributes. Mandatory fields are filled
-with dummy information unless data is supplied.
+with dummy information unless data is supplied. This doesn't yet create a
+valid signature.
 
 .. versionadded:: 1.6.0
 



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


[tor-commits] [stem/master] Stub descriptor creation method

2017-05-02 Thread atagar
commit acb791462a96dacefddb08934bedce6ff6ca0c9b
Author: Damian Johnson 
Date:   Mon Apr 24 10:51:47 2017 -0700

Stub descriptor creation method
---
 stem/descriptor/__init__.py | 36 
 1 file changed, 36 insertions(+)

diff --git a/stem/descriptor/__init__.py b/stem/descriptor/__init__.py
index f80e6f6..d50b661 100644
--- a/stem/descriptor/__init__.py
+++ b/stem/descriptor/__init__.py
@@ -9,6 +9,7 @@ Package for parsing and processing descriptor data.
 ::
 
   parse_file - Parses the descriptors in a file.
+  create - Creates a new custom descriptor.
 
   Descriptor - Common parent for all descriptor file types.
 |- get_path - location of the descriptor on disk if it came from a file
@@ -352,6 +353,41 @@ def _parse_metrics_file(descriptor_type, major_version, 
minor_version, descripto
 raise TypeError("Unrecognized metrics descriptor format. type: '%s', 
version: '%i.%i'" % (descriptor_type, major_version, minor_version))
 
 
+def create(desc_type, attr = None, exclude = (), validate = False, sign = 
False):
+  """
+  Creates a descriptor with the given attributes.
+
+  .. versionadded:: 1.6.0
+
+  :param DescriptorType desc_type: type of descriptor to be created
+  :param dict attr: keyword/value mappings to be included in the descriptor
+  :param list exclude: mandatory keywords to exclude from the descriptor, this
+results in an invalid descriptor
+  :param bool validate: checks the validity of the descriptor's content if
+**True**, skips these checks otherwise
+  :param bool sign_content: includes cryptographic digest if True
+
+  :returns: :class:`~stem.descriptor.Descriptor` subclass
+
+  :raises:
+* **ValueError** if the contents is malformed and validate is True
+* **ImportError** if cryptography is unavailable and sign is True
+  """
+
+  if desc_type == DescriptorType.SERVER:
+pass
+  elif desc_type == DescriptorType.EXTRAINFO:
+pass
+  elif desc_type == DescriptorType.MICRO:
+pass
+  elif desc_type == DescriptorType.CONSENSUS:
+pass
+  elif desc_type == DescriptorType.HIDDEN_SERVICE:
+pass
+  else:
+raise TypeError("'%s' isn't a valid descriptor type we can create" % 
desc_type)
+
+
 def _value(line, entries):
   return entries[line][0][0]
 



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


[tor-commits] [translation/tor-messenger-uiproperties] Update translations for tor-messenger-uiproperties

2017-05-02 Thread translation
commit b78783b7e2b2ed1be77d70162087d441a2a29e1f
Author: Translation commit bot 
Date:   Tue May 2 19:18:04 2017 +

Update translations for tor-messenger-uiproperties
---
 es_AR/ui.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/es_AR/ui.properties b/es_AR/ui.properties
index c6aa7d0..e7b3eba 100644
--- a/es_AR/ui.properties
+++ b/es_AR/ui.properties
@@ -8,7 +8,7 @@ auth.error=An error occurred while verifying your contact's 
identity.
 auth.success=Verifying your contact's identity completed successfully.
 auth.successThem=Your contact has successfully verified your identity. You may 
want to verify their identity as well by asking your own question.
 auth.fail=Failed to verify your contact's identity.
-auth.waiting=Waiting for contact ...
+auth.waiting=Esperando contacto ...
 reauth.label=Reverify your contact's identity
 prefs.label=Preferencias de OTR
 alert.start=Attempting to start a private conversation with %S.

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


[tor-commits] [translation/tor-messenger-authproperties] Update translations for tor-messenger-authproperties

2017-05-02 Thread translation
commit c68ea5c4bba09b22f23967379c53eae21406fea6
Author: Translation commit bot 
Date:   Tue May 2 19:17:34 2017 +

Update translations for tor-messenger-authproperties
---
 es_AR/auth.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/es_AR/auth.properties b/es_AR/auth.properties
index 17410b1..013bd7d 100644
--- a/es_AR/auth.properties
+++ b/es_AR/auth.properties
@@ -4,4 +4,4 @@ auth.theirFingerprint=Purported fingerprint for %S:\n%S
 auth.help=Verifying a contact's identity helps ensure that the person you are 
talking to is who they claim to be.
 auth.helpTitle=Verification help
 auth.question=This is the question asked by your contact:\n\n%S\n\nEnter 
secret answer here (case sensitive):
-auth.secret=Enter secret here:
+auth.secret=Escriba el secreto aquí:

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


[tor-commits] [translation/tor-messenger-authdtd_completed] Update translations for tor-messenger-authdtd_completed

2017-05-02 Thread translation
commit 34095b3e393e10e164e3381c2aa6d2340a1626f7
Author: Translation commit bot 
Date:   Tue May 2 19:17:28 2017 +

Update translations for tor-messenger-authdtd_completed
---
 es_AR/auth.dtd | 21 +
 1 file changed, 21 insertions(+)

diff --git a/es_AR/auth.dtd b/es_AR/auth.dtd
new file mode 100644
index 000..76fa59a
--- /dev/null
+++ b/es_AR/auth.dtd
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file

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


[tor-commits] [translation/tor-messenger-authdtd] Update translations for tor-messenger-authdtd

2017-05-02 Thread translation
commit 5637845730b2441f791804cd30e5dbd527e69372
Author: Translation commit bot 
Date:   Tue May 2 19:17:25 2017 +

Update translations for tor-messenger-authdtd
---
 es_AR/auth.dtd | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/es_AR/auth.dtd b/es_AR/auth.dtd
index 5e4dfd8..76fa59a 100644
--- a/es_AR/auth.dtd
+++ b/es_AR/auth.dtd
@@ -1,4 +1,4 @@
-
+
 
 
 
@@ -14,8 +14,8 @@
 
 
 
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
\ No newline at end of file

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


[tor-commits] [translation/tor-messenger-authdtd] Update translations for tor-messenger-authdtd

2017-05-02 Thread translation
commit f20cc2c97b897981980a045baa28dbb887b44e7a
Author: Translation commit bot 
Date:   Tue May 2 18:47:25 2017 +

Update translations for tor-messenger-authdtd
---
 es_AR/auth.dtd | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/es_AR/auth.dtd b/es_AR/auth.dtd
index c5b3cd0..5e4dfd8 100644
--- a/es_AR/auth.dtd
+++ b/es_AR/auth.dtd
@@ -10,10 +10,10 @@
 
 
 
-
+
 
-
-
+
+
 
 
 

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


[tor-commits] [translation/tor-messenger-authdtd] Update translations for tor-messenger-authdtd

2017-05-02 Thread translation
commit ad123b915a797f815fa0971f7e745617d581409e
Author: Translation commit bot 
Date:   Tue May 2 18:17:26 2017 +

Update translations for tor-messenger-authdtd
---
 es_AR/auth.dtd | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/es_AR/auth.dtd b/es_AR/auth.dtd
index e44e309..c5b3cd0 100644
--- a/es_AR/auth.dtd
+++ b/es_AR/auth.dtd
@@ -6,12 +6,12 @@
 
 
 
-
+
 
 
-
+
 
-
+
 
 
 

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


[tor-commits] [translation/tails-greeter-2] Update translations for tails-greeter-2

2017-05-02 Thread translation
commit 5a2af21353b573b0f042e461a5412dd9e0d2f0a8
Author: Translation commit bot 
Date:   Tue May 2 16:48:16 2017 +

Update translations for tails-greeter-2
---
 zh_CN/zh_CN.po | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/zh_CN/zh_CN.po b/zh_CN/zh_CN.po
index a99f3e9..0991959 100644
--- a/zh_CN/zh_CN.po
+++ b/zh_CN/zh_CN.po
@@ -119,23 +119,23 @@ msgstr "保存语言和区域设置"
 
 #: ../data/greeter.ui.h:25
 msgid "_Language"
-msgstr ""
+msgstr "语言(_L)"
 
 #: ../data/greeter.ui.h:26
 msgid "_Keyboard Layout"
-msgstr ""
+msgstr "键盘布局(_K)"
 
 #: ../data/greeter.ui.h:27
 msgid "_Formats"
-msgstr ""
+msgstr "格式(_F)"
 
 #: ../data/greeter.ui.h:28
 msgid "_Time Zone"
-msgstr ""
+msgstr "时区(_T)"
 
 #: ../data/greeter.ui.h:29
 msgid "Encrypted _Persistent Storage"
-msgstr ""
+msgstr "加密的持久存储(_P)"
 
 #: ../data/greeter.ui.h:30
 msgid "Show Passphrase"
@@ -164,7 +164,7 @@ msgstr "您的持久存储已解锁。重启 Tails 
以再次锁定它。"
 
 #: ../data/greeter.ui.h:36
 msgid "_Additional Settings"
-msgstr ""
+msgstr "额外设置(_A)"
 
 #: ../data/greeter.ui.h:37
 msgid "Save Additional Settings"
@@ -205,7 +205,7 @@ msgstr "默认设置在大多数情况下是安å…
¨çš„。要添加自定义设置
 
 #: ../data/greeter.ui.h:45
 msgid "_Administration Password"
-msgstr ""
+msgstr "管理密码(_A)"
 
 #: ../data/greeter.ui.h:46
 msgid "Off (default)"
@@ -213,7 +213,7 @@ msgstr "关闭(默认)"
 
 #: ../data/greeter.ui.h:47
 msgid "_MAC Address Spoofing"
-msgstr ""
+msgstr "MAC 地址欺骗(_M)"
 
 #: ../data/greeter.ui.h:48
 msgid "On (default)"
@@ -221,7 +221,7 @@ msgstr "开启(默认)"
 
 #: ../data/greeter.ui.h:49
 msgid "_Network Connection"
-msgstr ""
+msgstr "网络连接(_N)"
 
 #: ../data/greeter.ui.h:50 ../tailsgreeter/gui.py:382
 msgid "Direct (default)"
@@ -229,7 +229,7 @@ msgstr "直接(默认)"
 
 #: ../data/greeter.ui.h:51
 msgid "_Windows Camouflage"
-msgstr ""
+msgstr "伪装 Windows(_W)"
 
 #: ../tailsgreeter/gui.py:388
 msgid "Bridge & Proxy"
@@ -269,7 +269,7 @@ msgstr "关闭"
 
 #: ../tailsgreeter/gui.py:721
 msgid "_Start Tails"
-msgstr ""
+msgstr "启动 Tails(_S)"
 
 #. Translators: translate to default:RTL if your language
 #. is written from right to left

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


[tor-commits] [translation/tails-greeter-2_completed] Update translations for tails-greeter-2_completed

2017-05-02 Thread translation
commit 42e1e4748799db2d5d371244a6e64f3e18a4278a
Author: Translation commit bot 
Date:   Tue May 2 16:48:19 2017 +

Update translations for tails-greeter-2_completed
---
 zh_CN/zh_CN.po | 86 +++---
 1 file changed, 52 insertions(+), 34 deletions(-)

diff --git a/zh_CN/zh_CN.po b/zh_CN/zh_CN.po
index 5f2b4a9..0991959 100644
--- a/zh_CN/zh_CN.po
+++ b/zh_CN/zh_CN.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-01-31 10:47+0100\n"
+"POT-Creation-Date: 2017-03-20 09:46+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: Chi-Hsun Tsai , 2016\n"
 "Language-Team: Chinese (China) 
(https://www.transifex.com/otf/teams/1519/zh_CN/)\n"
@@ -84,7 +84,7 @@ msgstr "欺骗所有 MAC 地址(默认)"
 msgid "Don't spoof MAC addresses"
 msgstr "不欺骗任何 MAC 地址"
 
-#: ../data/greeter.ui.h:17 ../tailsgreeter/gui.py:514
+#: ../data/greeter.ui.h:17 ../tailsgreeter/gui.py:529
 msgid "Cannot unlock encrypted storage with this passphrase."
 msgstr "无法用此密码解锁加密的存储。"
 
@@ -118,24 +118,24 @@ msgid "Save Language & Region Settings"
 msgstr "保存语言和区域设置"
 
 #: ../data/greeter.ui.h:25
-msgid "Language"
-msgstr "语言"
+msgid "_Language"
+msgstr "语言(_L)"
 
 #: ../data/greeter.ui.h:26
-msgid "Keyboard Layout"
-msgstr "键盘布局"
+msgid "_Keyboard Layout"
+msgstr "键盘布局(_K)"
 
 #: ../data/greeter.ui.h:27
-msgid "Formats"
-msgstr "格式"
+msgid "_Formats"
+msgstr "格式(_F)"
 
 #: ../data/greeter.ui.h:28
-msgid "Time Zone"
-msgstr "时区"
+msgid "_Time Zone"
+msgstr "时区(_T)"
 
 #: ../data/greeter.ui.h:29
-msgid "Encrypted Persistent Storage"
-msgstr "加密持久存储"
+msgid "Encrypted _Persistent Storage"
+msgstr "加密的持久存储(_P)"
 
 #: ../data/greeter.ui.h:30
 msgid "Show Passphrase"
@@ -149,8 +149,8 @@ msgstr "配置持久存储"
 msgid "Enter your passphrase to unlock the persistent storage"
 msgstr "请输入您的密码以解锁持久存储"
 
-#: ../data/greeter.ui.h:33 ../tailsgreeter/gui.py:460
-#: ../tailsgreeter/gui.py:510
+#: ../data/greeter.ui.h:33 ../tailsgreeter/gui.py:475
+#: ../tailsgreeter/gui.py:525
 msgid "Unlock"
 msgstr "解锁"
 
@@ -162,9 +162,9 @@ msgstr "重新锁定持久存储"
 msgid "Your persistent storage is unlocked. Restart Tails to lock it again."
 msgstr "您的持久存储已解锁。重启 Tails 以再次锁定它。"
 
-#: ../data/greeter.ui.h:36 ../tailsgreeter/gui.py:554
-msgid "Additional Settings"
-msgstr "额外设置"
+#: ../data/greeter.ui.h:36
+msgid "_Additional Settings"
+msgstr "额外设置(_A)"
 
 #: ../data/greeter.ui.h:37
 msgid "Save Additional Settings"
@@ -204,58 +204,76 @@ msgid ""
 msgstr "默认设置在大多数情况下是安全的。要添加
自定义设置,点击下面的 + 按钮。"
 
 #: ../data/greeter.ui.h:45
+msgid "_Administration Password"
+msgstr "管理密码(_A)"
+
+#: ../data/greeter.ui.h:46
 msgid "Off (default)"
 msgstr "关闭(默认)"
 
-#: ../data/greeter.ui.h:46
+#: ../data/greeter.ui.h:47
+msgid "_MAC Address Spoofing"
+msgstr "MAC 地址欺骗(_M)"
+
+#: ../data/greeter.ui.h:48
 msgid "On (default)"
 msgstr "开启(默认)"
 
-#: ../data/greeter.ui.h:47
-msgid "Network Connection"
-msgstr "网络连接"
+#: ../data/greeter.ui.h:49
+msgid "_Network Connection"
+msgstr "网络连接(_N)"
 
-#: ../data/greeter.ui.h:48 ../tailsgreeter/gui.py:367
+#: ../data/greeter.ui.h:50 ../tailsgreeter/gui.py:382
 msgid "Direct (default)"
 msgstr "直接(默认)"
 
-#: ../tailsgreeter/gui.py:373
+#: ../data/greeter.ui.h:51
+msgid "_Windows Camouflage"
+msgstr "伪装 Windows(_W)"
+
+#: ../tailsgreeter/gui.py:388
 msgid "Bridge & Proxy"
 msgstr "网桥和代理"
 
-#: ../tailsgreeter/gui.py:379
+#: ../tailsgreeter/gui.py:394
 msgid "Offline"
 msgstr "离线"
 
-#: ../tailsgreeter/gui.py:463
+#: ../tailsgreeter/gui.py:478
 msgid "Failed to relock persistent storage."
 msgstr "重新锁定持久存储失败。"
 
-#: ../tailsgreeter/gui.py:481
+#: ../tailsgreeter/gui.py:496
 msgid "Unlocking…"
 msgstr "正在解锁…"
 
-#: ../tailsgreeter/gui.py:562
+#: ../tailsgreeter/gui.py:591
+msgid "Additional Settings"
+msgstr "额外设置"
+
+#: ../tailsgreeter/gui.py:599
 msgid "Cancel"
 msgstr "取消"
 
-#: ../tailsgreeter/gui.py:566
+#: ../tailsgreeter/gui.py:605
 msgid "Add"
 msgstr "添加"
 
-#: ../tailsgreeter/gui.py:572
+#: ../tailsgreeter/gui.py:613
 msgid "Back"
 msgstr "上一步"
 
-#: ../tailsgreeter/gui.py:658
+#: ../tailsgreeter/gui.py:716
 msgid "Shutdown"
 msgstr "关闭"
 
-#: ../tailsgreeter/gui.py:664
-msgid "Start Tails"
-msgstr "启动 Tails"
+#: ../tailsgreeter/gui.py:721
+msgid "_Start Tails"
+msgstr "启动 Tails(_S)"
 
-#: ../tailsgreeter/language.py:119
+#. Translators: translate to default:RTL if your language
+#. is written from right to left
+#: ../tailsgreeter/language.py:133
 msgid "de

[tor-commits] [translation/torbutton-torbuttondtd] Update translations for torbutton-torbuttondtd

2017-05-02 Thread translation
commit bd959520eae4cbf912c7a72882e1524834e2dbea
Author: Translation commit bot 
Date:   Tue May 2 16:46:44 2017 +

Update translations for torbutton-torbuttondtd
---
 zh_CN/torbutton.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zh_CN/torbutton.dtd b/zh_CN/torbutton.dtd
index 32e1060..d61cd9c 100644
--- a/zh_CN/torbutton.dtd
+++ b/zh_CN/torbutton.dtd
@@ -41,7 +41,7 @@
 
 
 
-
+
 
 
 

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


[tor-commits] [translation/whisperback_completed] Update translations for whisperback_completed

2017-05-02 Thread translation
commit f395f08f6f92a1ff80727c439aee196736dd7292
Author: Translation commit bot 
Date:   Tue May 2 16:45:21 2017 +

Update translations for whisperback_completed
---
 zh_CN/zh_CN.po | 62 +-
 1 file changed, 40 insertions(+), 22 deletions(-)

diff --git a/zh_CN/zh_CN.po b/zh_CN/zh_CN.po
index a1d684e..d7a0cd7 100644
--- a/zh_CN/zh_CN.po
+++ b/zh_CN/zh_CN.po
@@ -5,14 +5,16 @@
 # Translators:
 # khi, 2013
 # 郑华 , 2012
+# YF , 2017
 # xtoaster , 2012
+# 吴致远 , 2017
 msgid ""
 msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-12-16 19:54+0100\n"
-"PO-Revision-Date: 2016-12-09 15:39+\n"
-"Last-Translator: khi\n"
+"POT-Creation-Date: 2017-03-20 12:09+\n"
+"PO-Revision-Date: 2017-05-02 16:18+\n"
+"Last-Translator: YF \n"
 "Language-Team: Chinese (China) 
(http://www.transifex.com/otf/torproject/language/zh_CN/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -42,40 +44,56 @@ msgid ""
 "/etc/whisperback/config.py, ~/.whisperback/config.py, ./config.py"
 msgstr "在配置文件 /etc/whisperback/config.py、~/.whisperback/config.py 
以及 ./config.py 中都没有找到 %s 变量"
 
-#: ../whisperBack/gui.py:148
+#: ../whisperBack/gui.py:110
+msgid "Name of the affected software"
+msgstr "受影响软件的名称"
+
+#: ../whisperBack/gui.py:112
+msgid "Exact steps to reproduce the error"
+msgstr "重现问题的步骤"
+
+#: ../whisperBack/gui.py:114
+msgid "Actual result and description of the error"
+msgstr "错误的实际结果和描述"
+
+#: ../whisperBack/gui.py:116
+msgid "Desired result"
+msgstr "预期效果"
+
+#: ../whisperBack/gui.py:152
 msgid "Unable to load a valid configuration."
 msgstr "无法载入有效的配置。"
 
-#: ../whisperBack/gui.py:214
+#: ../whisperBack/gui.py:218
 msgid "Sending mail..."
 msgstr "正在发送邮件..."
 
-#: ../whisperBack/gui.py:215
+#: ../whisperBack/gui.py:219
 msgid "Sending mail"
 msgstr "正在发送邮件"
 
 #. pylint: disable=C0301
-#: ../whisperBack/gui.py:217
+#: ../whisperBack/gui.py:221
 msgid "This could take a while..."
 msgstr "此操作可能需要一些时间..."
 
-#: ../whisperBack/gui.py:232
+#: ../whisperBack/gui.py:236
 msgid "The contact email adress doesn't seem valid."
 msgstr "联系人电子邮件地址无效。"
 
-#: ../whisperBack/gui.py:249
+#: ../whisperBack/gui.py:253
 msgid "Unable to send the mail: SMTP error."
 msgstr "无法发送电子邮件:SMTP 错误。"
 
-#: ../whisperBack/gui.py:251
+#: ../whisperBack/gui.py:255
 msgid "Unable to connect to the server."
 msgstr "无法连接服务器。"
 
-#: ../whisperBack/gui.py:253
+#: ../whisperBack/gui.py:257
 msgid "Unable to create or to send the mail."
 msgstr "无法创建或发送邮件。"
 
-#: ../whisperBack/gui.py:256
+#: ../whisperBack/gui.py:260
 msgid ""
 "\n"
 "\n"
@@ -84,20 +102,20 @@ msgid ""
 "If it does not work, you will be offered to save the bug report."
 msgstr "\n\n错误报告无
法发送,可能是网络问题。请尝试重新连接网络,然后再点击发送。\n\n如果仍然æ—
 æ³•æ­£å¸¸è¿è¡Œï¼Œå°†æç¤ºä¿å­˜æ•…障报告。"
 
-#: ../whisperBack/gui.py:269
+#: ../whisperBack/gui.py:273
 msgid "Your message has been sent."
 msgstr "信息已发送。"
 
-#: ../whisperBack/gui.py:276
+#: ../whisperBack/gui.py:280
 msgid "An error occured during encryption."
 msgstr "加密时出现错误。"
 
-#: ../whisperBack/gui.py:296
+#: ../whisperBack/gui.py:300
 #, python-format
 msgid "Unable to save %s."
 msgstr "无法保存 %s。"
 
-#: ../whisperBack/gui.py:319
+#: ../whisperBack/gui.py:323
 #, python-format
 msgid ""
 "The bug report could not be sent, likely due to network problems.\n"
@@ -107,27 +125,27 @@ msgid ""
 "Do you want to save the bug report to a file?"
 msgstr "可能由于网络原因,故障报告无
法发送。\n\n为了解决这一问题,可将故
障报告保存到U盘,然后在å…
¶ä»–系统中以电子邮件的方式发送到 
%s。请注意:如果未采取相应措施(比如通过一次性电子邮件帐号通过
 Tor 发送),这种方式可无法保证故
障报告的匿名性。\n\n是否将故障报告保存至文件?"
 
-#: ../whisperBack/gui.py:379 ../data/whisperback.ui.h:21
+#: ../whisperBack/gui.py:383 ../data/whisperback.ui.h:21
 msgid "WhisperBack"
 msgstr "WhisperBack"
 
-#: ../whisperBack/gui.py:380 ../data/whisperback.ui.h:2
+#: ../whisperBack/gui.py:384 ../data/whisperback.ui.h:2
 msgid "Send feedback in an encrypted mail."
 msgstr "通过加密邮件发送反馈。"
 
-#: ../whisperBack/gui.py:383
+#: ../whisperBack/gui.py:387
 msgid "Copyright © 2009-2012 Tails developpers (ta...@boum.org)"
 msgstr "Copyright © 2009-2012 Tails 开发人员 (ta...@boum.org)"
 
-#: ../whisperBack/gui.py:384
+#: ../whisperBack/gui.py:388
 msgid "Tails developers "
 msgstr "Tails 开发者 "
 
-#: ../whisperBack/gui.py:385
+#: ../whisperBack/gui.py:389
 ms

[tor-commits] [translation/whisperback] Update translations for whisperback

2017-05-02 Thread translation
commit a27654c3ec78edb2b948ac463a7d4ada65258d7d
Author: Translation commit bot 
Date:   Tue May 2 16:45:16 2017 +

Update translations for whisperback
---
 zh_CN/zh_CN.po | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/zh_CN/zh_CN.po b/zh_CN/zh_CN.po
index d3c24fb..d7a0cd7 100644
--- a/zh_CN/zh_CN.po
+++ b/zh_CN/zh_CN.po
@@ -5,6 +5,7 @@
 # Translators:
 # khi, 2013
 # 郑华 , 2012
+# YF , 2017
 # xtoaster , 2012
 # 吴致远 , 2017
 msgid ""
@@ -12,8 +13,8 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-03-20 12:09+\n"
-"PO-Revision-Date: 2017-04-27 13:52+\n"
-"Last-Translator: 吴致远 \n"
+"PO-Revision-Date: 2017-05-02 16:18+\n"
+"Last-Translator: YF \n"
 "Language-Team: Chinese (China) 
(http://www.transifex.com/otf/torproject/language/zh_CN/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -53,11 +54,11 @@ msgstr "重现问题的步骤"
 
 #: ../whisperBack/gui.py:114
 msgid "Actual result and description of the error"
-msgstr ""
+msgstr "错误的实际结果和描述"
 
 #: ../whisperBack/gui.py:116
 msgid "Desired result"
-msgstr ""
+msgstr "预期效果"
 
 #: ../whisperBack/gui.py:152
 msgid "Unable to load a valid configuration."

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


[tor-commits] [tor-browser/tor-browser-52.1.0esr-7.0-2] fixup! TB4: Tor Browser's Firefox preference overrides.

2017-05-02 Thread gk
commit 29b3b7af8e3b9528204ae49a396af80b3e4c4d61
Author: Arthur Edelstein 
Date:   Wed Apr 26 15:38:30 2017 -0700

fixup! TB4: Tor Browser's Firefox preference overrides.

We fix bug 21675 by pretending every user has just one core available.
---
 browser/app/profile/000-tor-browser.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/browser/app/profile/000-tor-browser.js 
b/browser/app/profile/000-tor-browser.js
index 0715a01..27cfe53 100644
--- a/browser/app/profile/000-tor-browser.js
+++ b/browser/app/profile/000-tor-browser.js
@@ -151,6 +151,7 @@ pref("reader.parse-on-load.enabled", false);
 pref("privacy.use_utc_timezone", true);
 pref("media.webspeech.synth.enabled", false); // Bug 10283: Disable 
SpeechSynthesis API
 pref("dom.webaudio.enabled", false); // Bug 13017: Disable Web Audio API
+pref("dom.maxHardwareConcurrency", 1); // Bug 21675: Spoof single-core cpu
 
 // Third party stuff
 pref("network.cookie.cookieBehavior", 1);

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


[tor-commits] [tor/master] Remove special-casing for NO_METHOD in consdiffmgr.c

2017-05-02 Thread nickm
commit fd437f2a0259e60379fbfe9b8bf6ee1e8fb1eae6
Author: Nick Mathewson 
Date:   Tue May 2 08:37:57 2017 -0400

Remove special-casing for NO_METHOD in consdiffmgr.c
---
 src/or/consdiffmgr.c | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/or/consdiffmgr.c b/src/or/consdiffmgr.c
index b134578..29807e7 100644
--- a/src/or/consdiffmgr.c
+++ b/src/or/consdiffmgr.c
@@ -1100,14 +1100,8 @@ uncompress_or_copy(char **out, size_t *outlen,
   if (lv_compression)
 method = compression_method_get_by_name(lv_compression);
 
-  if (method == NO_METHOD) {
-*out = tor_memdup_nulterm(body, bodylen);
-*outlen = bodylen;
-return 0;
-  } else {
-return tor_uncompress(out, outlen, (const char *)body, bodylen,
-  method, 1, LOG_WARN);
-  }
+  return tor_uncompress(out, outlen, (const char *)body, bodylen,
+method, 1, LOG_WARN);
 }
 
 /**

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


[tor-commits] [tor/master] Add unit tests for the NO_METHOD compressor

2017-05-02 Thread nickm
commit 3836d9481f81cc1617a9a48de2c2ca178f4804c8
Author: Nick Mathewson 
Date:   Thu Apr 27 11:19:51 2017 -0400

Add unit tests for the NO_METHOD compressor

These required some special-casing, since some of the assumption
about real compression algorithms don't actually hold for the
identity transform.  Specifically, we had assumed:

  - compression functions typically change the lengths of their
inputs.
  - decompression functions can detect truncated inputs
  - compression functions have detectable headers

None of those is true for the identity transformation.
---
 src/test/test_buffers.c |  8 +++-
 src/test/test_util.c| 29 ++---
 2 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/src/test/test_buffers.c b/src/test/test_buffers.c
index ce5ac97..38b0824 100644
--- a/src/test/test_buffers.c
+++ b/src/test/test_buffers.c
@@ -611,7 +611,11 @@ 
test_buffers_compress_fin_at_chunk_end_impl(compress_method_t method,
 
   tt_int_op(fetch_from_buf(contents, in_len, buf), OP_EQ, 0);
 
-  tt_uint_op(in_len, OP_GT, headerjunk);
+  if (method == NO_METHOD) {
+tt_uint_op(in_len, OP_EQ, headerjunk);
+  } else {
+tt_uint_op(in_len, OP_GT, headerjunk);
+  }
 
   tt_int_op(0, OP_EQ, tor_uncompress(&expanded, &out_len,
  contents + headerjunk,
@@ -855,6 +859,8 @@ struct testcase_t buffer_tests[] = {
 &passthrough_setup, (char*)"x-zstd" },
   { "compress/lzma", test_buffers_compress, TT_FORK,
 &passthrough_setup, (char*)"x-lzma" },
+  { "compress/none", test_buffers_compress, TT_FORK,
+&passthrough_setup, (char*)"identity" },
 
   END_OF_TESTCASES
 };
diff --git a/src/test/test_util.c b/src/test/test_util.c
index dec1d52..56e39a3 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -2255,8 +2255,15 @@ test_util_compress_impl(compress_method_t method)
 
   tt_assert(!tor_compress(&buf2, &len1, buf1, strlen(buf1)+1, method));
   tt_assert(buf2 != NULL);
-  tt_int_op(len1, OP_LT, strlen(buf1));
-  tt_int_op(detect_compression_method(buf2, len1), OP_EQ, method);
+  if (method == NO_METHOD) {
+// The identity transform doesn't actually compress, and it isn't
+// detectable as "the identity transform."
+tt_int_op(len1, OP_EQ, strlen(buf1)+1);
+tt_int_op(detect_compression_method(buf2, len1), OP_EQ, UNKNOWN_METHOD);
+  } else {
+tt_int_op(len1, OP_LT, strlen(buf1));
+tt_int_op(detect_compression_method(buf2, len1), OP_EQ, method);
+  }
 
   tt_assert(!tor_uncompress(&buf3, &len2, buf2, len1, method, 1, LOG_INFO));
   tt_assert(buf3 != NULL);
@@ -2300,11 +2307,14 @@ test_util_compress_impl(compress_method_t method)
   tt_assert(fast_memeq(buf1, buf3, len2));
   tt_int_op(buf3[len2], OP_EQ, 0);
 
-  /* when we demand a complete output, this must fail. */
+  /* when we demand a complete output from a real compression method, this
+   * must fail. */
   tor_free(buf3);
-  tt_assert(tor_uncompress(&buf3, &len2, buf2, len1-16,
-   method, 1, LOG_INFO));
-  tt_assert(buf3 == NULL);
+  if (method != NO_METHOD) {
+tt_assert(tor_uncompress(&buf3, &len2, buf2, len1-16,
+ method, 1, LOG_INFO));
+tt_assert(buf3 == NULL);
+  }
 
  done:
   tor_free(buf1);
@@ -2337,7 +2347,11 @@ test_util_compress_stream_impl(compress_method_t method,
   tt_int_op(tor_compress_process(state, &cp1, &len1, &ccp2, &len2, 1),
 OP_EQ, TOR_COMPRESS_DONE);
   tt_int_op(0, OP_EQ, len2);
-  tt_assert(cp1 > cp2); /* Make sure we really added something. */
+  if (method == NO_METHOD) {
+tt_ptr_op(cp1, OP_EQ, cp2);
+  } else {
+tt_assert(cp1 > cp2); /* Make sure we really added something. */
+  }
 
   tt_assert(!tor_uncompress(&buf3, &len2, buf1, 1024-len1,
 method, 1, LOG_WARN));
@@ -5755,6 +5769,7 @@ struct testcase_t util_tests[] = {
   COMPRESS(gzip, "gzip"),
   COMPRESS(lzma, "x-lzma"),
   COMPRESS(zstd, "x-zstd"),
+  COMPRESS(none, "identity"),
   UTIL_TEST(gzip_compression_bomb, TT_FORK),
   UTIL_LEGACY(datadir),
   UTIL_LEGACY(memarea),



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


[tor-commits] [tor/master] Merge branch 'compress_none_v2_squashed'

2017-05-02 Thread nickm
commit 584ab1f29b05b6cd0c63c16668b1c260a957656b
Merge: 465448e 3836d94
Author: Nick Mathewson 
Date:   Tue May 2 08:33:35 2017 -0400

Merge branch 'compress_none_v2_squashed'

 src/common/compress.c  | 15 +++--
 src/common/compress_none.c | 53 ++
 src/common/compress_none.h | 20 +
 src/common/include.am  |  4 +++-
 src/test/test_buffers.c|  8 ++-
 src/test/test_util.c   | 29 +++--
 6 files changed, 118 insertions(+), 11 deletions(-)

diff --cc src/test/test_buffers.c
index c0e222b,38b0824..07114a8
--- a/src/test/test_buffers.c
+++ b/src/test/test_buffers.c
@@@ -854,7 -858,9 +858,9 @@@ struct testcase_t buffer_tests[] = 
{ "compress/zstd", test_buffers_compress, TT_FORK,
  &passthrough_setup, (char*)"x-zstd" },
{ "compress/lzma", test_buffers_compress, TT_FORK,
 -&passthrough_setup, (char*)"x-lzma" },
 +&passthrough_setup, (char*)"x-tor-lzma" },
+   { "compress/none", test_buffers_compress, TT_FORK,
+ &passthrough_setup, (char*)"identity" },
  
END_OF_TESTCASES
  };
diff --cc src/test/test_util.c
index 022f29c,56e39a3..b3f8ecd
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@@ -5753,8 -5767,9 +5767,9 @@@ struct testcase_t util_tests[] = 
UTIL_LEGACY(pow2),
COMPRESS(zlib, "deflate"),
COMPRESS(gzip, "gzip"),
 -  COMPRESS(lzma, "x-lzma"),
 +  COMPRESS(lzma, "x-tor-lzma"),
COMPRESS(zstd, "x-zstd"),
+   COMPRESS(none, "identity"),
UTIL_TEST(gzip_compression_bomb, TT_FORK),
UTIL_LEGACY(datadir),
UTIL_LEGACY(memarea),

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


[tor-commits] [tor/master] Treat the identity transformation as another kind of compression.

2017-05-02 Thread nickm
commit 1bc2d82579b6472357d43f07a85142b6614a
Author: Nick Mathewson 
Date:   Thu Apr 27 10:00:41 2017 -0400

Treat the identity transformation as another kind of compression.

This will allow us to treat NO_METHOD as a real compression method,
and to simplify code that currently does

   if (compressing) {
  compress
   } else {
  copy
   }
---
 src/common/compress.c  | 15 +++--
 src/common/compress_none.c | 53 ++
 src/common/compress_none.h | 20 +
 src/common/include.am  |  4 +++-
 4 files changed, 89 insertions(+), 3 deletions(-)

diff --git a/src/common/compress.c b/src/common/compress.c
index 9a24025..e1571c7 100644
--- a/src/common/compress.c
+++ b/src/common/compress.c
@@ -24,6 +24,7 @@
 #include "torlog.h"
 #include "compress.h"
 #include "compress_lzma.h"
+#include "compress_none.h"
 #include "compress_zlib.h"
 #include "compress_zstd.h"
 
@@ -67,8 +68,12 @@ guess_compress_size(int compress, compress_method_t method,
 size_t in_len)
 {
   // ignore these for now.
-  (void)method;
   (void)compression_level;
+  if (method == NO_METHOD) {
+/* Guess that we'll need an extra byte, to avoid a needless realloc
+ * for nul-termination */
+return (in_len < SIZE_MAX) ? in_len + 1 : in_len;
+  }
 
   /* Always guess a factor of 2. */
   if (compress) {
@@ -279,6 +284,7 @@ tor_compress_supports_method(compress_method_t method)
 case ZSTD_METHOD:
   return tor_zstd_method_supported();
 case NO_METHOD:
+  return 1;
 case UNKNOWN_METHOD:
 default:
   return 0;
@@ -436,7 +442,9 @@ tor_compress_new(int compress, compress_method_t method,
   state->u.zstd_state = zstd_state;
   break;
 }
-case NO_METHOD:
+case NO_METHOD: {
+  break;
+}
 case UNKNOWN_METHOD:
   goto err;
   }
@@ -484,6 +492,8 @@ tor_compress_process(tor_compress_state_t *state,
out, out_len, in, in_len,
finish);
 case NO_METHOD:
+  return tor_cnone_compress_process(out, out_len, in, in_len,
+finish);
 case UNKNOWN_METHOD:
   goto err;
   }
@@ -511,6 +521,7 @@ tor_compress_free(tor_compress_state_t *state)
   tor_zstd_compress_free(state->u.zstd_state);
   break;
 case NO_METHOD:
+  break;
 case UNKNOWN_METHOD:
   break;
   }
diff --git a/src/common/compress_none.c b/src/common/compress_none.c
new file mode 100644
index 000..b76e601
--- /dev/null
+++ b/src/common/compress_none.c
@@ -0,0 +1,53 @@
+/* Copyright (c) 2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2017, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file compress_lzma.c
+ * \brief Compression backend for identity compression.
+ *
+ * We actually define this backend so that we can treat the identity transform
+ * as another case of compression.
+ *
+ * This module should never be invoked directly. Use the compress module
+ * instead.
+ **/
+
+#include "orconfig.h"
+
+#include "util.h"
+#include "torlog.h"
+#include "compress.h"
+#include "compress_none.h"
+
+/** Transfer some bytes using the identity transformation.  Read up to
+ * *in_len bytes from *in, and write up to *out_len bytes
+ * to *out, adjusting the values as we go.  If finish is true,
+ * we've reached the end of the input.
+ *
+ * Return TOR_COMPRESS_DONE if we've finished the entire
+ * compression/decompression.
+ * Return TOR_COMPRESS_OK if we're processed everything from the input.
+ * Return TOR_COMPRESS_BUFFER_FULL if we're out of space on out.
+ * Return TOR_COMPRESS_ERROR if the stream is corrupt.
+ */
+tor_compress_output_t
+tor_cnone_compress_process(char **out, size_t *out_len,
+   const char **in, size_t *in_len,
+   int finish)
+{
+  size_t n_to_copy = MIN(*in_len, *out_len);
+
+  memcpy(*out, *in, n_to_copy);
+  *out += n_to_copy;
+  *in += n_to_copy;
+  *out_len -= n_to_copy;
+  *in_len -= n_to_copy;
+  if (*in_len == 0) {
+return finish ? TOR_COMPRESS_DONE : TOR_COMPRESS_OK;
+  } else {
+return TOR_COMPRESS_BUFFER_FULL;
+  }
+}
+
diff --git a/src/common/compress_none.h b/src/common/compress_none.h
new file mode 100644
index 000..d1ebb4b
--- /dev/null
+++ b/src/common/compress_none.h
@@ -0,0 +1,20 @@
+/* Copyright (c) 2003, Roger Dingledine
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2017, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file compress_none.h
+ * \brief Header for compress_none.c
+ **/
+
+#ifndef TOR_COMPRESS_NONE_H
+#define TOR_COMPRESS_NONE_H
+
+tor_compress_output_t
+tor_cnone_compress_process(char **out, size_t *out_len,
+   const char **in, size_t *in_len,
+

[tor-commits] [translation/exoneratorproperties] Update translations for exoneratorproperties

2017-05-02 Thread translation
commit 0abe62a9f5b51999f07287113f0cb4ce66bddbcf
Author: Translation commit bot 
Date:   Tue May 2 10:48:20 2017 +

Update translations for exoneratorproperties
---
 hu/exonerator.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hu/exonerator.properties b/hu/exonerator.properties
index 78a793c..4089b69 100644
--- a/hu/exonerator.properties
+++ b/hu/exonerator.properties
@@ -49,6 +49,6 @@ footer.aboutexonerator.heading=Az ExoneraTor -ról
 footer.aboutexonerator.body=Az ExoneraTor egy szolgáltatás, ami az IP 
címeit tartja nyilván a Tor hálózat tagjainak.  Megválaszolja azt a 
kérdést is, hogy adott időben egy IP cím Tor relé volt-e.  Az 
ExoneraTor több IP címet is tárolhat, egy reléről, ha más IP címet 
használ az Internetre kilépéshez, mint a Tor hálózathoz regisztráláshoz, 
és tárolja az is, hogy a relé tranzit a Tor forgalomnak, vagy Internet felé 
kilépési pont adott időben.
 footer.trademark.text=A "Tor" és az "Onion Logo" %s a The Tor Project, Inc. 
-nek.
 footer.trademark.link=bejegyzett védjegyei
-footer.language.name=English
-footer.language.text=This page is also available in the following languages\:
+footer.language.name=Angol
+footer.language.text=Ez az oldal a következő nyelveken is elérhető\:
 

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


[tor-commits] [translation/exoneratorproperties_completed] Update translations for exoneratorproperties_completed

2017-05-02 Thread translation
commit b6ff39a6d00a9fb706f630c338991f42fc2d474a
Author: Translation commit bot 
Date:   Tue May 2 10:48:23 2017 +

Update translations for exoneratorproperties_completed
---
 hu/exonerator.properties | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hu/exonerator.properties b/hu/exonerator.properties
index 7b1d872..4089b69 100644
--- a/hu/exonerator.properties
+++ b/hu/exonerator.properties
@@ -49,4 +49,6 @@ footer.aboutexonerator.heading=Az ExoneraTor -ról
 footer.aboutexonerator.body=Az ExoneraTor egy szolgáltatás, ami az IP 
címeit tartja nyilván a Tor hálózat tagjainak.  Megválaszolja azt a 
kérdést is, hogy adott időben egy IP cím Tor relé volt-e.  Az 
ExoneraTor több IP címet is tárolhat, egy reléről, ha más IP címet 
használ az Internetre kilépéshez, mint a Tor hálózathoz regisztráláshoz, 
és tárolja az is, hogy a relé tranzit a Tor forgalomnak, vagy Internet felé 
kilépési pont adott időben.
 footer.trademark.text=A "Tor" és az "Onion Logo" %s a The Tor Project, Inc. 
-nek.
 footer.trademark.link=bejegyzett védjegyei
+footer.language.name=Angol
+footer.language.text=Ez az oldal a következő nyelveken is elérhető\:
 

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


[tor-commits] [translation/tails-misc_completed] Update translations for tails-misc_completed

2017-05-02 Thread translation
commit a4136a7cb2d613841073130670a9c1bb1179f754
Author: Translation commit bot 
Date:   Tue May 2 10:46:21 2017 +

Update translations for tails-misc_completed
---
 hu.po | 90 ---
 1 file changed, 27 insertions(+), 63 deletions(-)

diff --git a/hu.po b/hu.po
index 2aec704..c57e867 100644
--- a/hu.po
+++ b/hu.po
@@ -4,7 +4,7 @@
 # 
 # Translators:
 # benewfy , 2015-2016
-# Falu , 2016
+# Falu , 2016-2017
 # Blackywantscookies, 2014
 # Blackywantscookies, 2014
 # iskr , 2013
@@ -15,9 +15,9 @@ msgid ""
 msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-02 16:02+0200\n"
-"PO-Revision-Date: 2016-09-03 08:57+\n"
-"Last-Translator: carolyn \n"
+"POT-Creation-Date: 2017-04-18 12:55+0200\n"
+"PO-Revision-Date: 2017-05-02 10:22+\n"
+"Last-Translator: Falu \n"
 "Language-Team: Hungarian 
(http://www.transifex.com/otf/torproject/language/hu/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -103,6 +103,19 @@ msgstr "Újraindítás"
 msgid "Power Off"
 msgstr "Leállítás"
 
+#: config/chroot_local-includes/usr/local/lib/tails-32-bit-notify-user:59
+msgid "Warning: Tails 3.0 won't work on this computer!"
+msgstr "Figyelem: A Tails 3.0 nem fog működni ezen a számítógépen!"
+
+#: config/chroot_local-includes/usr/local/lib/tails-32-bit-notify-user:60
+msgid "Tails 3.0 will require a 64-bit processor."
+msgstr "A Tails 3.0 használatához 64-bites processzor szükséges."
+
+#: config/chroot_local-includes/usr/local/lib/tails-32-bit-notify-user:63
+#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:83
+msgid "Learn more"
+msgstr "További információ"
+
 #: config/chroot_local-includes/usr/local/bin/tails-about:22
 #: 
../config/chroot_local-includes/usr/share/desktop-directories/Tails.directory.in.h:1
 msgid "Tails"
@@ -160,11 +173,11 @@ msgstr "A Tor-nak szüksége van egy megbízható órára 
a megfelelő működé
 msgid "Failed to synchronize the clock!"
 msgstr "Az óra szinkronizálása nem sikerült!"
 
-#: config/chroot_local-includes/usr/local/bin/tails-security-check:146
+#: config/chroot_local-includes/usr/local/bin/tails-security-check:124
 msgid "This version of Tails has known security issues:"
 msgstr "A Tails ezen verziója ismert biztonsági problémákkal rendelkezik:"
 
-#: config/chroot_local-includes/usr/local/bin/tails-security-check:156
+#: config/chroot_local-includes/usr/local/bin/tails-security-check:134
 msgid "Known security issues"
 msgstr "Ismert biztonsági problémák"
 
@@ -214,21 +227,21 @@ msgid ""
 "See https://tails.boum.org/doc/first_steps/upgrade#manual";
 msgstr "Nincs elég memória a frissítések 
ellenőrzéséhez.\n\nGyőződjön meg róla a számítógépe megfelel a 
minimális rendszerkövetelményeknek.\nTovábbi információt itt talál: 
file:///usr/share/doc/tails/website/doc/about/requirements.en.html\n\nIndítsa 
újra a Tail-s és próbálja meg mégegyszer frissíteni.\n\nVagy frissítse 
manuálisan: https://tails.boum.org/doc/first_steps/upgrade#manual";
 
-#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:67
+#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:71
 msgid "Warning: virtual machine detected!"
 msgstr "Figyelem: virtualizált gép /VM/ érzékelve!"
 
-#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:69
+#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:73
 msgid ""
 "Both the host operating system and the virtualization software are able to "
 "monitor what you are doing in Tails."
 msgstr "Az operációs rendszer, és a virtualizációs szoftver is képes 
megfigyelni amit a Tails-ben csinál!"
 
-#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:72
+#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:76
 msgid "Warning: non-free virtual machine detected!"
 msgstr "Figyelem: nem ingyenes virtualizációs szoftver /VM/ érzékelve!"
 
-#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:74
+#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:78
 msgid ""
 "Both the host operating system and the virtualization software are able to "
 "monitor what you are doing in Tails. Only free software can be considered "
@@ -236,23 +249,19 @@ msgid ""
 "software."
 msgstr "Az operációs rendszer, és a virtualizációs szoftver is képes 
megfigyelni amit a Tails-ben csinál! Általában csak az ingyenes szoftverek 
megbízhatóak, ezért ajánljuk hogy használjon ingyenes operációs 
rendszert és virtualizációs szoftvert."
 
-#: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:79
-msgid "Learn more"
-msgstr "További információ"
-
-#: config/chroot_local-includes/usr/local/bin/tor-browser:40
+#: config/chroot_local-includes/usr/local/bin/tor-browser:43
 msgid "Tor is not ready"
 msgstr "A Tor még nem áll kÃ

[tor-commits] [translation/tails-misc] Update translations for tails-misc

2017-05-02 Thread translation
commit e113475406ed2c6bbf821bbb9750913d90746155
Author: Translation commit bot 
Date:   Tue May 2 10:46:17 2017 +

Update translations for tails-misc
---
 hu.po | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/hu.po b/hu.po
index 8015ea2..c57e867 100644
--- a/hu.po
+++ b/hu.po
@@ -4,7 +4,7 @@
 # 
 # Translators:
 # benewfy , 2015-2016
-# Falu , 2016
+# Falu , 2016-2017
 # Blackywantscookies, 2014
 # Blackywantscookies, 2014
 # iskr , 2013
@@ -15,9 +15,9 @@ msgid ""
 msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-04-06 21:07+0200\n"
-"PO-Revision-Date: 2017-04-07 10:06+\n"
-"Last-Translator: carolyn \n"
+"POT-Creation-Date: 2017-04-18 12:55+0200\n"
+"PO-Revision-Date: 2017-05-02 10:22+\n"
+"Last-Translator: Falu \n"
 "Language-Team: Hungarian 
(http://www.transifex.com/otf/torproject/language/hu/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -105,11 +105,11 @@ msgstr "Leállítás"
 
 #: config/chroot_local-includes/usr/local/lib/tails-32-bit-notify-user:59
 msgid "Warning: Tails 3.0 won't work on this computer!"
-msgstr ""
+msgstr "Figyelem: A Tails 3.0 nem fog működni ezen a számítógépen!"
 
 #: config/chroot_local-includes/usr/local/lib/tails-32-bit-notify-user:60
 msgid "Tails 3.0 will require a 64-bit processor."
-msgstr ""
+msgstr "A Tails 3.0 használatához 64-bites processzor szükséges."
 
 #: config/chroot_local-includes/usr/local/lib/tails-32-bit-notify-user:63
 #: config/chroot_local-includes/usr/local/lib/tails-virt-notify-user:83

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


[tor-commits] [translation/whisperback_completed] Update translations for whisperback_completed

2017-05-02 Thread translation
commit 7de2c43490df19a6aa060889c5a746c4878434f0
Author: Translation commit bot 
Date:   Tue May 2 10:45:21 2017 +

Update translations for whisperback_completed
---
 hu/hu.po | 61 +++--
 1 file changed, 39 insertions(+), 22 deletions(-)

diff --git a/hu/hu.po b/hu/hu.po
index 3224c75..919f64a 100644
--- a/hu/hu.po
+++ b/hu/hu.po
@@ -3,15 +3,16 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
+# Falu , 2017
 # vargaviktor , 2013
 # vargaviktor , 2012
 msgid ""
 msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-12-16 19:54+0100\n"
-"PO-Revision-Date: 2016-03-21 16:28+\n"
-"Last-Translator: vargaviktor \n"
+"POT-Creation-Date: 2017-03-20 12:09+\n"
+"PO-Revision-Date: 2017-05-02 10:24+\n"
+"Last-Translator: Falu \n"
 "Language-Team: Hungarian 
(http://www.transifex.com/otf/torproject/language/hu/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -41,40 +42,56 @@ msgid ""
 "/etc/whisperback/config.py, ~/.whisperback/config.py, ./config.py"
 msgstr "A %s változó nem található a egyik konfigurációs állományban 
sem az alábbiak közül /etc/whisperback/config.py, ~/.whisperback/config.py, 
./config.py"
 
-#: ../whisperBack/gui.py:148
+#: ../whisperBack/gui.py:110
+msgid "Name of the affected software"
+msgstr "Az érintett szoftver neve"
+
+#: ../whisperBack/gui.py:112
+msgid "Exact steps to reproduce the error"
+msgstr "A hiba reprodukálásának pontos lépései"
+
+#: ../whisperBack/gui.py:114
+msgid "Actual result and description of the error"
+msgstr "Aktuális eredmény és a hiba leírása"
+
+#: ../whisperBack/gui.py:116
+msgid "Desired result"
+msgstr "Elvárt eredmény"
+
+#: ../whisperBack/gui.py:152
 msgid "Unable to load a valid configuration."
 msgstr "Nem lehetséges érvényes konfiguráció betöltése."
 
-#: ../whisperBack/gui.py:214
+#: ../whisperBack/gui.py:218
 msgid "Sending mail..."
 msgstr "Email küldése..."
 
-#: ../whisperBack/gui.py:215
+#: ../whisperBack/gui.py:219
 msgid "Sending mail"
 msgstr "Email küldése"
 
 #. pylint: disable=C0301
-#: ../whisperBack/gui.py:217
+#: ../whisperBack/gui.py:221
 msgid "This could take a while..."
 msgstr "Ez egy kis időt vehet igénybe..."
 
-#: ../whisperBack/gui.py:232
+#: ../whisperBack/gui.py:236
 msgid "The contact email adress doesn't seem valid."
 msgstr "Az email cím nem tűnik érvényesnek."
 
-#: ../whisperBack/gui.py:249
+#: ../whisperBack/gui.py:253
 msgid "Unable to send the mail: SMTP error."
 msgstr "Sikertelen email küldés: SMTP hiba."
 
-#: ../whisperBack/gui.py:251
+#: ../whisperBack/gui.py:255
 msgid "Unable to connect to the server."
 msgstr "Nem lehetséges a kapcsolódás a szerverhez."
 
-#: ../whisperBack/gui.py:253
+#: ../whisperBack/gui.py:257
 msgid "Unable to create or to send the mail."
 msgstr "Az email létrehozása vagy küldése sikertelen."
 
-#: ../whisperBack/gui.py:256
+#: ../whisperBack/gui.py:260
 msgid ""
 "\n"
 "\n"
@@ -83,20 +100,20 @@ msgid ""
 "If it does not work, you will be offered to save the bug report."
 msgstr "\n\nA hibajelentés elküldése sikertelen, valószínűleg hálózati 
problémák miatt. Kérjük csatlakozzon újra a hálózathoz, majd kattintson 
a küldésre újra.\n\nHa ez nem működik, lehetősége lesz lementeni a 
hibajelentést."
 
-#: ../whisperBack/gui.py:269
+#: ../whisperBack/gui.py:273
 msgid "Your message has been sent."
 msgstr "Az üzenete elküldésre került."
 
-#: ../whisperBack/gui.py:276
+#: ../whisperBack/gui.py:280
 msgid "An error occured during encryption."
 msgstr "Hiba történt a titkosítás során."
 
-#: ../whisperBack/gui.py:296
+#: ../whisperBack/gui.py:300
 #, python-format
 msgid "Unable to save %s."
 msgstr "A %s mentése sikertelen."
 
-#: ../whisperBack/gui.py:319
+#: ../whisperBack/gui.py:323
 #, python-format
 msgid ""
 "The bug report could not be sent, likely due to network problems.\n"
@@ -106,27 +123,27 @@ msgid ""
 "Do you want to save the bug report to a file?"
 msgstr "A hibabejelentés nem volt elküldhető hálózati probléma 
miatt.\n\nKerülő lehetőségként lementheti a hibát egy  USB meghajtóra, 
elküldheti a %s címre, az email címéről, egy másik gépről. Fontos, hogy 
tudja, hogy eze esetben nem lesz névtelen a beküldése, csak akkor ha 
további lépéseket tesz. (Például: Tor-t egy eldobható email címmel 
együtt használva.)\n\nSzeretné lementeni a hibajelentést egy fájlba?"
 
-#: ../whisperBack/gui.py:379 ../data/whisperback.ui.h:21
+#: ../whisperBack/gui.py:383 ../data/whisperback.ui.h:21
 msgid "WhisperBack"
 msgstr "WhisperBack"
 
-#: ../whisperBack/gui.py:380 ../data/whisperback.ui.h:2
+#: ../whisperBack/gui.py:384 ../data/whisperback.ui.h:2
 msgid "Send feedback in an encrypted mail."
 msgstr "Visszajelzés küldése titkosított emailben."
 
-#: ../whisperBack/gui.py:383
+#: ../whispe

[tor-commits] [translation/torcheck_completed] Update translations for torcheck_completed

2017-05-02 Thread translation
commit e3ecf2d53c9d3eba58984f040a90461087fc4755
Author: Translation commit bot 
Date:   Tue May 2 10:45:14 2017 +

Update translations for torcheck_completed
---
 hu/torcheck.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hu/torcheck.po b/hu/torcheck.po
index 24c418b..fa22bd4 100644
--- a/hu/torcheck.po
+++ b/hu/torcheck.po
@@ -3,7 +3,7 @@
 # 
 # Translators:
 # benewfy , 2015
-# Blackywantscookies , 2014
+# Blackywantscookies, 2014
 # Lajos Pasztor , 2014
 # benewfy , 2015
 # vargaviktor , 2015
@@ -12,7 +12,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "POT-Creation-Date: 2012-02-16 20:28+PDT\n"
-"PO-Revision-Date: 2016-03-21 16:27+\n"
+"PO-Revision-Date: 2017-05-02 10:23+\n"
 "Last-Translator: benewfy \n"
 "Language-Team: Hungarian 
(http://www.transifex.com/otf/torproject/language/hu/)\n"
 "MIME-Version: 1.0\n"

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


[tor-commits] [translation/whisperback] Update translations for whisperback

2017-05-02 Thread translation
commit 02e5c5402daf1b6e88c13118c4b81e5fd5d43c55
Author: Translation commit bot 
Date:   Tue May 2 10:45:17 2017 +

Update translations for whisperback
---
 hu/hu.po | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/hu/hu.po b/hu/hu.po
index 48adb46..919f64a 100644
--- a/hu/hu.po
+++ b/hu/hu.po
@@ -3,6 +3,7 @@
 # This file is distributed under the same license as the PACKAGE package.
 # 
 # Translators:
+# Falu , 2017
 # vargaviktor , 2013
 # vargaviktor , 2012
 msgid ""
@@ -10,8 +11,8 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-03-20 12:09+\n"
-"PO-Revision-Date: 2017-03-21 08:24+\n"
-"Last-Translator: carolyn \n"
+"PO-Revision-Date: 2017-05-02 10:24+\n"
+"Last-Translator: Falu \n"
 "Language-Team: Hungarian 
(http://www.transifex.com/otf/torproject/language/hu/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -43,19 +44,19 @@ msgstr "A %s változó nem található a egyik 
konfigurációs állományban sem
 
 #: ../whisperBack/gui.py:110
 msgid "Name of the affected software"
-msgstr ""
+msgstr "Az érintett szoftver neve"
 
 #: ../whisperBack/gui.py:112
 msgid "Exact steps to reproduce the error"
-msgstr ""
+msgstr "A hiba reprodukálásának pontos lépései"
 
 #: ../whisperBack/gui.py:114
 msgid "Actual result and description of the error"
-msgstr ""
+msgstr "Aktuális eredmény és a hiba leírása"
 
 #: ../whisperBack/gui.py:116
 msgid "Desired result"
-msgstr ""
+msgstr "Elvárt eredmény"
 
 #: ../whisperBack/gui.py:152
 msgid "Unable to load a valid configuration."

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


[tor-commits] [translation/torcheck] Update translations for torcheck

2017-05-02 Thread translation
commit a5d398cee8a5b2b605c3fadabccb1c9b0b440c4a
Author: Translation commit bot 
Date:   Tue May 2 10:45:09 2017 +

Update translations for torcheck
---
 hu/torcheck.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hu/torcheck.po b/hu/torcheck.po
index 24c418b..fa22bd4 100644
--- a/hu/torcheck.po
+++ b/hu/torcheck.po
@@ -3,7 +3,7 @@
 # 
 # Translators:
 # benewfy , 2015
-# Blackywantscookies , 2014
+# Blackywantscookies, 2014
 # Lajos Pasztor , 2014
 # benewfy , 2015
 # vargaviktor , 2015
@@ -12,7 +12,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "POT-Creation-Date: 2012-02-16 20:28+PDT\n"
-"PO-Revision-Date: 2016-03-21 16:27+\n"
+"PO-Revision-Date: 2017-05-02 10:23+\n"
 "Last-Translator: benewfy \n"
 "Language-Team: Hungarian 
(http://www.transifex.com/otf/torproject/language/hu/)\n"
 "MIME-Version: 1.0\n"

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


[tor-commits] [webwml/staging] Add comm dir job posting

2017-05-02 Thread hiro
commit e0c1e60cbeb2f20ad348fd2c212a25e6f864a5d8
Author: hiromipaw 
Date:   Tue May 2 12:01:39 2017 +0200

Add comm dir job posting
---
 about/en/jobs-comm-director.wml | 19 +++
 about/en/jobs.wml   | 16 
 2 files changed, 11 insertions(+), 24 deletions(-)

diff --git a/about/en/jobs-comm-director.wml b/about/en/jobs-comm-director.wml
index a30ac81..238f6a0 100644
--- a/about/en/jobs-comm-director.wml
+++ b/about/en/jobs-comm-director.wml
@@ -11,26 +11,13 @@
   

 Internet Freedom Nonprofit Seeks Experienced Communications Director
-(Posted January 10, 2017)
+(Posted May 2, 2017)
 
 
-The Tor Project, Inc., a 501(c)(3) nonprofit organization that provides 
technical
-infrastructure for privacy protection over the Internet, is seeking a  
Communications
-Director to help us tell the world about our important work.
-The ideal candidate will have at least five years of experience talking with 
the
-press and leading social media campaigns.
-The ability to explain technical concepts to non-technical audiences is 
essential.
+The Tor Project, Inc., a 501(c)(3) nonprofit organization that provides 
technical infrastructure for privacy protection over the Internet, is seeking a 
Communications Director to help us tell the world about our important work. The 
ideal candidate will have at least five years of experience talking with the 
press and leading social media campaigns. The ability to explain technical 
concepts to non-technical audiences is essential.
 
 
-This senior level position will report directly to the Executive
-Director and will be part of the organization's leadership team. The
-Communications Director will set and guide the strategy for all
-communications and public relations messages to consistently articulate
-the Tor Project's mission. Tor software is built by a mix of paid staff
-and volunteers. This job includes working closely with this diverse,
-international community of people who make Tor and related software
-products. This is a hands-on position for a highly skilled
-communications professional.
+This senior level position will report directly to the Executive Director and 
will be part of the organization's leadership team. The Communications Director 
will set and guide the strategy for all communications and public relations 
messages to consistently articulate the Tor Project's mission. Tor software is 
built by a mix of paid staff and volunteers. This job includes working closely 
with this diverse, international community of people who make Tor and related 
software products. This is a hands-on position for a highly skilled 
communications professional with a fierce passion for technology and social 
media.
 
 
 Responsibilities:
diff --git a/about/en/jobs.wml b/about/en/jobs.wml
index c8110fe..d99753b 100644
--- a/about/en/jobs.wml
+++ b/about/en/jobs.wml
@@ -10,16 +10,16 @@
 Jobs
   

-   #The Tor Project is always looking for more great people to 
join our team!
+   The Tor Project is always looking for more great people to 
join our team!
 
-   At the moment, we don't have any official open positions. 
Please check back
-   soon, though! In the meantime, you may want to glance at our
-   volunteers page.
+   #At the moment, we don't have any official open positions. 
Please check back
+   # soon, though! In the meantime, you may want to glance at our
+   #volunteers page.
 
-   #Specifically, we're looking for the following people 
currently:
-   #
-   #  Writer/Editor
-   #
+   Specifically, we're looking for the following people 
currently:
+   
+ Director of 
Communications
+   
 
 
In the past, we looked for the following people:

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


[tor-commits] [webwml/staging] link to linus's new corpdocs folder too

2017-05-02 Thread hiro
commit 050b4eb122fec33c29860f839ce37f3c87c3acb9
Author: Roger Dingledine 
Date:   Fri Apr 21 17:44:28 2017 -0400

link to linus's new corpdocs folder too

now we have a bunch of our founding documents in a git repository!
---
 about/en/financials.wml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/about/en/financials.wml b/about/en/financials.wml
index 8e64b14..35622d0 100644
--- a/about/en/financials.wml
+++ b/about/en/financials.wml
@@ -13,6 +13,9 @@
   
 Tor: Financial Reports
   
+   Founding Documents
+   https://gitweb.torproject.org/company/policies.git/tree/corpdocs";>Form 
1023, Articles of Organization, IRS Determination Letter, and more
+
Fiscal Year 2016
2016-12-05 Tor Project 
Bylaws
2016 IRS Form 990 and other forms expected like usual in late 
2017



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


[tor-commits] [webwml/staging] linus has made a better index of the corpdocs

2017-05-02 Thread hiro
commit 7669ed0168b7a07b867a9bb7d58679d806da1d93
Author: Roger Dingledine 
Date:   Fri Apr 21 19:11:13 2017 -0400

linus has made a better index of the corpdocs
---
 about/en/financials.wml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/about/en/financials.wml b/about/en/financials.wml
index 35622d0..412e599 100644
--- a/about/en/financials.wml
+++ b/about/en/financials.wml
@@ -14,7 +14,7 @@
 Tor: Financial Reports
   
Founding Documents
-   https://gitweb.torproject.org/company/policies.git/tree/corpdocs";>Form 
1023, Articles of Organization, IRS Determination Letter, and more
+   https://gitweb.torproject.org/company/policies.git/plain/corpdocs/index.html";>Form
 1023, Articles of Organization, IRS Determination Letter, and more
 
Fiscal Year 2016
2016-12-05 Tor Project 
Bylaws



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


[tor-commits] [webwml/staging] update the sponsors page for 2017 so far

2017-05-02 Thread hiro
commit 774b4d929170e575561a4e1aa7f208120300
Author: Roger Dingledine 
Date:   Fri Apr 21 14:51:43 2017 -0400

update the sponsors page for 2017 so far
---
 about/en/sponsors.wml | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/about/en/sponsors.wml b/about/en/sponsors.wml
index f783dee..7f624c1 100644
--- a/about/en/sponsors.wml
+++ b/about/en/sponsors.wml
@@ -23,18 +23,22 @@
 Tor network.
 
 
-Active Sponsors in 2016:
+Active Sponsors in 2017:
   
  Tens of thousands of personal 
donations from individuals like you (2006-present)
- http://code.google.com/soc/";>Google Summer of Code 
(2007-2014 and 2016)
- http://www.rfa.org/english/";>Radio Free Asia 
(2012-2016)
- http://nsf.gov/";>National Science Foundation joint 
with Princeton University (2012-2016)
+ http://code.google.com/soc/";>Google Summer of Code 
(2007-2014 and 2016-2017)
+ https://www.mozilla.org/en-US/moss/";>Mozilla 
(2016-2017)
+ https://www.opentech.fund/";>Open Technology Fund 
(2012-2017)
+ http://mediademocracyfund.org/";>Media Democracy Fund 
(2016-2017)
+ http://nsf.gov/";>National Science Foundation joint 
with Princeton University (2012-2017)
  http://nsf.gov/";>National Science Foundation via 
University of Minnesota (2013-2017)
  http://nsf.gov/";>National Science Foundation joint 
with Georgetown (2015-2018)
- https://www.fastly.com/";>Fastly (2016)
- http://www.sri.com/";>SRI International 
(2011-2016)
+ http://nsf.gov/";>National Science Foundation joint 
with Rochester Institute of Technology (2016-2019)
+ http://nsf.gov/";>National Science Foundation joint 
with University of Illinois at Chicago (2016-2018)
+ https://www.fastly.com/";>Fastly (2016-2017)
+ http://www.sri.com/";>SRI International 
(2011-2017)
  http://www.state.gov/j/drl/";>US Department of State 
Bureau of Democracy, Human Rights, and Labor (2013-2016)
- An anonymous North American ISP (2009-present)
+ Team Cymru (2009-present)
   
 
 Past sponsors



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


[tor-commits] [webwml/staging] Deprecate old Tor Browser versions

2017-05-02 Thread hiro
commit c6cbd1c6cf5819f7bab65e6147c547d82dc76461
Author: Georg Koppen 
Date:   Fri Apr 21 18:29:40 2017 +

Deprecate old Tor Browser versions
---
 projects/torbrowser/RecommendedTBBVersions | 10 --
 1 file changed, 10 deletions(-)

diff --git a/projects/torbrowser/RecommendedTBBVersions 
b/projects/torbrowser/RecommendedTBBVersions
index 925a307..4399c58 100644
--- a/projects/torbrowser/RecommendedTBBVersions
+++ b/projects/torbrowser/RecommendedTBBVersions
@@ -1,18 +1,8 @@
 [
-"6.5.1",
-"6.5.1-Linux",
-"6.5.1-MacOS",
-"6.5.1-Windows",
 "6.5.2",
 "6.5.2-Linux",
 "6.5.2-MacOS",
 "6.5.2-Windows",
-"7.0a2",
-"7.0a2-Linux",
-"7.0a2-MacOS",
-"7.0a2-Windows",
-"7.0a2-hardened",
-"7.0a2-hardened-Linux",
 "7.0a3",
 "7.0a3-Linux",
 "7.0a3-MacOS",



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


[tor-commits] [webwml/staging] add our 2015 financial docs

2017-05-02 Thread hiro
commit 0e3d2a2bc19e2131aa2da62f05b318f3c0eaf526
Author: Roger Dingledine 
Date:   Fri Apr 21 17:26:35 2017 -0400

add our 2015 financial docs
---
 ...5-TorProject-combined-Form990_PC_Audit_Results.pdf | Bin 0 -> 1504453 bytes
 ...rProject-combined-Form990_PC_Audit_Results.pdf.asc |  17 +
 2 files changed, 17 insertions(+)

diff --git a/about/findoc/2015-TorProject-combined-Form990_PC_Audit_Results.pdf 
b/about/findoc/2015-TorProject-combined-Form990_PC_Audit_Results.pdf
new file mode 100644
index 000..6852aa2
Binary files /dev/null and 
b/about/findoc/2015-TorProject-combined-Form990_PC_Audit_Results.pdf differ
diff --git 
a/about/findoc/2015-TorProject-combined-Form990_PC_Audit_Results.pdf.asc 
b/about/findoc/2015-TorProject-combined-Form990_PC_Audit_Results.pdf.asc
new file mode 100644
index 000..0d38f0e
--- /dev/null
+++ b/about/findoc/2015-TorProject-combined-Form990_PC_Audit_Results.pdf.asc
@@ -0,0 +1,17 @@
+-BEGIN PGP SIGNATURE-
+Version: GnuPG v1
+
+iQIcBAABCAAGBQJY+njXAAoJEMIYUlgZ94RR+OYQAKioA931Iyh+xaQHrfXGOCCQ
+AWxJeFLT29u1LgUrVRnpm18I3L+zaZRrM5ZiAJKz13irzMYQsUwMZZHv2PN++cLB
+VgRX0PbukYG8S9Z4HhRQKOx0VnOgLWg40gum6zRrUWiLSycVwZbi2wFO7TJjqDpF
+YCMk4IIf8/R6rwz6iy4q6HO4nr8Inu6S4u/Rn2GI5R3crk07JBc0OtshzzpgaKcn
+BadVOyT1ug3ow/ZP2lM1M5WGIZ+msXNVIdA3o35RRNN2jc/qHMNBW2fvOEftqqzM
+BhNjfidpIzasqec/hE/IW0iaKWSMll+v4FmekaSJCDkud4RD52/XIm5GNveHAx8w
+IqDAujJp0nhShr6fcKDZBMmLzJt9iL55YgmD+nLccZbcSThD8K4g8PO1IxRv35lA
+ZMNR7lrbY3cWY9z1WvY7310+VPT3breS8UK+Rlwyy1zzw20V1VV5wV2P2jBNrC0s
+LqP9cQlm+4d38zapZ/R9UmInruGHyFvTdwB32xQFATU3Dmlm72/NnIE2cW2dni90
+uoCnT/L2iNB8YtA6XJUdPm4zVDBoOPnNYQSCAQ7xXVmrOZirlmP5DiE6LyYsWHxP
+2N1jM+M/t6f34MoYBrpiabhL21HI7XRUTGzOb4G0g30FXaDzGvZMNIa3+IrEpCe/
+p4tyIV9ocbhxpa7R5OSC
+=OXNp
+-END PGP SIGNATURE-



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


[tor-commits] [webwml/staging] 0.3.0.6 is released.

2017-05-02 Thread hiro
commit c04e9bb9774f609e941b48994a46cb98399a80f9
Author: Nick Mathewson 
Date:   Wed Apr 26 15:32:35 2017 -0400

0.3.0.6 is released.
---
 Makefile | 4 ++--
 include/versions.wmi | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 5442400..7420cae 100644
--- a/Makefile
+++ b/Makefile
@@ -14,8 +14,8 @@
 # branch to your personal webwml repository, open a trac ticket in the
 # website component, and set it to needs_review.
 
-export STABLETAG=tor-0.2.9.10
-export DEVTAG=tor-0.3.0.5-rc
+export STABLETAG=tor-0.3.0.6
+export DEVTAG=tor-0.3.0.6
 
 WMLBASE=.
 SUBDIRS=docs eff projects press about download getinvolved donate 
docs/torbutton
diff --git a/include/versions.wmi b/include/versions.wmi
index 25dd28b..5173296 100644
--- a/include/versions.wmi
+++ b/include/versions.wmi
@@ -1,5 +1,5 @@
-0.2.9.10
-0.3.0.5-rc
+0.3.0.6
+
 
 0.2.9.10
 



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


[tor-commits] [webwml/staging] and link to the new financial pdf too

2017-05-02 Thread hiro
commit c55463508290fee8905548337d0437d65df20d62
Author: Roger Dingledine 
Date:   Fri Apr 21 17:35:58 2017 -0400

and link to the new financial pdf too
---
 about/en/financials.wml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/about/en/financials.wml b/about/en/financials.wml
index 76e0069..8e64b14 100644
--- a/about/en/financials.wml
+++ b/about/en/financials.wml
@@ -18,7 +18,7 @@
2016 IRS Form 990 and other forms expected like usual in late 
2017
 
Fiscal Year 2015
-2015 IRS Form 990, State of MA Form PC, and Independent Audit 
Results coming soon — sorry for the delay.
+2015 IRS 
Form 990, State of MA Form PC, and Independent Audit Results
 
Fiscal Year 2014
 2014 IRS 
Form 990, State of MA Form PC, and Independent Audit Results



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


[tor-commits] [webwml/master] Add comm dir job posting

2017-05-02 Thread hiro
commit e0c1e60cbeb2f20ad348fd2c212a25e6f864a5d8
Author: hiromipaw 
Date:   Tue May 2 12:01:39 2017 +0200

Add comm dir job posting
---
 about/en/jobs-comm-director.wml | 19 +++
 about/en/jobs.wml   | 16 
 2 files changed, 11 insertions(+), 24 deletions(-)

diff --git a/about/en/jobs-comm-director.wml b/about/en/jobs-comm-director.wml
index a30ac81..238f6a0 100644
--- a/about/en/jobs-comm-director.wml
+++ b/about/en/jobs-comm-director.wml
@@ -11,26 +11,13 @@
   

 Internet Freedom Nonprofit Seeks Experienced Communications Director
-(Posted January 10, 2017)
+(Posted May 2, 2017)
 
 
-The Tor Project, Inc., a 501(c)(3) nonprofit organization that provides 
technical
-infrastructure for privacy protection over the Internet, is seeking a  
Communications
-Director to help us tell the world about our important work.
-The ideal candidate will have at least five years of experience talking with 
the
-press and leading social media campaigns.
-The ability to explain technical concepts to non-technical audiences is 
essential.
+The Tor Project, Inc., a 501(c)(3) nonprofit organization that provides 
technical infrastructure for privacy protection over the Internet, is seeking a 
Communications Director to help us tell the world about our important work. The 
ideal candidate will have at least five years of experience talking with the 
press and leading social media campaigns. The ability to explain technical 
concepts to non-technical audiences is essential.
 
 
-This senior level position will report directly to the Executive
-Director and will be part of the organization's leadership team. The
-Communications Director will set and guide the strategy for all
-communications and public relations messages to consistently articulate
-the Tor Project's mission. Tor software is built by a mix of paid staff
-and volunteers. This job includes working closely with this diverse,
-international community of people who make Tor and related software
-products. This is a hands-on position for a highly skilled
-communications professional.
+This senior level position will report directly to the Executive Director and 
will be part of the organization's leadership team. The Communications Director 
will set and guide the strategy for all communications and public relations 
messages to consistently articulate the Tor Project's mission. Tor software is 
built by a mix of paid staff and volunteers. This job includes working closely 
with this diverse, international community of people who make Tor and related 
software products. This is a hands-on position for a highly skilled 
communications professional with a fierce passion for technology and social 
media.
 
 
 Responsibilities:
diff --git a/about/en/jobs.wml b/about/en/jobs.wml
index c8110fe..d99753b 100644
--- a/about/en/jobs.wml
+++ b/about/en/jobs.wml
@@ -10,16 +10,16 @@
 Jobs
   

-   #The Tor Project is always looking for more great people to 
join our team!
+   The Tor Project is always looking for more great people to 
join our team!
 
-   At the moment, we don't have any official open positions. 
Please check back
-   soon, though! In the meantime, you may want to glance at our
-   volunteers page.
+   #At the moment, we don't have any official open positions. 
Please check back
+   # soon, though! In the meantime, you may want to glance at our
+   #volunteers page.
 
-   #Specifically, we're looking for the following people 
currently:
-   #
-   #  Writer/Editor
-   #
+   Specifically, we're looking for the following people 
currently:
+   
+ Director of 
Communications
+   
 
 
In the past, we looked for the following people:

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


[tor-commits] [tor-browser-bundle/master] Fold in stable changelog

2017-05-02 Thread gk
commit a89f99a8b8700a04af9f795f4d2115fb1dd3eabb
Author: Georg Koppen 
Date:   Tue May 2 09:04:21 2017 +

Fold in stable changelog
---
 Bundle-Data/Docs/ChangeLog.txt | 12 
 1 file changed, 12 insertions(+)

diff --git a/Bundle-Data/Docs/ChangeLog.txt b/Bundle-Data/Docs/ChangeLog.txt
index b2ee463..afe3999 100644
--- a/Bundle-Data/Docs/ChangeLog.txt
+++ b/Bundle-Data/Docs/ChangeLog.txt
@@ -83,6 +83,18 @@ Tor Browser 7.0a3 -- April 20 2017
  * Bug 21960: Linux bundles based on ESR 52 are not reproducible anymore
  * Bug 21629: Fix broken ASan builds when switching to ESR 52
 
+Tor Browser 6.5.2 -- April 19 2017
+ * All Platforms
+   * Update Firefox to 45.9.0esr
+   * Update HTTPS-Everywhere to 5.2.14
+   * Update NoScript to 5.0.2
+   * Bug 21555+16450: Don't remove Authorization header on subdomains (e.g. 
Twitter)
+   * Bug 19316: Make sure our Windows updates can deal with the SSE2 
requirement
+   * Bug 21917: Add new obfs4 bridges
+   * Bug 21918: Move meek-amazon to d2cly7j4zqgua7.cloudfront.net backend
+ * Windows
+   * Bug 21795: Fix Tor Browser crashing on github.com
+
 Tor Browser 7.0a2-hardened -- March 7 2017
  * All Platforms
* Update Firefox to 45.8.0esr

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


[tor-commits] [tor-browser/tor-browser-52.1.0esr-7.0-2] fixup! Bug #4234: Use the Firefox Update Process for Tor Browser.

2017-05-02 Thread gk
commit d70009f425f9da6a74413b286ef768ba97c899cd
Author: Kathy Brade 
Date:   Tue Apr 25 11:34:07 2017 -0400

fixup! Bug #4234: Use the Firefox Update Process for Tor Browser.

Bug 22041: libmozsandbox.so error after upgrading to 7.0a3

Fix a problem with unstaged updates on Linux and OSX where the original
files were not restored after a partial update failed to apply due to
changes the user made within their installation. This would leave the
browser in a state where it had a mix of old files and new (patched)
files, which can cause the browser to not be able to start, and
therefore not be able to fallback to a complete update.
---
 toolkit/mozapps/update/updater/updater.cpp | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/toolkit/mozapps/update/updater/updater.cpp 
b/toolkit/mozapps/update/updater/updater.cpp
index 988cf55..1bc4867 100644
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -1037,9 +1037,10 @@ static int backup_restore(const NS_tchar *path, const 
NS_tchar *relPath)
   bool isLink = false;
 #ifndef XP_WIN
   struct stat linkInfo;
-  int rv = lstat(path, &linkInfo);
-  if (!rv) {
-LOG(("backup_restore: cannot get info for backup file: " LOG_S, 
relBackup));
+  int rv = lstat(backup, &linkInfo);
+  if (rv) {
+LOG(("backup_restore: cannot get info for backup file: " LOG_S ", err: %d",
+ relBackup, errno));
 return OK;
   }
   isLink = S_ISLNK(linkInfo.st_mode);

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


[tor-commits] [tor-browser/tor-browser-52.1.0esr-7.0-2] fixup! TB4: Tor Browser's Firefox preference overrides.

2017-05-02 Thread gk
commit ff923c1609c6bc4d9dd3a8b60f684d7c410a7399
Author: Arthur Edelstein 
Date:   Fri Apr 28 11:20:24 2017 -0700

fixup! TB4: Tor Browser's Firefox preference overrides.

We work around bug 13017 by disabling the Web Audio API for now.
---
 browser/app/profile/000-tor-browser.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/browser/app/profile/000-tor-browser.js 
b/browser/app/profile/000-tor-browser.js
index 9ca4149..0715a01 100644
--- a/browser/app/profile/000-tor-browser.js
+++ b/browser/app/profile/000-tor-browser.js
@@ -150,6 +150,7 @@ pref("browser.reader.detectedFirstArticle", true);
 pref("reader.parse-on-load.enabled", false);
 pref("privacy.use_utc_timezone", true);
 pref("media.webspeech.synth.enabled", false); // Bug 10283: Disable 
SpeechSynthesis API
+pref("dom.webaudio.enabled", false); // Bug 13017: Disable Web Audio API
 
 // Third party stuff
 pref("network.cookie.cookieBehavior", 1);

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