[tor-commits] [translation/tbmanual-contentspot] Update translations for tbmanual-contentspot

2019-06-05 Thread translation
commit 23163e646b677dd1432a6baf326fb8784e2caf73
Author: Translation commit bot 
Date:   Wed Jun 5 23:47:54 2019 +

Update translations for tbmanual-contentspot
---
 contents+pl.po | 29 +++--
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/contents+pl.po b/contents+pl.po
index d13e0f8d7..47a8a87d7 100644
--- a/contents+pl.po
+++ b/contents+pl.po
@@ -1078,6 +1078,8 @@ msgid ""
 "href=\"https://www.torproject.org/docs/faq#EntryGuards\;>FAQ and https://support.torproject.org/tbb/tbb-2/\;>Support Portal."
 msgstr ""
+"W obwodzie, węzeł Guard lub wejściowy jest pierwszym węzłem i jest 
automatycznie i losowo wybierany przez Tor. Ale różni się od innych 
węzłów w obwodzie. Aby uniknąć ataków profilujących, węzeł Guard 
zmienia się dopiero po 2-3 miesiącach, w przeciwieństwie do innych 
węzłów, które zmieniają się wraz z każdą nową domeną. Aby uzyskać 
więcej informacji na temat Guard, odwiedź \n"
+"https://www.torproject.org/docs/faq#EntryGuards\;>FAQ i https://support.torproject.org/tbb/tbb-2/\;>Portal Pomocy 
Technicznej."
 
 #: https//tb-manual.torproject.org/managing-identities/
 #: (content/managing-identities/contents+en.lrtopic.body)
@@ -1691,6 +1693,8 @@ msgid ""
 "To view and adjust your Security Settings, click the 'Advanced Security "
 "Settings...' button in the shield menu."
 msgstr ""
+"Aby wyświetlić i dostosować Ustawienia Bezpieczeństwa, kliknij przycisk "
+"\"Zaawansowane Ustawienia Bezpieczeństwa\" w menu tarczy."
 
 #: https//tb-manual.torproject.org/security-settings/
 #: (content/security-settings/contents+en.lrtopic.body)
@@ -1721,16 +1725,20 @@ msgstr ""
 #: (content/security-settings/contents+en.lrtopic.body)
 msgid "At this level, all Tor Browser and website features are enabled."
 msgstr ""
+"Na tym poziomie wszystkie funkcje Przeglądarki Tor i stron internetowych są 
"
+"włączone."
 
 #: https//tb-manual.torproject.org/security-settings/
 #: (content/security-settings/contents+en.lrtopic.body)
 msgid "This level disables website features that are often dangerous."
 msgstr ""
+"Ten poziom wyłącza funkcje strony internetowej, które często są "
+"niebezpieczne."
 
 #: https//tb-manual.torproject.org/security-settings/
 #: (content/security-settings/contents+en.lrtopic.body)
 msgid "This may cause some sites to lose functionality."
-msgstr ""
+msgstr "Może to spowodować utratę funkcjonalności niektórych stron."
 
 #: https//tb-manual.torproject.org/security-settings/
 #: (content/security-settings/contents+en.lrtopic.body)
@@ -1879,6 +1887,8 @@ msgid ""
 "Visit https://www.torproject.org/download/ and download a copy of the latest"
 " Tor Browser release, then install it as before."
 msgstr ""
+"Odwiedź https://www.torproject.org/download/ i pobierz kopię najnowszej "
+"wersji Tor Browser, a następnie zainstaluj ją tak jak poprzednio."
 
 #: https//tb-manual.torproject.org/plugins/
 #: (content/plugins/contents+en.lrtopic.title)
@@ -2082,7 +2092,7 @@ msgstr ""
 #: https//tb-manual.torproject.org/troubleshooting/
 #: (content/troubleshooting/contents+en.lrtopic.body)
 msgid "# IS YOUR CONNECTION CENSORED?"
-msgstr ""
+msgstr "# CZY JEST TWOJE POŁĄCZENIE CENZUROWANE?"
 
 #: https//tb-manual.torproject.org/troubleshooting/
 #: (content/troubleshooting/contents+en.lrtopic.body)
@@ -2091,6 +2101,8 @@ msgid ""
 "censoring connections to the Tor network. Read the Circumvention section for possible solutions."
 msgstr ""
+"Jeśli nadal nie możesz się połączyć, Twój dostawca usług 
internetowych może cenzurować połączenia do sieci Tor. Przeczytaj \n"
+"sekcje Obchodzenie dla możliwych rozwiązań."
 
 #: https//tb-manual.torproject.org/troubleshooting/
 #: (content/troubleshooting/contents+en.lrtopic.body)
@@ -2105,6 +2117,8 @@ msgid ""
 "Issues page to see if the problem you are experiencing is already listed"
 " there."
 msgstr ""
+"Przeglądarka Tor jest w ciągłym rozwoju, a niektóre problemy są znane, 
ale nie zostały jeszcze rozwiązane. Proszę sprawdź \n"
+"stronę Znane Problemy, aby sprawdzić, czy 
problem, którego doświadczasz, nie jest już tam wymieniony."
 
 #: https//tb-manual.torproject.org/known-issues/
 #: (content/known-issues/contents+en.lrtopic.title)
@@ -2286,6 +2300,13 @@ msgid ""
 "translation tool. In order to begin contributing you will have to sign up "
 "with Transifex. Below is an outline of how to sign up and begin."
 msgstr ""
+"Jeśli jesteś zainteresowany pomocą projektowi poprzez tłumaczenie "
+"podręcznika lub Przeglądarki Tor na swój język, Twoja pomoc będzie 
bardzo "
+"mile widziana! Lokalizacja Tor Project znajduje się w [Localization "
+"Lab](https://www.localizationlab.org) Hub na Transifex, narzędziu do "
+"tłumaczenia. Aby zacząć wnosić swój wkład, musisz zarejestrować się w 
"
+"Transifex. Poniżej znajduje się zarys tego, jak się zarejestrować i "
+"rozpocząć."
 
 #: 

[tor-commits] [translation/tbmanual-contentspot] Update translations for tbmanual-contentspot

2019-06-05 Thread translation
commit 40fc0fc5c73fb49fcebc0eed9d62a8345e3031c9
Author: Translation commit bot 
Date:   Wed Jun 5 23:17:54 2019 +

Update translations for tbmanual-contentspot
---
 contents+pl.po | 30 --
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/contents+pl.po b/contents+pl.po
index d24c03b66..d13e0f8d7 100644
--- a/contents+pl.po
+++ b/contents+pl.po
@@ -1186,6 +1186,14 @@ msgid ""
 "connections. Tor Browser will warn you that all activity and downloads will "
 "be stopped, so take this into account before clicking “New Identity”."
 msgstr ""
+"Opcja ta jest przydatna, jeśli chcesz zapobiec możliwości łączenia się "
+"kolejnej aktywności przeglądarki z tym, co robiłeś wcześniej. Wybranie 
tej "
+"opcji spowoduje zamknięcie wszystkich otwartych zakładek i okien, "
+"wyczyszczenie wszystkich prywatnych informacji, takich jak pliki cookie i "
+"historia przeglądania oraz wykorzystanie nowych obwodów Tor dla wszystkich "
+"połączeń. Przeglądarka Tor wyświetli ostrzeżenie, że wszystkie 
działania i "
+"pobieranie zostaną wstrzymane, więc weź to pod uwagę przed kliknięciem "
+"przycisku \"Nowa Tożsamość\"."
 
 #: https//tb-manual.torproject.org/managing-identities/
 #: (content/managing-identities/contents+en.lrtopic.body)
@@ -1527,7 +1535,7 @@ msgstr ""
 #: https//tb-manual.torproject.org/security-slider/
 #: (content/security-slider/contents+en.lrtopic.body)
 msgid "# Accessing the Security Slider"
-msgstr ""
+msgstr "# Uzyskanie Dostępu do Suwaka Bezpieczeństwa"
 
 #: https//tb-manual.torproject.org/security-slider/
 #: (content/security-slider/contents+en.lrtopic.body)
@@ -1562,6 +1570,9 @@ msgid ""
 "Increasing the level of the Security Slider will disable or partially "
 "disable certain browser features to protect against possible attacks."
 msgstr ""
+"Zwiększenie poziomu Suwaka Bezpieczeństwa spowoduje wyłączenie lub 
częściowe"
+" wyłączenie niektórych funkcji przeglądarki w celu ochrony przed "
+"ewentualnymi atakami."
 
 #: https//tb-manual.torproject.org/security-slider/
 #: (content/security-slider/contents+en.lrtopic.body)
@@ -1580,6 +1591,13 @@ msgid ""
 "disabled by default on all sites; most video and audio formats are disabled;"
 " and some fonts and icons may not display correctly."
 msgstr ""
+"Na tym poziomie, wideo HTML5 i audio stają się kliknij-aby-odtworzyć 
poprzez"
+" NoScript; wszystkie optymalizacje wydajności JavaScript są wyłączone; "
+"niektóre równania matematyczne mogą nie być wyświetlane prawidłowo; 
niektóre"
+" funkcje renderowania czcionek są wyłączone; niektóre typy obrazów są "
+"wyłączone domyślnie na wszystkich stronach; większość formatów wideo i 
audio"
+" jest wyłączona; a niektóre czcionki i ikony mogą nie być wyświetlane "
+"poprawnie."
 
 #: https//tb-manual.torproject.org/security-slider/
 #: (content/security-slider/contents+en.lrtopic.body)
@@ -1598,6 +1616,12 @@ msgid ""
 "disabled by default on all non-HTTPS "
 "sites."
 msgstr ""
+"Na tym poziomie, wideo i audio HTML5 stają się kliknij-aby-odtworzyć 
poprzez"
+" NoScript; wszystkie optymalizacje wydajności JavaScript są wyłączone; "
+"niektóre równania matematyczne mogą nie być wyświetlane prawidłowo; 
niektóre"
+" funkcje renderowania czcionek są wyłączone; niektóre typy obrazów są "
+"wyłączone; a JavaScript jest domyślnie wyłączony na wszystkich stronach 
bez "
+"HTTPS."
 
 #: https//tb-manual.torproject.org/security-slider/
 #: (content/security-slider/contents+en.lrtopic.body)
@@ -1650,7 +1674,7 @@ msgstr ""
 #: https//tb-manual.torproject.org/security-settings/
 #: (content/security-settings/contents+en.lrtopic.body)
 msgid "# ACCESSING THE SECURITY SETTINGS"
-msgstr ""
+msgstr "# UZYSKANIE DOSTĘPU DO USTAWIEŃ BEZPIECZEŃSTWA"
 
 #: https//tb-manual.torproject.org/security-settings/
 #: (content/security-settings/contents+en.lrtopic.body)
@@ -1658,6 +1682,8 @@ msgid ""
 "The Security Settings can be accessed by clicking the Shield icon next to "
 "the Tor Browser URL bar."
 msgstr ""
+"Dostęp do ustawień bezpieczeństwa można uzyskać, klikając ikonę Tarczy 
obok "
+"paska adresu URL Przeglądarki Tor."
 
 #: https//tb-manual.torproject.org/security-settings/
 #: (content/security-settings/contents+en.lrtopic.body)

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


[tor-commits] [translation/tbmanual-contentspot] Update translations for tbmanual-contentspot

2019-06-05 Thread translation
commit 1f79a8f789778c6751036205a513bf8f309f289f
Author: Translation commit bot 
Date:   Wed Jun 5 22:47:50 2019 +

Update translations for tbmanual-contentspot
---
 contents+pl.po | 47 ++-
 1 file changed, 46 insertions(+), 1 deletion(-)

diff --git a/contents+pl.po b/contents+pl.po
index 48a14b3a7..d24c03b66 100644
--- a/contents+pl.po
+++ b/contents+pl.po
@@ -973,6 +973,10 @@ msgid ""
 "US/bridges/\">Bridges section to learn what bridges are and how to "
 "obtain them."
 msgstr ""
+"Jeśli wypróbujesz wszystkie te opcje, a żadna z nich nie zapewni Ci 
dostępu "
+"do Internetu, będziesz musiał wprowadzić adresy mostu ręcznie. Przeczytaj 
"
+"sekcje Mosty, aby dowiedzieć się, czym są "
+"mosty i jak je uzyskać."
 
 #: https//tb-manual.torproject.org/managing-identities/
 #: (content/managing-identities/contents+en.lrtopic.title)
@@ -993,6 +997,12 @@ msgid ""
 "trackers, and advertising beacons, all of which can link your activity "
 "across different sites."
 msgstr ""
+"Gdy łączysz się ze stroną internetową, nie tylko operatorzy tej strony 
mogą "
+"zapisywać informacje o Twojej wizycie. Większość stron internetowych "
+"korzysta obecnie z licznych usług firm trzecich, w tym przycisków sieci "
+"społecznościowych \"Lubię to\", trackerów analitycznych i sygnalizatorów 
"
+"reklamowych, z których wszystkie mogą łączyć Twoją aktywność na 
różnych "
+"stronach."
 
 #: https//tb-manual.torproject.org/managing-identities/
 #: (content/managing-identities/contents+en.lrtopic.body)
@@ -1003,6 +1013,11 @@ msgid ""
 " Browser includes some additional features that help you control what "
 "information can be tied to your identity."
 msgstr ""
+"Korzystanie z sieci Tor powstrzymuje obserwatorów przed odkryciem Twojej "
+"dokładnej lokalizacji i adresu IP, ale nawet bez tych informacji mogą oni "
+"być w stanie połączyć różne obszary Twojej działalności. Z tego 
powodu, "
+"Przeglądarka Tor zawiera kilka dodatkowych funkcji, które pomagają "
+"kontrolować, jakie informacje mogą być powiązane z Twoją tożsamością."
 
 #: https//tb-manual.torproject.org/managing-identities/
 #: (content/managing-identities/contents+en.lrtopic.body)
@@ -1018,6 +1033,12 @@ msgid ""
 " be served over two different Tor circuits, so the tracker will not know "
 "that both connections originate from your browser."
 msgstr ""
+"Przeglądarka Tor skupia Twoje doświadczenia internetowe wokół relacji ze "
+"stroną internetową w pasku URL. Nawet jeśli połączysz się z dwiema 
różnymi "
+"witrynami, które korzystają z tej samej usługi śledzenia stron trzecich, "
+"Przeglądarka Tor wymusi na treści przejście przez dwa różne obwody Tor, 
więc"
+" tracker nie będzie wiedział, że oba połączenia pochodzą z Twojej "
+"przeglądarki."
 
 #: https//tb-manual.torproject.org/managing-identities/
 #: (content/managing-identities/contents+en.lrtopic.body)
@@ -1027,6 +1048,10 @@ msgid ""
 "single website in separate tabs or windows, without any loss of "
 "functionality."
 msgstr ""
+"Z drugiej strony, wszystkie połączenia do jednego adresu strony 
internetowej"
+" będą realizowane za pomocą tego samego obwodu Tor, co oznacza, że 
możesz "
+"przeglądać różne strony jednej strony internetowej w oddzielnych 
zakładkach "
+"lub oknach, bez utraty funkcjonalności."
 
 #: https//tb-manual.torproject.org/managing-identities/
 #: (content/managing-identities/contents+en.lrtopic.body)
@@ -1039,6 +1064,8 @@ msgid ""
 "You can see a diagram of the circuit that Tor Browser is using for the "
 "current tab in the site information menu, in the URL bar."
 msgstr ""
+"Możesz zobaczyć schemat obwodu, którego używa Przeglądarka Tor dla 
bieżącej "
+"karty w menu informacji o witrynie, w pasku URL."
 
 #: https//tb-manual.torproject.org/managing-identities/
 #: (content/managing-identities/contents+en.lrtopic.body)
@@ -1055,7 +1082,7 @@ msgstr ""
 #: https//tb-manual.torproject.org/managing-identities/
 #: (content/managing-identities/contents+en.lrtopic.body)
 msgid "# LOGGING IN OVER TOR"
-msgstr ""
+msgstr "# LOGOWANIE POPRZEZ TOR"
 
 #: https//tb-manual.torproject.org/managing-identities/
 #: (content/managing-identities/contents+en.lrtopic.body)
@@ -1079,6 +1106,14 @@ msgid ""
 "you reveal to the websites you browse. Logging in using Tor Browser is also "
 "useful if the website you are trying to reach is censored on your network."
 msgstr ""
+"Jeśli zalogujesz się na stronę internetową za pomocą zwykłej przeglą
darki, "
+"przy okazji ujawnisz również swój adres IP i lokalizację geograficzną. 
To "
+"samo dotyczy często wysyłania wiadomości e-mail. Zalogowanie się do sieci 
"
+"społecznościowych lub kont e-mail za pomocą Przeglądarki Tor pozwala na "
+"wybranie dokładnie tych informacji, które ujawnisz na przeglądanych 
stronach"
+" internetowych. Zalogowanie się za pomocą Przeglą

[tor-commits] [translation/tbmanual-contentspot] Update translations for tbmanual-contentspot

2019-06-05 Thread translation
commit 470c0e945c79b37313150fc7c5ccb39e19db911a
Author: Translation commit bot 
Date:   Wed Jun 5 22:17:59 2019 +

Update translations for tbmanual-contentspot
---
 contents+fr.po | 4 ++--
 contents+pl.po | 7 +++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/contents+fr.po b/contents+fr.po
index 9c1331b9c..053a34792 100644
--- a/contents+fr.po
+++ b/contents+fr.po
@@ -2,8 +2,8 @@
 # Emma Peel, 2019
 # Thomas Prévost , 2019
 # erinm, 2019
-# AO , 2019
 # Curtis Baltimore , 2019
+# AO , 2019
 # 
 msgid ""
 msgstr ""
@@ -11,7 +11,7 @@ msgstr ""
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2019-06-03 14:04+CET\n"
 "PO-Revision-Date: 2018-11-14 12:31+\n"
-"Last-Translator: Curtis Baltimore , 2019\n"
+"Last-Translator: AO , 2019\n"
 "Language-Team: French (https://www.transifex.com/otf/teams/1519/fr/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
diff --git a/contents+pl.po b/contents+pl.po
index 6c0a51f54..48a14b3a7 100644
--- a/contents+pl.po
+++ b/contents+pl.po
@@ -924,6 +924,9 @@ msgid ""
 "bridge.' Click on the drop-down menu and select the pluggable transport "
 "you'd like to use."
 msgstr ""
+"Wybierz 'Tor jest cenzurowany w moim kraju', a następnie kliknij 'Wybierz "
+"wbudowany most'. Kliknij na menu rozwijane i wybierz transport, z którego "
+"chcesz skorzystać."
 
 #: https//tb-manual.torproject.org/circumvention/
 #: (content/circumvention/contents+en.lrtopic.body)
@@ -948,6 +951,10 @@ msgid ""
 "Transports page), and their effectiveness depends on your individual "
 "circumstances."
 msgstr ""
+"Każdy z transportów wymienionych w menu Tor Launchera działa w inny 
sposób "
+"(więcej szczegółów znajdziesz na stronie Transportów Wtykowych), a ich skuteczność zależy od "
+"indywidualnych okoliczności."
 
 #: https//tb-manual.torproject.org/circumvention/
 #: (content/circumvention/contents+en.lrtopic.body)

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


[tor-commits] [translation/tbmanual-contentspot_completed] Update translations for tbmanual-contentspot_completed

2019-06-05 Thread translation
commit 51e31a6fcfafc868b56b1c760df7d203befbf0e3
Author: Translation commit bot 
Date:   Wed Jun 5 22:18:06 2019 +

Update translations for tbmanual-contentspot_completed
---
 contents+fr.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contents+fr.po b/contents+fr.po
index 9c1331b9c..053a34792 100644
--- a/contents+fr.po
+++ b/contents+fr.po
@@ -2,8 +2,8 @@
 # Emma Peel, 2019
 # Thomas Prévost , 2019
 # erinm, 2019
-# AO , 2019
 # Curtis Baltimore , 2019
+# AO , 2019
 # 
 msgid ""
 msgstr ""
@@ -11,7 +11,7 @@ msgstr ""
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2019-06-03 14:04+CET\n"
 "PO-Revision-Date: 2018-11-14 12:31+\n"
-"Last-Translator: Curtis Baltimore , 2019\n"
+"Last-Translator: AO , 2019\n"
 "Language-Team: French (https://www.transifex.com/otf/teams/1519/fr/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"

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


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

2019-06-05 Thread translation
commit dd1258935d4fbe141f3fd92042d90153ac75e496
Author: Translation commit bot 
Date:   Wed Jun 5 22:16:36 2019 +

Update translations for tails-misc
---
 fr.po | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fr.po b/fr.po
index 0357ff694..8124c7ef1 100644
--- a/fr.po
+++ b/fr.po
@@ -31,7 +31,7 @@ msgstr ""
 "Project-Id-Version: Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2019-05-18 19:31+0200\n"
-"PO-Revision-Date: 2019-05-27 22:18+\n"
+"PO-Revision-Date: 2019-06-05 21:52+\n"
 "Last-Translator: AO \n"
 "Language-Team: French 
(http://www.transifex.com/otf/torproject/language/fr/)\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/tails-misc_completed] Update translations for tails-misc_completed

2019-06-05 Thread translation
commit 6a11f4b79f440bb3418c38946e34d74f3bfb08ba
Author: Translation commit bot 
Date:   Wed Jun 5 22:16:44 2019 +

Update translations for tails-misc_completed
---
 fr.po | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fr.po b/fr.po
index 0357ff694..8124c7ef1 100644
--- a/fr.po
+++ b/fr.po
@@ -31,7 +31,7 @@ msgstr ""
 "Project-Id-Version: Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2019-05-18 19:31+0200\n"
-"PO-Revision-Date: 2019-05-27 22:18+\n"
+"PO-Revision-Date: 2019-06-05 21:52+\n"
 "Last-Translator: AO \n"
 "Language-Team: French 
(http://www.transifex.com/otf/torproject/language/fr/)\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] [stem/master] Testing '--log-file' argument

2019-06-05 Thread atagar
commit d92936cb2fb6ca5d2f3065e28ec33c7c1c87301f
Author: Damian Johnson 
Date:   Wed Jun 5 14:21:37 2019 -0700

Testing '--log-file' argument

Argument so our tests log to a given file rather than stdout. Travis
limits the amount of content stdout can receive, so we need this
because trace logging with our RUN_ALL target is highly volumous.

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

That said, good argument to have regardless.
---
 run_tests.py  | 26 +++---
 stem/descriptor/remote.py |  2 +-
 stem/util/log.py  | 13 +
 test/arguments.py |  5 -
 test/output.py|  2 +-
 test/settings.cfg |  2 ++
 6 files changed, 40 insertions(+), 10 deletions(-)

diff --git a/run_tests.py b/run_tests.py
index 088d3f62..ef31a05e 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -8,6 +8,7 @@ Runs unit and integration tests. For usage information run this 
with '--help'.
 
 import errno
 import importlib
+import logging
 import multiprocessing
 import os
 import signal
@@ -233,10 +234,20 @@ def main():
 test.task.PYCODESTYLE_TASK if not args.specific_test else None,
   )
 
-  # buffer that we log messages into so they can be printed after a test has 
finished
+  # Test logging. If '--log-file' is provided we log to that location,
+  # otherwise we buffer messages and log to stdout after its test completes.
 
-  logging_buffer = stem.util.log.LogBuffer(args.logging_runlevel)
-  stem.util.log.get_logger().addHandler(logging_buffer)
+  logging_buffer = None
+
+  if args.logging_runlevel:
+if args.logging_path:
+  handler = logging.FileHandler(args.logging_path, mode = 'w')
+  handler.setLevel(stem.util.log.logging_level(args.logging_runlevel))
+  handler.setFormatter(stem.util.log.FORMATTER)
+else:
+  handler = logging_buffer = stem.util.log.LogBuffer(args.logging_runlevel)
+
+stem.util.log.get_logger().addHandler(handler)
 
   # filters for how testing output is displayed
 
@@ -399,6 +410,12 @@ def _print_static_issues(static_check_issues):
 
 
 def _run_test(args, test_class, output_filters):
+  # When logging to a file we don't have stdout's test delimiters to correlate
+  # logs with the test that generated them.
+
+  if args.logging_path:
+stem.util.log.notice('Beginning test %s' % test_class)
+
   start_time = time.time()
 
   # Test classes look like...
@@ -449,6 +466,9 @@ def _run_test(args, test_class, output_filters):
   println(' failed (%0.2fs)' % (time.time() - start_time), ERROR)
   println(test.output.apply_filters(test_results.getvalue(), 
*output_filters), NO_NL)
 
+  if args.logging_path:
+stem.util.log.notice('Finished test %s' % test_class)
+
   return run_result
 
 
diff --git a/stem/descriptor/remote.py b/stem/descriptor/remote.py
index b2f066a3..7f1f44fa 100644
--- a/stem/descriptor/remote.py
+++ b/stem/descriptor/remote.py
@@ -596,7 +596,7 @@ class Query(object):
 raise ValueError("BUG: endpoints can only be ORPorts or DirPorts, '%s' 
was a %s" % (endpoint, type(endpoint).__name__))
 
   self.runtime = time.time() - self.start_time
-  log.trace("Descriptors retrieved from %s in %0.2fs" % (downloaded_from, 
self.runtime))
+  log.trace('Descriptors retrieved from %s in %0.2fs' % (downloaded_from, 
self.runtime))
 except:
   exc = sys.exc_info()[1]
 
diff --git a/stem/util/log.py b/stem/util/log.py
index beaf8580..92e76258 100644
--- a/stem/util/log.py
+++ b/stem/util/log.py
@@ -78,6 +78,11 @@ logging.addLevelName(LOG_VALUES[NOTICE], 'NOTICE')
 LOGGER = logging.getLogger('stem')
 LOGGER.setLevel(LOG_VALUES[TRACE])
 
+FORMATTER = logging.Formatter(
+  fmt = '%(asctime)s [%(levelname)s] %(message)s',
+  datefmt = '%m/%d/%Y %H:%M:%S',
+)
+
 # There's some messages that we don't want to log more than once. This set has
 # the messages IDs that we've logged which fall into this category.
 DEDUPLICATION_MESSAGE_IDS = set()
@@ -221,6 +226,9 @@ class LogBuffer(logging.Handler):
 
   .. versionchanged:: 1.4.0
  Added the yield_records argument.
+
+  .. deprecated:: 1.8.0
+ This will be dropped in Stem 2.x. Use python's logging.BufferingHandler 
instead.
   """
 
   def __init__(self, runlevel, yield_records = False):
@@ -232,10 +240,7 @@ class LogBuffer(logging.Handler):
 
 logging.Handler.__init__(self, level = logging_level(runlevel))
 
-self.formatter = logging.Formatter(
-  fmt = '%(asctime)s [%(levelname)s] %(message)s',
-  datefmt = '%m/%d/%Y %H:%M:%S')
-
+self.formatter = FORMATTER
 self._buffer = []
 self._yield_records = yield_records
 
diff --git a/test/arguments.py b/test/arguments.py
index 1ddf9240..0fa492d8 100644
--- a/test/arguments.py
+++ b/test/arguments.py
@@ -28,6 +28,7 @@ DEFAULT_ARGS = {
   'run_integ': False,
   'specific_test': [],
   'logging_runlevel': None,
+  'logging_path': None,
   'tor_path': 'tor',
   'run_targets': [test.Target.RUN_OPEN],
   

[tor-commits] [tor/release-0.4.0] Merge remote-tracking branch 'tor-github/pr/988' into maint-0.4.0

2019-06-05 Thread nickm
commit 6a6f7eb6718f22da80596a35e7774b075a417e97
Merge: d63c17f2a 821dd5458
Author: Nick Mathewson 
Date:   Wed Jun 5 16:22:52 2019 -0400

Merge remote-tracking branch 'tor-github/pr/988' into maint-0.4.0

 changes/bug30316  |  4 
 src/feature/dirauth/dirvote.c | 11 +--
 2 files changed, 9 insertions(+), 6 deletions(-)



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


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

2019-06-05 Thread nickm
commit 463ded569c13f633b12d74ad0048b0b367a511b4
Merge: 121d271dc 6a6f7eb67
Author: Nick Mathewson 
Date:   Wed Jun 5 16:24:10 2019 -0400

Merge branch 'maint-0.4.0' into release-0.4.0

 .travis.yml| 23 ++
 changes/bug30189   |  4 
 changes/bug30316   |  4 
 changes/bug30452   |  3 +++
 changes/ticket30213|  3 +++
 changes/ticket30234|  2 ++
 changes/ticket30454| 10 
 doc/tor.1.txt  | 17 -
 src/app/config/config.c| 13 ++
 src/app/main/main.c|  1 +
 src/config/torrc.sample.in | 21 
 src/feature/dirauth/authmode.h |  4 
 src/feature/dirauth/dirvote.c  | 11 -
 src/feature/hs/hs_cell.c   | 16 +++--
 src/feature/hs/hs_cell.h   | 13 --
 src/feature/hs/hs_client.c | 18 +++---
 src/feature/hs/hs_intropoint.c | 27 +++--
 src/feature/hs/hs_intropoint.h | 15 
 src/lib/log/util_bug.c | 14 +++
 src/lib/log/util_bug.h |  8 ---
 src/test/test_hs_cell.c|  2 +-
 src/test/test_hs_intropoint.c  |  4 ++--
 src/trunnel/hs/cell_introduce1.c   | 44 +-
 src/trunnel/hs/cell_introduce1.h   |  7 ++
 src/trunnel/hs/cell_introduce1.trunnel | 21 +---
 25 files changed, 174 insertions(+), 131 deletions(-)

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


[tor-commits] [tor/release-0.4.0] Merge remote-tracking branch 'tor-github/pr/952' into maint-0.4.0

2019-06-05 Thread nickm
commit e51b57ee047420b929c7d58de70df6ea5ca77565
Merge: 04cb2d401 802ac8ad6
Author: Nick Mathewson 
Date:   Wed Jun 5 16:16:34 2019 -0400

Merge remote-tracking branch 'tor-github/pr/952' into maint-0.4.0

 changes/bug30189   |  4 
 src/lib/log/util_bug.c | 14 ++
 src/lib/log/util_bug.h |  8 +---
 3 files changed, 23 insertions(+), 3 deletions(-)



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


[tor-commits] [tor/release-0.4.0] Merge remote-tracking branch 'tor-github/pr/741' into maint-0.4.0

2019-06-05 Thread nickm
commit 04cb2d4010f131c970d0cf3ba56c9d752b8facb9
Merge: 2300a619a 9b7cdd23d
Author: Nick Mathewson 
Date:   Wed Jun 5 16:14:51 2019 -0400

Merge remote-tracking branch 'tor-github/pr/741' into maint-0.4.0

 doc/tor.1.txt  | 13 +++--
 src/config/torrc.sample.in | 21 -
 2 files changed, 23 insertions(+), 11 deletions(-)




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


[tor-commits] [tor/release-0.4.0] hs: Remove hs_intro_auth_key_type_t enum

2019-06-05 Thread nickm
commit 79cfe2ddd7c030e679104588c7e4842c2ff6b239
Author: David Goulet 
Date:   Thu May 9 13:09:44 2019 -0400

hs: Remove hs_intro_auth_key_type_t enum

Like the previous commit about the INTRODUCE_ACK status code, change all 
auth
key type to use the one defined in the trunnel file.

Standardize the use of these auth type to a common ABI.

Part of #30454

Signed-off-by: David Goulet 
---
 src/or/hs_cell.c   |  5 +++--
 src/or/hs_intropoint.c | 10 +-
 src/or/hs_intropoint.h |  7 ---
 src/test/test_hs_cell.c|  2 +-
 src/test/test_hs_intropoint.c  |  4 ++--
 src/trunnel/hs/cell_introduce1.c   | 13 +++--
 src/trunnel/hs/cell_introduce1.h   |  3 +++
 src/trunnel/hs/cell_introduce1.trunnel |  9 -
 8 files changed, 29 insertions(+), 24 deletions(-)

diff --git a/src/or/hs_cell.c b/src/or/hs_cell.c
index ba80653a7..7bbefe8fd 100644
--- a/src/or/hs_cell.c
+++ b/src/or/hs_cell.c
@@ -441,7 +441,8 @@ introduce1_set_auth_key(trn_cell_introduce1_t *cell,
   tor_assert(cell);
   tor_assert(data);
   /* There is only one possible type for a non legacy cell. */
-  trn_cell_introduce1_set_auth_key_type(cell, HS_INTRO_AUTH_KEY_TYPE_ED25519);
+  trn_cell_introduce1_set_auth_key_type(cell,
+   TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_ED25519);
   trn_cell_introduce1_set_auth_key_len(cell, ED25519_PUBKEY_LEN);
   trn_cell_introduce1_setlen_auth_key(cell, ED25519_PUBKEY_LEN);
   memcpy(trn_cell_introduce1_getarray_auth_key(cell),
@@ -514,7 +515,7 @@ hs_cell_build_establish_intro(const char *circ_nonce,
 
   /* Set AUTH_KEY_TYPE: 2 means ed25519 */
   trn_cell_establish_intro_set_auth_key_type(cell,
- HS_INTRO_AUTH_KEY_TYPE_ED25519);
+TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_ED25519);
 
   /* Set AUTH_KEY and AUTH_KEY_LEN field. Must also set byte-length of
* AUTH_KEY to match */
diff --git a/src/or/hs_intropoint.c b/src/or/hs_intropoint.c
index 472e4afe9..a12a3210c 100644
--- a/src/or/hs_intropoint.c
+++ b/src/or/hs_intropoint.c
@@ -75,7 +75,7 @@ verify_establish_intro_cell(const trn_cell_establish_intro_t 
*cell,
   /* We only reach this function if the first byte of the cell is 0x02 which
* means that auth_key_type is of ed25519 type, hence this check should
* always pass. See hs_intro_received_establish_intro().  */
-  if (BUG(cell->auth_key_type != HS_INTRO_AUTH_KEY_TYPE_ED25519)) {
+  if (BUG(cell->auth_key_type != TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_ED25519)) {
 return -1;
   }
 
@@ -315,10 +315,10 @@ hs_intro_received_establish_intro(or_circuit_t *circ, 
const uint8_t *request,
* ESTABLISH_INTRO and pass it to the appropriate cell handler */
   const uint8_t first_byte = request[0];
   switch (first_byte) {
-case HS_INTRO_AUTH_KEY_TYPE_LEGACY0:
-case HS_INTRO_AUTH_KEY_TYPE_LEGACY1:
+case TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_LEGACY0:
+case TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_LEGACY1:
   return rend_mid_establish_intro_legacy(circ, request, request_len);
-case HS_INTRO_AUTH_KEY_TYPE_ED25519:
+case TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_ED25519:
   return handle_establish_intro(circ, request, request_len);
 default:
   log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
@@ -396,7 +396,7 @@ validate_introduce1_parsed_cell(const trn_cell_introduce1_t 
*cell)
   /* The auth key of an INTRODUCE1 should be of type ed25519 thus leading to a
* known fixed length as well. */
   if (trn_cell_introduce1_get_auth_key_type(cell) !=
-  HS_INTRO_AUTH_KEY_TYPE_ED25519) {
+  TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_ED25519) {
 log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
"Rejecting invalid INTRODUCE1 cell auth key type. "
"Responding with NACK.");
diff --git a/src/or/hs_intropoint.h b/src/or/hs_intropoint.h
index 1c2cc564a..1891bffac 100644
--- a/src/or/hs_intropoint.h
+++ b/src/or/hs_intropoint.h
@@ -12,13 +12,6 @@
 #include "crypto_curve25519.h"
 #include "torcert.h"
 
-/* Authentication key type in an ESTABLISH_INTRO cell. */
-typedef enum {
-  HS_INTRO_AUTH_KEY_TYPE_LEGACY0 = 0x00,
-  HS_INTRO_AUTH_KEY_TYPE_LEGACY1 = 0x01,
-  HS_INTRO_AUTH_KEY_TYPE_ED25519 = 0x02,
-} hs_intro_auth_key_type_t;
-
 /* Object containing introduction point common data between the service and
  * the client side. */
 typedef struct hs_intropoint_t {
diff --git a/src/test/test_hs_cell.c b/src/test/test_hs_cell.c
index 8e15184c2..f754068a0 100644
--- a/src/test/test_hs_cell.c
+++ b/src/test/test_hs_cell.c
@@ -50,7 +50,7 @@ test_gen_establish_intro_cell(void *arg)
   /* Check the contents of the cell */
   {
 /* First byte is the auth key type: make sure its correct */
-tt_int_op(buf[0], OP_EQ, HS_INTRO_AUTH_KEY_TYPE_ED25519);
+tt_int_op(buf[0], OP_EQ, TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_ED25519);
 /* Next two bytes is auth key len */
 

[tor-commits] [tor/release-0.4.0] hs: Add changes file for #30454

2019-06-05 Thread nickm
commit 9f52b875184098aef91bfdebcfd272a60b3b879e
Author: David Goulet 
Date:   Thu May 9 13:23:14 2019 -0400

hs: Add changes file for #30454

Signed-off-by: David Goulet 
---
 changes/ticket30454 | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/changes/ticket30454 b/changes/ticket30454
new file mode 100644
index 0..77c45d0fe
--- /dev/null
+++ b/changes/ticket30454
@@ -0,0 +1,10 @@
+  o Major bugfixes (hidden service v3):
+- An intro point could try to send an INTRODUCE_ACK with a status code
+  that it wasn't able to encode leading to a hard assert() of the relay.
+  Fortunately, that specific code path can not be reached thus this issue
+  can't be triggered. We've consolidated the ABI values into trunnel now.
+  Fixes bug 30454; bugfix on 0.3.0.1-alpha.
+- HSv3 client will now be able to properly handle unknown status code from
+  a INTRODUCE_ACK cell (nack) even if they do not know it. The NACK
+  behavior will stay the same. This will allow us to extend status code if
+  we want in the future without breaking the normal client behavior.



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


[tor-commits] [tor/release-0.4.0] Merge remote-tracking branch 'tor-github/pr/1039' into maint-0.4.0

2019-06-05 Thread nickm
commit 2300a619a548ed529551c731dd706fea0b2a0a20
Merge: 851e881f0 245dccb77
Author: Nick Mathewson 
Date:   Wed Jun 5 16:13:53 2019 -0400

Merge remote-tracking branch 'tor-github/pr/1039' into maint-0.4.0

 changes/ticket30454| 10 
 src/feature/hs/hs_cell.c   | 16 +++--
 src/feature/hs/hs_cell.h   | 13 --
 src/feature/hs/hs_client.c | 18 +++---
 src/feature/hs/hs_intropoint.c | 27 +++--
 src/feature/hs/hs_intropoint.h | 15 
 src/test/test_hs_cell.c|  2 +-
 src/test/test_hs_intropoint.c  |  4 ++--
 src/trunnel/hs/cell_introduce1.c   | 44 +-
 src/trunnel/hs/cell_introduce1.h   |  7 ++
 src/trunnel/hs/cell_introduce1.trunnel | 21 +---
 11 files changed, 87 insertions(+), 90 deletions(-)



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


[tor-commits] [tor/release-0.4.0] trunnel: Remove INTRODUCE1 status code IN statement

2019-06-05 Thread nickm
commit 7d3e904a27ac714c33f9b1e14b4d1d18d4042147
Author: David Goulet 
Date:   Wed May 15 15:27:27 2019 -0400

trunnel: Remove INTRODUCE1 status code IN statement

We want to support parsing a cell with unknown status code so we are forward
compatible.

Part of #30454

Signed-off-by: David Goulet 
---
 src/trunnel/hs/cell_introduce1.c   | 18 +++---
 src/trunnel/hs/cell_introduce1.trunnel |  4 +---
 2 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/src/trunnel/hs/cell_introduce1.c b/src/trunnel/hs/cell_introduce1.c
index 1fdb95453..cebfa2867 100644
--- a/src/trunnel/hs/cell_introduce1.c
+++ b/src/trunnel/hs/cell_introduce1.c
@@ -520,7 +520,6 @@ trn_cell_introduce_ack_new(void)
   trn_cell_introduce_ack_t *val = trunnel_calloc(1, 
sizeof(trn_cell_introduce_ack_t));
   if (NULL == val)
 return NULL;
-  val->status = TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT;
   return val;
 }
 
@@ -552,10 +551,6 @@ trn_cell_introduce_ack_get_status(const 
trn_cell_introduce_ack_t *inp)
 int
 trn_cell_introduce_ack_set_status(trn_cell_introduce_ack_t *inp, uint16_t val)
 {
-  if (! ((val == TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT || val == 
TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS || val == 
TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID))) {
- TRUNNEL_SET_ERROR_CODE(inp);
- return -1;
-  }
   inp->status = val;
   return 0;
 }
@@ -589,8 +584,6 @@ trn_cell_introduce_ack_check(const trn_cell_introduce_ack_t 
*obj)
 return "Object was NULL";
   if (obj->trunnel_error_code_)
 return "A set function failed on this object";
-  if (! (obj->status == TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT || obj->status 
== TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS || obj->status == 
TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID))
-return "Integer out of bounds";
   {
 const char *msg;
 if (NULL != (msg = trn_cell_extension_check(obj->extensions)))
@@ -608,7 +601,7 @@ trn_cell_introduce_ack_encoded_len(const 
trn_cell_introduce_ack_t *obj)
  return -1;
 
 
-  /* Length of u16 status IN [TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT, 
TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS, TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID] */
+  /* Length of u16 status */
   result += 2;
 
   /* Length of struct trn_cell_extension extensions */
@@ -640,7 +633,7 @@ trn_cell_introduce_ack_encode(uint8_t *output, const size_t 
avail, const trn_cel
   trunnel_assert(encoded_len >= 0);
 #endif
 
-  /* Encode u16 status IN [TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT, 
TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS, TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID] */
+  /* Encode u16 status */
   trunnel_assert(written <= avail);
   if (avail - written < 2)
 goto truncated;
@@ -689,12 +682,10 @@ 
trn_cell_introduce_ack_parse_into(trn_cell_introduce_ack_t *obj, const uint8_t *
   ssize_t result = 0;
   (void)result;
 
-  /* Parse u16 status IN [TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT, 
TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS, TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID] */
+  /* Parse u16 status */
   CHECK_REMAINING(2, truncated);
   obj->status = trunnel_ntohs(trunnel_get_uint16(ptr));
   remaining -= 2; ptr += 2;
-  if (! (obj->status == TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT || obj->status 
== TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS || obj->status == 
TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID))
-goto fail;
 
   /* Parse struct trn_cell_extension extensions */
   result = trn_cell_extension_parse(>extensions, ptr, remaining);
@@ -710,9 +701,6 @@ trn_cell_introduce_ack_parse_into(trn_cell_introduce_ack_t 
*obj, const uint8_t *
  relay_fail:
   trunnel_assert(result < 0);
   return result;
- fail:
-  result = -1;
-  return result;
 }
 
 ssize_t
diff --git a/src/trunnel/hs/cell_introduce1.trunnel 
b/src/trunnel/hs/cell_introduce1.trunnel
index 69da2c113..bbb091d2b 100644
--- a/src/trunnel/hs/cell_introduce1.trunnel
+++ b/src/trunnel/hs/cell_introduce1.trunnel
@@ -44,9 +44,7 @@ struct trn_cell_introduce1 {
 /* INTRODUCE_ACK payload. See details in section 3.2.2. */
 struct trn_cell_introduce_ack {
   /* Status of introduction. */
-  u16 status IN [TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS,
- TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID,
- TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT];
+  u16 status;
 
   /* Extension(s). Reserved fields. */
   struct trn_cell_extension extensions;



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


[tor-commits] [tor/release-0.4.0] hs: Get rid of duplicate hs_cell_introd_ack_status_t

2019-06-05 Thread nickm
commit dcc1d8d15bf11ca1c4e2760bbc47d5fa3df3814d
Author: David Goulet 
Date:   Thu May 9 13:01:15 2019 -0400

hs: Get rid of duplicate hs_cell_introd_ack_status_t

This enum was the exact same as hs_intro_ack_status_t that was removed at 
the
previous commit. It was used client side when parsing the INTRODUCE_ACK 
cell.

Now, the entire code dealing with the INTRODUCE_ACK cell (both sending and
receiving) have been modified to all use the same ABI defined in the trunnel
introduce1 file.

Finally, the client will default to the normal behavior when receiving an
unknown NACK status code which is to note down that we've failed and 
re-extend
to the next intro point. This way, unknown status code won't trigger a
different behavior client side.

Part of #30454.

Signed-off-by: David Goulet 
---
 src/or/hs_cell.c   |  4 ++--
 src/or/hs_cell.h   |  8 
 src/or/hs_client.c | 18 +-
 3 files changed, 11 insertions(+), 19 deletions(-)

diff --git a/src/or/hs_cell.c b/src/or/hs_cell.c
index 03273a44f..ba80653a7 100644
--- a/src/or/hs_cell.c
+++ b/src/or/hs_cell.c
@@ -881,9 +881,9 @@ hs_cell_parse_introduce_ack(const uint8_t *payload, size_t 
payload_len)
* do a special case. */
   if (payload_len <= 1) {
 if (payload_len == 0) {
-  ret = HS_CELL_INTRO_ACK_SUCCESS;
+  ret = TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS;
 } else {
-  ret = HS_CELL_INTRO_ACK_FAILURE;
+  ret = TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID;
 }
 goto end;
   }
diff --git a/src/or/hs_cell.h b/src/or/hs_cell.h
index 958dde4ff..ed4af3c5a 100644
--- a/src/or/hs_cell.h
+++ b/src/or/hs_cell.h
@@ -16,14 +16,6 @@
  * 3.2.2 of the specification). Below this value, the cell must be padded. */
 #define HS_CELL_INTRODUCE1_MIN_SIZE 246
 
-/* Status code of an INTRODUCE_ACK cell. */
-typedef enum {
-  HS_CELL_INTRO_ACK_SUCCESS = 0x, /* Cell relayed to service. */
-  HS_CELL_INTRO_ACK_FAILURE = 0x0001, /* Service ID not recognized */
-  HS_CELL_INTRO_ACK_BADFMT  = 0x0002, /* Bad message format */
-  HS_CELL_INTRO_ACK_NORELAY = 0x0003, /* Can't relay cell to service */
-} hs_cell_introd_ack_status_t;
-
 /* Onion key type found in the INTRODUCE1 cell. */
 typedef enum {
   HS_CELL_ONION_KEY_TYPE_NTOR = 1,
diff --git a/src/or/hs_client.c b/src/or/hs_client.c
index 8ecefc120..7d44952e4 100644
--- a/src/or/hs_client.c
+++ b/src/or/hs_client.c
@@ -35,6 +35,8 @@
 #include "router.h"
 #include "routerset.h"
 
+#include "trunnel/hs/cell_introduce1.h"
+
 /* Return a human-readable string for the client fetch status code. */
 static const char *
 fetch_status_to_string(hs_client_fetch_status_t status)
@@ -1018,23 +1020,21 @@ handle_introduce_ack(origin_circuit_t *circ, const 
uint8_t *payload,
 
   status = hs_cell_parse_introduce_ack(payload, payload_len);
   switch (status) {
-  case HS_CELL_INTRO_ACK_SUCCESS:
+  case TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS:
 ret = 0;
 handle_introduce_ack_success(circ);
 goto end;
-  case HS_CELL_INTRO_ACK_FAILURE:
-  case HS_CELL_INTRO_ACK_BADFMT:
-  case HS_CELL_INTRO_ACK_NORELAY:
+  case TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID:
+  case TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT:
+  /* It is possible that the intro point can send us an unknown status code
+   * for the NACK that we do not know about like a new code for instance.
+   * Just fallthrough so we can note down the NACK and re-extend. */
+  default:
 handle_introduce_ack_bad(circ, status);
 /* We are going to see if we have to close the circuits (IP and RP) or we
  * can re-extend to a new intro point. */
 ret = close_or_reextend_intro_circ(circ);
 break;
-  default:
-log_info(LD_PROTOCOL, "Unknown INTRODUCE_ACK status code %u from %s",
-status,
-safe_str_client(extend_info_describe(circ->build_state->chosen_exit)));
-break;
   }
 
  end:



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


[tor-commits] [tor/release-0.4.0] Merge remote-tracking branch 'tor-github/pr/1020' into maint-0.4.0

2019-06-05 Thread nickm
commit a56d7e37aa8f52397f9fd762d07b85f3360afd2a
Merge: 00108b75d 0c451b31d
Author: Nick Mathewson 
Date:   Wed Jun 5 16:10:51 2019 -0400

Merge remote-tracking branch 'tor-github/pr/1020' into maint-0.4.0

 changes/bug30452   |  3 +++
 doc/tor.1.txt  |  4 
 src/app/config/config.c| 13 +
 src/app/main/main.c|  1 +
 src/feature/dirauth/authmode.h |  4 
 5 files changed, 25 insertions(+)

diff --cc doc/tor.1.txt
index c2df7687f,f46929897..b9a48b680
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@@ -88,10 -88,12 +88,14 @@@ COMMAND-LINE OPTION
  List all valid options that are scheduled to become obsolete in a
  future version. (This is a warning, not a promise.)
  
+ [[opt-list-modules]] **--list-modules**::
+ For each optional module, list whether or not it has been compiled
+ into Tor.  (Any module not listed is not optional in this version of Tor.)
+ 
  [[opt-version]] **--version**::
 -Display Tor version and exit.
 +Display Tor version and exit. The output is a single line of the format
 +"Tor version [version number]."  (The version number format
 +is as specified in version-spec.txt.)
  
  [[opt-quiet]] **--quiet**|**--hush**::
  Override the default console log.  By default, Tor starts out logging



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


[tor-commits] [tor/release-0.4.0] Merge remote-tracking branch 'tor-github/pr/989' into maint-0.4.0

2019-06-05 Thread nickm
commit d63c17f2afb810f5db896b10909fe9ff2bfe7cf9
Merge: e51b57ee0 b05b165a7
Author: Nick Mathewson 
Date:   Wed Jun 5 16:22:29 2019 -0400

Merge remote-tracking branch 'tor-github/pr/989' into maint-0.4.0

 .travis.yml | 22 +-
 changes/ticket30213 |  3 +++
 2 files changed, 4 insertions(+), 21 deletions(-)




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


[tor-commits] [tor/release-0.4.0] hs: Define INTRODUCE_ACK status code in trunnel

2019-06-05 Thread nickm
commit 590d97bc1065bdb93c70695c91de9c548ef802af
Author: David Goulet 
Date:   Thu May 9 12:55:52 2019 -0400

hs: Define INTRODUCE_ACK status code in trunnel

Remove the hs_intro_ack_status_t enum and move the value into trunnel. Only
use these values from now on in the intro point code.

Interestingly enough, the client side also re-define these values in 
hs_cell.h
with the hs_cell_introd_ack_status_t enum. Next commit will fix that and 
force
to use the trunnel ABI.

Part of #30454

Signed-off-by: David Goulet 
---
 src/or/hs_intropoint.c | 16 
 src/or/hs_intropoint.h |  7 ---
 src/trunnel/hs/cell_introduce1.c   | 13 +++--
 src/trunnel/hs/cell_introduce1.h   |  3 +++
 src/trunnel/hs/cell_introduce1.trunnel |  9 -
 5 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/src/or/hs_intropoint.c b/src/or/hs_intropoint.c
index e0ab27bd3..472e4afe9 100644
--- a/src/or/hs_intropoint.c
+++ b/src/or/hs_intropoint.c
@@ -336,7 +336,7 @@ hs_intro_received_establish_intro(or_circuit_t *circ, const 
uint8_t *request,
  * Return 0 on success else a negative value on error which will close the
  * circuit. */
 static int
-send_introduce_ack_cell(or_circuit_t *circ, hs_intro_ack_status_t status)
+send_introduce_ack_cell(or_circuit_t *circ, uint16_t status)
 {
   int ret = -1;
   uint8_t *encoded_cell = NULL;
@@ -433,7 +433,7 @@ handle_introduce1(or_circuit_t *client_circ, const uint8_t 
*request,
   int ret = -1;
   or_circuit_t *service_circ;
   trn_cell_introduce1_t *parsed_cell;
-  hs_intro_ack_status_t status = HS_INTRO_ACK_STATUS_SUCCESS;
+  uint16_t status = TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS;
 
   tor_assert(client_circ);
   tor_assert(request);
@@ -448,14 +448,14 @@ handle_introduce1(or_circuit_t *client_circ, const 
uint8_t *request,
"Rejecting %s INTRODUCE1 cell. Responding with NACK.",
cell_size == -1 ? "invalid" : "truncated");
 /* Inform client that the INTRODUCE1 has a bad format. */
-status = HS_INTRO_ACK_STATUS_BAD_FORMAT;
+status = TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT;
 goto send_ack;
   }
 
   /* Once parsed validate the cell format. */
   if (validate_introduce1_parsed_cell(parsed_cell) < 0) {
 /* Inform client that the INTRODUCE1 has bad format. */
-status = HS_INTRO_ACK_STATUS_BAD_FORMAT;
+status = TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT;
 goto send_ack;
   }
 
@@ -472,7 +472,7 @@ handle_introduce1(or_circuit_t *client_circ, const uint8_t 
*request,
 "Responding with NACK.",
safe_str(b64_key), client_circ->p_circ_id);
   /* Inform the client that we don't know the requested service ID. */
-  status = HS_INTRO_ACK_STATUS_UNKNOWN_ID;
+  status = TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID;
   goto send_ack;
 }
   }
@@ -485,12 +485,12 @@ handle_introduce1(or_circuit_t *client_circ, const 
uint8_t *request,
 log_warn(LD_PROTOCOL, "Unable to send INTRODUCE2 cell to the service.");
 /* Inform the client that we can't relay the cell. Use the unknown ID
  * status code since it means that we do not know the service. */
-status = HS_INTRO_ACK_STATUS_UNKNOWN_ID;
+status = TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID;
 goto send_ack;
   }
 
   /* Success! Send an INTRODUCE_ACK success status onto the client circuit. */
-  status = HS_INTRO_ACK_STATUS_SUCCESS;
+  status = TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS;
   ret = 0;
 
  send_ack:
@@ -501,7 +501,7 @@ handle_introduce1(or_circuit_t *client_circ, const uint8_t 
*request,
 /* Circuit has been closed on failure of transmission. */
 goto done;
   }
-  if (status != HS_INTRO_ACK_STATUS_SUCCESS) {
+  if (status != TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS) {
 /* We just sent a NACK that is a non success status code so close the
  * circuit because it's not useful to keep it open. Remember, a client can
  * only send one INTRODUCE1 cell on a circuit. */
diff --git a/src/or/hs_intropoint.h b/src/or/hs_intropoint.h
index 014f9339a..1c2cc564a 100644
--- a/src/or/hs_intropoint.h
+++ b/src/or/hs_intropoint.h
@@ -19,13 +19,6 @@ typedef enum {
   HS_INTRO_AUTH_KEY_TYPE_ED25519 = 0x02,
 } hs_intro_auth_key_type_t;
 
-/* INTRODUCE_ACK status code. */
-typedef enum {
-  HS_INTRO_ACK_STATUS_SUCCESS= 0x,
-  HS_INTRO_ACK_STATUS_UNKNOWN_ID = 0x0001,
-  HS_INTRO_ACK_STATUS_BAD_FORMAT = 0x0002,
-} hs_intro_ack_status_t;
-
 /* Object containing introduction point common data between the service and
  * the client side. */
 typedef struct hs_intropoint_t {
diff --git a/src/trunnel/hs/cell_introduce1.c b/src/trunnel/hs/cell_introduce1.c
index 358b355cd..b93add64c 100644
--- a/src/trunnel/hs/cell_introduce1.c
+++ b/src/trunnel/hs/cell_introduce1.c
@@ -519,6 +519,7 @@ trn_cell_introduce_ack_new(void)
   trn_cell_introduce_ack_t *val = trunnel_calloc(1, 
sizeof(trn_cell_introduce_ack_t));
   if (NULL == 

[tor-commits] [tor/release-0.4.0] Make --list-modules imply --hush

2019-06-05 Thread nickm
commit 0c451b31d2694c96ec20145e3b0e9b22cd54819d
Author: Nick Mathewson 
Date:   Tue May 14 19:55:35 2019 -0400

Make --list-modules imply --hush
---
 src/app/main/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/app/main/main.c b/src/app/main/main.c
index c45c87d8d..67f2181cd 100644
--- a/src/app/main/main.c
+++ b/src/app/main/main.c
@@ -577,6 +577,7 @@ tor_init(int argc, char *argv[])
   if (!strcmp(cl->key, "--version") || !strcmp(cl->key, "--digests") ||
   !strcmp(cl->key, "--list-torrc-options") ||
   !strcmp(cl->key, "--library-versions") ||
+  !strcmp(cl->key, "--list-modules") ||
   !strcmp(cl->key, "--hash-password") ||
   !strcmp(cl->key, "-h") || !strcmp(cl->key, "--help")) {
 if (quiet < 1)



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


[tor-commits] [tor/release-0.4.0] hs: Remove hs_cell_onion_key_type_t enum

2019-06-05 Thread nickm
commit 56908c6f1c63d32bef7011c811976e24156f17d3
Author: David Goulet 
Date:   Wed May 15 15:30:29 2019 -0400

hs: Remove hs_cell_onion_key_type_t enum

Unify this with the trunnel ABI so we don't duplicate.

Part of #30454

Signed-off-by: David Goulet 
---
 src/or/hs_cell.c   |  7 ---
 src/or/hs_cell.h   |  5 -
 src/trunnel/hs/cell_introduce1.c   | 14 +++---
 src/trunnel/hs/cell_introduce1.h   |  1 +
 src/trunnel/hs/cell_introduce1.trunnel |  5 -
 5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/or/hs_cell.c b/src/or/hs_cell.c
index 7bbefe8fd..7b7e9379c 100644
--- a/src/or/hs_cell.c
+++ b/src/or/hs_cell.c
@@ -160,11 +160,12 @@ parse_introduce2_encrypted(const uint8_t *decrypted_data,
   }
 
   if (trn_cell_introduce_encrypted_get_onion_key_type(enc_cell) !=
-  HS_CELL_ONION_KEY_TYPE_NTOR) {
+  TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR) {
 log_info(LD_REND, "INTRODUCE2 onion key type is invalid. Got %u but "
   "expected %u on circuit %u for service %s",
  trn_cell_introduce_encrypted_get_onion_key_type(enc_cell),
- HS_CELL_ONION_KEY_TYPE_NTOR, TO_CIRCUIT(circ)->n_circ_id,
+ TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR,
+ TO_CIRCUIT(circ)->n_circ_id,
  safe_str_client(service->onion_address));
 goto err;
   }
@@ -257,7 +258,7 @@ 
introduce1_set_encrypted_onion_key(trn_cell_introduce_encrypted_t *cell,
   tor_assert(onion_pk);
   /* There is only one possible key type for a non legacy cell. */
   trn_cell_introduce_encrypted_set_onion_key_type(cell,
-  HS_CELL_ONION_KEY_TYPE_NTOR);
+   TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR);
   trn_cell_introduce_encrypted_set_onion_key_len(cell, CURVE25519_PUBKEY_LEN);
   trn_cell_introduce_encrypted_setlen_onion_key(cell, CURVE25519_PUBKEY_LEN);
   memcpy(trn_cell_introduce_encrypted_getarray_onion_key(cell), onion_pk,
diff --git a/src/or/hs_cell.h b/src/or/hs_cell.h
index ed4af3c5a..49b29a43b 100644
--- a/src/or/hs_cell.h
+++ b/src/or/hs_cell.h
@@ -16,11 +16,6 @@
  * 3.2.2 of the specification). Below this value, the cell must be padded. */
 #define HS_CELL_INTRODUCE1_MIN_SIZE 246
 
-/* Onion key type found in the INTRODUCE1 cell. */
-typedef enum {
-  HS_CELL_ONION_KEY_TYPE_NTOR = 1,
-} hs_cell_onion_key_type_t;
-
 /* This data structure contains data that we need to build an INTRODUCE1 cell
  * used by the INTRODUCE1 build function. */
 typedef struct hs_cell_introduce1_data_t {
diff --git a/src/trunnel/hs/cell_introduce1.c b/src/trunnel/hs/cell_introduce1.c
index cebfa2867..53b3d299f 100644
--- a/src/trunnel/hs/cell_introduce1.c
+++ b/src/trunnel/hs/cell_introduce1.c
@@ -723,7 +723,7 @@ trn_cell_introduce_encrypted_new(void)
   trn_cell_introduce_encrypted_t *val = trunnel_calloc(1, 
sizeof(trn_cell_introduce_encrypted_t));
   if (NULL == val)
 return NULL;
-  val->onion_key_type = 1;
+  val->onion_key_type = TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR;
   return val;
 }
 
@@ -827,7 +827,7 @@ trn_cell_introduce_encrypted_get_onion_key_type(const 
trn_cell_introduce_encrypt
 int
 trn_cell_introduce_encrypted_set_onion_key_type(trn_cell_introduce_encrypted_t 
*inp, uint8_t val)
 {
-  if (! ((val == 1))) {
+  if (! ((val == TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR))) {
  TRUNNEL_SET_ERROR_CODE(inp);
  return -1;
   }
@@ -1069,7 +1069,7 @@ trn_cell_introduce_encrypted_check(const 
trn_cell_introduce_encrypted_t *obj)
 if (NULL != (msg = trn_cell_extension_check(obj->extensions)))
   return msg;
   }
-  if (! (obj->onion_key_type == 1))
+  if (! (obj->onion_key_type == TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR))
 return "Integer out of bounds";
   if (TRUNNEL_DYNARRAY_LEN(>onion_key) != obj->onion_key_len)
 return "Length mismatch for onion_key";
@@ -1102,7 +1102,7 @@ trn_cell_introduce_encrypted_encoded_len(const 
trn_cell_introduce_encrypted_t *o
   /* Length of struct trn_cell_extension extensions */
   result += trn_cell_extension_encoded_len(obj->extensions);
 
-  /* Length of u8 onion_key_type IN [1] */
+  /* Length of u8 onion_key_type IN [TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR] */
   result += 1;
 
   /* Length of u16 onion_key_len */
@@ -1166,7 +1166,7 @@ trn_cell_introduce_encrypted_encode(uint8_t *output, 
const size_t avail, const t
 goto fail; /* XXX !*/
   written += result; ptr += result;
 
-  /* Encode u8 onion_key_type IN [1] */
+  /* Encode u8 onion_key_type IN [TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR] */
   trunnel_assert(written <= avail);
   if (avail - written < 1)
 goto truncated;
@@ -1270,11 +1270,11 @@ 
trn_cell_introduce_encrypted_parse_into(trn_cell_introduce_encrypted_t *obj, con
   trunnel_assert((size_t)result <= remaining);
   remaining -= result; ptr += result;
 
-  /* Parse u8 onion_key_type IN [1] */
+  /* Parse u8 onion_key_type IN 

[tor-commits] [tor/release-0.4.0] Add a --list-modules command

2019-06-05 Thread nickm
commit 1b16fcb70cb9507184fe7316396c93c1daa12674
Author: Nick Mathewson 
Date:   Thu May 9 11:26:13 2019 -0400

Add a --list-modules command

Closes ticket 30452.
---
 changes/bug30452   |  3 +++
 doc/tor.1.txt  |  4 
 src/app/config/config.c| 13 +
 src/feature/dirauth/authmode.h |  4 
 4 files changed, 24 insertions(+)

diff --git a/changes/bug30452 b/changes/bug30452
new file mode 100644
index 0..2bb401d87
--- /dev/null
+++ b/changes/bug30452
@@ -0,0 +1,3 @@
+  o Minor features (compile-time modules):
+- Add a --list-modules command to print a list of which compile-time
+  modules are enabled. Closes ticket 30452.
diff --git a/doc/tor.1.txt b/doc/tor.1.txt
index 975a19818..f46929897 100644
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@ -88,6 +88,10 @@ COMMAND-LINE OPTIONS
 List all valid options that are scheduled to become obsolete in a
 future version. (This is a warning, not a promise.)
 
+[[opt-list-modules]] **--list-modules**::
+For each optional module, list whether or not it has been compiled
+into Tor.  (Any module not listed is not optional in this version of Tor.)
+
 [[opt-version]] **--version**::
 Display Tor version and exit.
 
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 2a504d306..7ccd76e7f 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -2474,6 +2474,7 @@ static const struct {
   { "--quiet",TAKES_NO_ARGUMENT },
   { "--hush", TAKES_NO_ARGUMENT },
   { "--version",  TAKES_NO_ARGUMENT },
+  { "--list-modules", TAKES_NO_ARGUMENT },
   { "--library-versions", TAKES_NO_ARGUMENT },
   { "-h", TAKES_NO_ARGUMENT },
   { "--help", TAKES_NO_ARGUMENT },
@@ -2695,6 +2696,13 @@ list_deprecated_options(void)
   }
 }
 
+/** Print all compile-time modules and their enabled/disabled status. */
+static void
+list_enabled_modules(void)
+{
+  printf("%s: %s\n", "dirauth", have_module_dirauth() ? "yes" : "no");
+}
+
 /** Last value actually set by resolve_my_address. */
 static uint32_t last_resolved_addr = 0;
 
@@ -5198,6 +5206,11 @@ options_init_from_torrc(int argc, char **argv)
 return 1;
   }
 
+  if (config_line_find(cmdline_only_options, "--list-modules")) {
+list_enabled_modules();
+return 1;
+  }
+
   if (config_line_find(cmdline_only_options, "--library-versions")) {
 printf("Tor version %s. \n", get_version());
 printf("Library versions\tCompiled\t\tRuntime\n");
diff --git a/src/feature/dirauth/authmode.h b/src/feature/dirauth/authmode.h
index 40a89c739..876a1f947 100644
--- a/src/feature/dirauth/authmode.h
+++ b/src/feature/dirauth/authmode.h
@@ -27,6 +27,8 @@ authdir_mode_v3(const or_options_t *options)
   return authdir_mode(options) && options->V3AuthoritativeDir != 0;
 }
 
+#define have_module_dirauth() (1)
+
 #else /* HAVE_MODULE_DIRAUTH */
 
 #define authdir_mode(options) (((void)(options)),0)
@@ -37,6 +39,8 @@ authdir_mode_v3(const or_options_t *options)
 #define authdir_mode_bridge(options) (((void)(options)),0)
 #define authdir_mode_v3(options) (((void)(options)),0)
 
+#define have_module_dirauth() (0)
+
 #endif /* HAVE_MODULE_DIRAUTH */
 
 #endif /* TOR_MODE_H */



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


[tor-commits] [tor/release-0.4.0] Merge remote-tracking branch 'tor-github/pr/971' into maint-0.4.0

2019-06-05 Thread nickm
commit 851e881f01355b0290e79100c09dbedd425f8946
Merge: a56d7e37a 9a97b5ff5
Author: Nick Mathewson 
Date:   Wed Jun 5 16:12:07 2019 -0400

Merge remote-tracking branch 'tor-github/pr/971' into maint-0.4.0

 .travis.yml | 1 +
 changes/ticket30234 | 2 ++
 2 files changed, 3 insertions(+)




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


[tor-commits] [tor/release-0.4.0] Merge branch 'bug30316_035' into bug30316_040

2019-06-05 Thread nickm
commit 821dd54586bffd95bdd8c9d333b1f80ef55d3742
Merge: 593d29920 0ab4dc7ef
Author: Nick Mathewson 
Date:   Mon Apr 29 13:48:25 2019 -0400

Merge branch 'bug30316_035' into bug30316_040

Fixes conflicts and also moves bandwidth-file-digest.

 changes/bug30316  |  4 
 src/feature/dirauth/dirvote.c | 11 +--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --cc src/feature/dirauth/dirvote.c
index 29f5d0450,af8b3dc20..755b99bae
--- a/src/feature/dirauth/dirvote.c
+++ b/src/feature/dirauth/dirvote.c
@@@ -348,6 -322,7 +348,8 @@@ format_networkstatus_vote(crypto_pk_t *
   "known-flags %s\n"
   "flag-thresholds %s\n"
   "params %s\n"
+  "%s" /* bandwidth file headers */
++ "%s" /* bandwidth file digest */
   "dir-source %s %s %s %s %d %d\n"
   "contact %s\n"
   "%s" /* shared randomness information */
@@@ -365,6 -338,7 +365,8 @@@
   flags,
   flag_thresholds,
   params,
+  bw_headers_line ? bw_headers_line : "",
++ bw_file_digest ? bw_file_digest: "",
   voter->nickname, fingerprint, voter->address,
   fmt_addr32(addr), voter->dir_port, voter->or_port,
   voter->contact,



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


[tor-commits] [tor/release-0.4.0] Add changes file

2019-06-05 Thread nickm
commit b05b165a75a9d9e912da64788fc873fb215f5d75
Author: rl1987 
Date:   Sun Apr 21 21:06:57 2019 +0300

Add changes file
---
 changes/ticket30213 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/changes/ticket30213 b/changes/ticket30213
new file mode 100644
index 0..acb761480
--- /dev/null
+++ b/changes/ticket30213
@@ -0,0 +1,3 @@
+  o Minor features (continuous integration):
+- Remove sudo configuration lines from .travis.yml as they are no longer
+  needed with current Travis build environment. Resolves issue 30213.



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


[tor-commits] [tor/release-0.4.0] Move bandwidth-file-headers line to appear in the correct vote section

2019-06-05 Thread nickm
commit 0ab4dc7ef7c6468c1d0d87a7cbc834217214f16b
Author: Nick Mathewson 
Date:   Mon Apr 29 13:43:50 2019 -0400

Move bandwidth-file-headers line to appear in the correct vote section

Fixes bug 30316; bugfix on 0.3.5.1-alpha.
---
 changes/bug30316  | 4 
 src/feature/dirauth/dirvote.c | 7 +++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/changes/bug30316 b/changes/bug30316
new file mode 100644
index 0..3e396318a
--- /dev/null
+++ b/changes/bug30316
@@ -0,0 +1,4 @@
+  o Minor bugfixes (directory authority):
+- Move the "bandwidth-file-headers" line in directory authority votes
+  so that it conforms to dir-spec.txt. Fixes bug 30316; bugfix on
+  0.3.5.1-alpha.
diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c
index 5e426b0f8..af8b3dc20 100644
--- a/src/feature/dirauth/dirvote.c
+++ b/src/feature/dirauth/dirvote.c
@@ -322,10 +322,10 @@ format_networkstatus_vote(crypto_pk_t 
*private_signing_key,
  "known-flags %s\n"
  "flag-thresholds %s\n"
  "params %s\n"
+ "%s" /* bandwidth file headers */
  "dir-source %s %s %s %s %d %d\n"
  "contact %s\n"
  "%s" /* shared randomness information */
- "%s" /* bandwidth file headers */
  ,
  v3_ns->type == NS_TYPE_VOTE ? "vote" : "opinion",
  methods,
@@ -338,13 +338,12 @@ format_networkstatus_vote(crypto_pk_t 
*private_signing_key,
  flags,
  flag_thresholds,
  params,
+ bw_headers_line ? bw_headers_line : "",
  voter->nickname, fingerprint, voter->address,
  fmt_addr32(addr), voter->dir_port, voter->or_port,
  voter->contact,
  shared_random_vote_str ?
-   shared_random_vote_str : "",
- bw_headers_line ?
-   bw_headers_line : "");
+   shared_random_vote_str : "");
 
 tor_free(params);
 tor_free(flags);



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


[tor-commits] [tor/release-0.4.0] hs: Remove usage of HS_INTRO_ACK_STATUS_CANT_RELAY

2019-06-05 Thread nickm
commit cbcc570ff4a8e03fc08bfd020d6b4c7365d4d137
Author: David Goulet 
Date:   Thu May 9 12:45:17 2019 -0400

hs: Remove usage of HS_INTRO_ACK_STATUS_CANT_RELAY

The INTRODUCE1 trunnel definition file doesn't support that value so it can
not be used else it leads to an assert on the intro point side if ever 
tried.

Fortunately, it was impossible to reach that code path.

Part of #30454

Signed-off-by: David Goulet 
---
 src/or/hs_intropoint.c | 5 +++--
 src/or/hs_intropoint.h | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/or/hs_intropoint.c b/src/or/hs_intropoint.c
index ee79109ca..e0ab27bd3 100644
--- a/src/or/hs_intropoint.c
+++ b/src/or/hs_intropoint.c
@@ -483,8 +483,9 @@ handle_introduce1(or_circuit_t *client_circ, const uint8_t 
*request,
RELAY_COMMAND_INTRODUCE2,
(char *) request, request_len, NULL)) {
 log_warn(LD_PROTOCOL, "Unable to send INTRODUCE2 cell to the service.");
-/* Inform the client that we can't relay the cell. */
-status = HS_INTRO_ACK_STATUS_CANT_RELAY;
+/* Inform the client that we can't relay the cell. Use the unknown ID
+ * status code since it means that we do not know the service. */
+status = HS_INTRO_ACK_STATUS_UNKNOWN_ID;
 goto send_ack;
   }
 
diff --git a/src/or/hs_intropoint.h b/src/or/hs_intropoint.h
index 749d1530e..014f9339a 100644
--- a/src/or/hs_intropoint.h
+++ b/src/or/hs_intropoint.h
@@ -24,7 +24,6 @@ typedef enum {
   HS_INTRO_ACK_STATUS_SUCCESS= 0x,
   HS_INTRO_ACK_STATUS_UNKNOWN_ID = 0x0001,
   HS_INTRO_ACK_STATUS_BAD_FORMAT = 0x0002,
-  HS_INTRO_ACK_STATUS_CANT_RELAY = 0x0003,
 } hs_intro_ack_status_t;
 
 /* Object containing introduction point common data between the service and



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


[tor-commits] [tor/master] Merge remote-tracking branch 'tor-github/pr/988' into maint-0.4.0

2019-06-05 Thread nickm
commit 6a6f7eb6718f22da80596a35e7774b075a417e97
Merge: d63c17f2a 821dd5458
Author: Nick Mathewson 
Date:   Wed Jun 5 16:22:52 2019 -0400

Merge remote-tracking branch 'tor-github/pr/988' into maint-0.4.0

 changes/bug30316  |  4 
 src/feature/dirauth/dirvote.c | 11 +--
 2 files changed, 9 insertions(+), 6 deletions(-)



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


[tor-commits] [tor/release-0.4.0] doc: update the man page and sample torrc for ExitRelay

2019-06-05 Thread nickm
commit 9b7cdd23deb5830cce794ce6e901b82fa094dd9f
Author: teor 
Date:   Thu Feb 28 11:22:20 2019 +1000

doc: update the man page and sample torrc for ExitRelay

We changed the default of ExitRelay in #21530 in 0.3.5.1-alpha, but
forgot to update the documentation.

Closes 29612.
---
 doc/tor.1.txt  | 13 +++--
 src/config/torrc.sample.in | 21 -
 2 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/doc/tor.1.txt b/doc/tor.1.txt
index 573fdf221..60997ad16 100644
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@ -1849,15 +1849,16 @@ is non-zero):
 [[ExitRelay]] **ExitRelay** **0**|**1**|**auto**::
 Tells Tor whether to run as an exit relay.  If Tor is running as a
 non-bridge server, and ExitRelay is set to 1, then Tor allows traffic to
-exit according to the ExitPolicy option (or the default ExitPolicy if
-none is specified). +
+exit according to the ExitPolicy option, the ReducedExitPolicy option,
+or the default ExitPolicy (if no other exit policy option is specified). +
  +
 If ExitRelay is set to 0, no traffic is allowed to
-exit, and the ExitPolicy option is ignored. +
+exit, and the ExitPolicy and ReducedExitPolicy options are ignored. +
  +
-If ExitRelay is set to "auto", then Tor behaves as if it were set to 1, but
-warns the user if this would cause traffic to exit.  In a future version,
-the default value will be 0. (Default: auto)
+If ExitRelay is set to "auto", then Tor checks the ExitPolicy and
+ReducedExitPolicy options. If either is set, Tor behaves as if ExitRelay
+were set to 1. If neither exit policy option is set, Tor behaves as if
+ExitRelay were set to 0. (Default: auto)
 
 [[ExitPolicy]] **ExitPolicy** __policy__,__policy__,__...__::
 Set an exit policy for this server. Each policy is of the form
diff --git a/src/config/torrc.sample.in b/src/config/torrc.sample.in
index 8d56b0896..c2ae707e9 100644
--- a/src/config/torrc.sample.in
+++ b/src/config/torrc.sample.in
@@ -1,5 +1,5 @@
 ## Configuration file for a typical Tor user
-## Last updated 22 December 2017 for Tor 0.3.2.8-rc.
+## Last updated 28 February 2019 for Tor 0.3.5.1-alpha.
 ## (may or may not work for much older or much newer versions of Tor.)
 ##
 ## Lines that begin with "## " try to explain what's going on. Lines
@@ -172,14 +172,25 @@
 ## Note: do not use MyFamily on bridge relays.
 #MyFamily $keyid,$keyid,...
 
-## Uncomment this if you do *not* want your relay to allow any exit traffic.
-## (Relays allow exit traffic by default.)
-#ExitRelay 0
+## Uncomment this if you want your relay to be an exit, with the default
+## exit policy (or whatever exit policy you set below).
+## (If ReducedExitPolicy or ExitPolicy are set, relays are exits.
+## If neither exit policy option is set, relays are non-exits.)
+#ExitRelay 1
 
 ## Uncomment this if you want your relay to allow IPv6 exit traffic.
-## (Relays only allow IPv4 exit traffic by default.)
+## You must also set ExitRelay, ReducedExitPolicy, or ExitPolicy to make your
+## relay into an exit.
+## (Relays do not allow any exit traffic by default.)
 #IPv6Exit 1
 
+## Uncomment this if you want your relay to be an exit, with a reduced set
+## of exit ports.
+#ReducedExitPolicy 1
+
+## Uncomment these lines if you want your relay to be an exit, with the
+## specified set of exit IPs and ports.
+##
 ## A comma-separated list of exit policies. They're considered first
 ## to last, and the first match wins.
 ##



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


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

2019-06-05 Thread nickm
commit 3c2b2f072f996ba958ed5b6e07d3bac02291fc4a
Merge: 30f0e993c 6a6f7eb67
Author: Nick Mathewson 
Date:   Wed Jun 5 16:24:10 2019 -0400

Merge branch 'maint-0.4.0'

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


[tor-commits] [tor/release-0.4.0] Travis: Show stem's tor log after failure

2019-06-05 Thread nickm
commit 9a97b5ff56fc6f29d93ee515eb7244fe4db34c66
Author: teor 
Date:   Mon Apr 22 11:48:07 2019 +1000

Travis: Show stem's tor log after failure

Closes ticket 30234.
---
 .travis.yml | 1 +
 changes/ticket30234 | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 89040d822..1b04fa48f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -225,6 +225,7 @@ after_failure:
   ## `make distcheck` puts it somewhere different.
   - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog || echo "make 
failed"; fi
   - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-core || echo "make 
failed"; fi
+  - if [[ "$TEST_STEM" != "" ]]; then cat "$STEM_SOURCE_DIR"/test/data/tor_log 
|| echo "cat failed"; fi
 
 before_cache:
   ## Delete all gcov files.
diff --git a/changes/ticket30234 b/changes/ticket30234
new file mode 100644
index 0..5a0076bad
--- /dev/null
+++ b/changes/ticket30234
@@ -0,0 +1,2 @@
+  o Testing (continuous integration):
+- In Travis, show stem's tor log after failure. Closes ticket 30234.



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


[tor-commits] [tor/release-0.4.0] Use a tor_abort_() wrapper in our util_bug.h macros

2019-06-05 Thread nickm
commit 802ac8ad618a0674c26bb973a2277e07b20f8c7b
Author: Nick Mathewson 
Date:   Mon Apr 15 14:16:23 2019 -0400

Use a tor_abort_() wrapper in our util_bug.h macros

Previously, our use of abort() would break anywhere that we didn't
include stdlib.h.  This was especially troublesome in case where
tor_assert_nonfatal() was used with ALL_BUGS_ARE_FATAL, since that
one seldom gets tested.

As an alternative, we could have just made this header include
stdlib.h.  But that seems bloaty.

Fixes bug 30189; bugfix on 0.3.4.1-alpha.
---
 changes/bug30189   |  4 
 src/lib/log/util_bug.c | 14 ++
 src/lib/log/util_bug.h |  8 +---
 3 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/changes/bug30189 b/changes/bug30189
new file mode 100644
index 0..f8c932a5f
--- /dev/null
+++ b/changes/bug30189
@@ -0,0 +1,4 @@
+  o Minor bugfixes (compilation, unusual configuration):
+- Avoid failures when building with ALL_BUGS_ARE_FAILED due to
+  missing declarations of abort(), and prevent other such failures
+  in the future. Fixes bug 30189; bugfix on 0.3.4.1-alpha.
diff --git a/src/lib/log/util_bug.c b/src/lib/log/util_bug.c
index f42d2d2ab..c65a91ae9 100644
--- a/src/lib/log/util_bug.c
+++ b/src/lib/log/util_bug.c
@@ -19,6 +19,7 @@
 #include "lib/string/printf.h"
 
 #include 
+#include 
 
 #ifdef TOR_UNIT_TESTS
 static void (*failed_assertion_cb)(void) = NULL;
@@ -120,6 +121,19 @@ tor_bug_occurred_(const char *fname, unsigned int line,
 #endif
 }
 
+/**
+ * Call the abort() function to kill the current process with a fatal
+ * error.
+ *
+ * (This is a separate function so that we declare it in util_bug.h without
+ * including stdlib in all the users of util_bug.h)
+ **/
+void
+tor_abort_(void)
+{
+  abort();
+}
+
 #ifdef _WIN32
 /** Take a filename and return a pointer to its final element.  This
  * function is called on __FILE__ to fix a MSVC nit where __FILE__
diff --git a/src/lib/log/util_bug.h b/src/lib/log/util_bug.h
index 18d40bbf3..2a4d68127 100644
--- a/src/lib/log/util_bug.h
+++ b/src/lib/log/util_bug.h
@@ -99,7 +99,7 @@
   if (ASSERT_PREDICT_LIKELY_(expr)) {   \
   } else {  \
 tor_assertion_failed_(SHORT_FILE__, __LINE__, __func__, #expr); \
-abort();\
+tor_abort_();   \
   } STMT_END
 #endif /* defined(TOR_UNIT_TESTS) && defined(DISABLE_ASSERTS_IN_UNIT_TESTS) */
 
@@ -107,7 +107,7 @@
   STMT_BEGIN {  \
 tor_assertion_failed_(SHORT_FILE__, __LINE__, __func__, \
   "line should be unreached");  \
-abort();\
+tor_abort_();   \
   } STMT_END
 
 /* Non-fatal bug assertions. The "unreached" variants mean "this line should
@@ -141,7 +141,7 @@
 #define BUG(cond)   \
   (ASSERT_PREDICT_UNLIKELY_(cond) ? \
(tor_assertion_failed_(SHORT_FILE__,__LINE__,__func__,"!("#cond")"), \
-abort(), 1) \
+tor_abort_(), 1)\
: 0)
 #elif defined(TOR_UNIT_TESTS) && defined(DISABLE_ASSERTS_IN_UNIT_TESTS)
 #define tor_assert_nonfatal_unreached() STMT_NIL
@@ -226,6 +226,8 @@ void tor_bug_occurred_(const char *fname, unsigned int line,
const char *func, const char *expr,
int once);
 
+void tor_abort_(void) ATTR_NORETURN;
+
 #ifdef _WIN32
 #define SHORT_FILE__ (tor_fix_source_file(__FILE__))
 const char *tor_fix_source_file(const char *fname);



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


[tor-commits] [tor/release-0.4.0] Travis: remove sudo configuration

2019-06-05 Thread nickm
commit 10c71105e6403025f380dee7c3d7e1ce40e8f2b6
Author: rl1987 
Date:   Wed Apr 24 13:29:23 2019 +0300

Travis: remove sudo configuration

See: 
https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
---
 .travis.yml | 22 +-
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index ab7db2a92..7f20875cf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,7 +39,7 @@ env:
 - RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true
 
 matrix:
-  ## include creates builds with gcc, linux, sudo: false
+  ## include creates builds with gcc, linux
   include:
 ## We include a single coverage build with the best options for coverage
 - env: COVERAGE_OPTIONS="--enable-coverage" HARDENING_OPTIONS=""
@@ -71,12 +71,6 @@ matrix:
   ## allow failures by env:
   ## 
https://docs.travis-ci.com/user/customizing-the-build#matching-jobs-with-allow_failures
   exclude:
-## Clang doesn't work in containerized builds, see below.
-- compiler: clang
-  sudo: false
-## Non-containerized gcc are slow and redundant.
-- compiler: gcc
-  sudo: required
 ## gcc on OSX is less useful, because the default compiler is clang.
 - compiler: gcc
   os: osx
@@ -92,20 +86,6 @@ matrix:
   ## TOR_RUST_DEPENDENCIES is spelt RUST_DEPENDENCIES in 0.3.2
   env: RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true 
HARDENING_OPTIONS=""
 
-## We don't need sudo. (The "apt:" stanza after this allows us to not need
-## sudo; otherwise, we would need it for getting dependencies.)
-##
-## But we use "sudo: required" to force non-containerized builds, working
-## around a Travis CI environment issue: clang LeakAnalyzer fails
-## because it requires ptrace and the containerized environment no
-## longer allows ptrace.
-## https://github.com/travis-ci/travis-ci/issues/9033
-##
-## In the matrix above, we exclude redundant combinations.
-sudo:
-  - false
-  - required
-
 ## (Linux only) Use the latest Linux image (Ubuntu Trusty)
 dist: trusty
 



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


[tor-commits] [tor/master] Merge remote-tracking branch 'tor-github/pr/1020' into maint-0.4.0

2019-06-05 Thread nickm
commit a56d7e37aa8f52397f9fd762d07b85f3360afd2a
Merge: 00108b75d 0c451b31d
Author: Nick Mathewson 
Date:   Wed Jun 5 16:10:51 2019 -0400

Merge remote-tracking branch 'tor-github/pr/1020' into maint-0.4.0

 changes/bug30452   |  3 +++
 doc/tor.1.txt  |  4 
 src/app/config/config.c| 13 +
 src/app/main/main.c|  1 +
 src/feature/dirauth/authmode.h |  4 
 5 files changed, 25 insertions(+)

diff --cc doc/tor.1.txt
index c2df7687f,f46929897..b9a48b680
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@@ -88,10 -88,12 +88,14 @@@ COMMAND-LINE OPTION
  List all valid options that are scheduled to become obsolete in a
  future version. (This is a warning, not a promise.)
  
+ [[opt-list-modules]] **--list-modules**::
+ For each optional module, list whether or not it has been compiled
+ into Tor.  (Any module not listed is not optional in this version of Tor.)
+ 
  [[opt-version]] **--version**::
 -Display Tor version and exit.
 +Display Tor version and exit. The output is a single line of the format
 +"Tor version [version number]."  (The version number format
 +is as specified in version-spec.txt.)
  
  [[opt-quiet]] **--quiet**|**--hush**::
  Override the default console log.  By default, Tor starts out logging



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


[tor-commits] [tor/master] Merge remote-tracking branch 'tor-github/pr/1039' into maint-0.4.0

2019-06-05 Thread nickm
commit 2300a619a548ed529551c731dd706fea0b2a0a20
Merge: 851e881f0 245dccb77
Author: Nick Mathewson 
Date:   Wed Jun 5 16:13:53 2019 -0400

Merge remote-tracking branch 'tor-github/pr/1039' into maint-0.4.0

 changes/ticket30454| 10 
 src/feature/hs/hs_cell.c   | 16 +++--
 src/feature/hs/hs_cell.h   | 13 --
 src/feature/hs/hs_client.c | 18 +++---
 src/feature/hs/hs_intropoint.c | 27 +++--
 src/feature/hs/hs_intropoint.h | 15 
 src/test/test_hs_cell.c|  2 +-
 src/test/test_hs_intropoint.c  |  4 ++--
 src/trunnel/hs/cell_introduce1.c   | 44 +-
 src/trunnel/hs/cell_introduce1.h   |  7 ++
 src/trunnel/hs/cell_introduce1.trunnel | 21 +---
 11 files changed, 87 insertions(+), 90 deletions(-)



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


[tor-commits] [tor/master] Merge remote-tracking branch 'tor-github/pr/952' into maint-0.4.0

2019-06-05 Thread nickm
commit e51b57ee047420b929c7d58de70df6ea5ca77565
Merge: 04cb2d401 802ac8ad6
Author: Nick Mathewson 
Date:   Wed Jun 5 16:16:34 2019 -0400

Merge remote-tracking branch 'tor-github/pr/952' into maint-0.4.0

 changes/bug30189   |  4 
 src/lib/log/util_bug.c | 14 ++
 src/lib/log/util_bug.h |  8 +---
 3 files changed, 23 insertions(+), 3 deletions(-)



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


[tor-commits] [tor/master] Merge remote-tracking branch 'tor-github/pr/989' into maint-0.4.0

2019-06-05 Thread nickm
commit d63c17f2afb810f5db896b10909fe9ff2bfe7cf9
Merge: e51b57ee0 b05b165a7
Author: Nick Mathewson 
Date:   Wed Jun 5 16:22:29 2019 -0400

Merge remote-tracking branch 'tor-github/pr/989' into maint-0.4.0

 .travis.yml | 22 +-
 changes/ticket30213 |  3 +++
 2 files changed, 4 insertions(+), 21 deletions(-)




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


[tor-commits] [tor/master] Merge remote-tracking branch 'tor-github/pr/971' into maint-0.4.0

2019-06-05 Thread nickm
commit 851e881f01355b0290e79100c09dbedd425f8946
Merge: a56d7e37a 9a97b5ff5
Author: Nick Mathewson 
Date:   Wed Jun 5 16:12:07 2019 -0400

Merge remote-tracking branch 'tor-github/pr/971' into maint-0.4.0

 .travis.yml | 1 +
 changes/ticket30234 | 2 ++
 2 files changed, 3 insertions(+)




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


[tor-commits] [tor/master] Merge remote-tracking branch 'tor-github/pr/741' into maint-0.4.0

2019-06-05 Thread nickm
commit 04cb2d4010f131c970d0cf3ba56c9d752b8facb9
Merge: 2300a619a 9b7cdd23d
Author: Nick Mathewson 
Date:   Wed Jun 5 16:14:51 2019 -0400

Merge remote-tracking branch 'tor-github/pr/741' into maint-0.4.0

 doc/tor.1.txt  | 13 +++--
 src/config/torrc.sample.in | 21 -
 2 files changed, 23 insertions(+), 11 deletions(-)




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


[tor-commits] [tor/maint-0.4.0] Move bandwidth-file-headers line to appear in the correct vote section

2019-06-05 Thread nickm
commit 0ab4dc7ef7c6468c1d0d87a7cbc834217214f16b
Author: Nick Mathewson 
Date:   Mon Apr 29 13:43:50 2019 -0400

Move bandwidth-file-headers line to appear in the correct vote section

Fixes bug 30316; bugfix on 0.3.5.1-alpha.
---
 changes/bug30316  | 4 
 src/feature/dirauth/dirvote.c | 7 +++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/changes/bug30316 b/changes/bug30316
new file mode 100644
index 0..3e396318a
--- /dev/null
+++ b/changes/bug30316
@@ -0,0 +1,4 @@
+  o Minor bugfixes (directory authority):
+- Move the "bandwidth-file-headers" line in directory authority votes
+  so that it conforms to dir-spec.txt. Fixes bug 30316; bugfix on
+  0.3.5.1-alpha.
diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c
index 5e426b0f8..af8b3dc20 100644
--- a/src/feature/dirauth/dirvote.c
+++ b/src/feature/dirauth/dirvote.c
@@ -322,10 +322,10 @@ format_networkstatus_vote(crypto_pk_t 
*private_signing_key,
  "known-flags %s\n"
  "flag-thresholds %s\n"
  "params %s\n"
+ "%s" /* bandwidth file headers */
  "dir-source %s %s %s %s %d %d\n"
  "contact %s\n"
  "%s" /* shared randomness information */
- "%s" /* bandwidth file headers */
  ,
  v3_ns->type == NS_TYPE_VOTE ? "vote" : "opinion",
  methods,
@@ -338,13 +338,12 @@ format_networkstatus_vote(crypto_pk_t 
*private_signing_key,
  flags,
  flag_thresholds,
  params,
+ bw_headers_line ? bw_headers_line : "",
  voter->nickname, fingerprint, voter->address,
  fmt_addr32(addr), voter->dir_port, voter->or_port,
  voter->contact,
  shared_random_vote_str ?
-   shared_random_vote_str : "",
- bw_headers_line ?
-   bw_headers_line : "");
+   shared_random_vote_str : "");
 
 tor_free(params);
 tor_free(flags);



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


[tor-commits] [tor/maint-0.4.0] Merge branch 'bug30316_035' into bug30316_040

2019-06-05 Thread nickm
commit 821dd54586bffd95bdd8c9d333b1f80ef55d3742
Merge: 593d29920 0ab4dc7ef
Author: Nick Mathewson 
Date:   Mon Apr 29 13:48:25 2019 -0400

Merge branch 'bug30316_035' into bug30316_040

Fixes conflicts and also moves bandwidth-file-digest.

 changes/bug30316  |  4 
 src/feature/dirauth/dirvote.c | 11 +--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --cc src/feature/dirauth/dirvote.c
index 29f5d0450,af8b3dc20..755b99bae
--- a/src/feature/dirauth/dirvote.c
+++ b/src/feature/dirauth/dirvote.c
@@@ -348,6 -322,7 +348,8 @@@ format_networkstatus_vote(crypto_pk_t *
   "known-flags %s\n"
   "flag-thresholds %s\n"
   "params %s\n"
+  "%s" /* bandwidth file headers */
++ "%s" /* bandwidth file digest */
   "dir-source %s %s %s %s %d %d\n"
   "contact %s\n"
   "%s" /* shared randomness information */
@@@ -365,6 -338,7 +365,8 @@@
   flags,
   flag_thresholds,
   params,
+  bw_headers_line ? bw_headers_line : "",
++ bw_file_digest ? bw_file_digest: "",
   voter->nickname, fingerprint, voter->address,
   fmt_addr32(addr), voter->dir_port, voter->or_port,
   voter->contact,



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


[tor-commits] [tor/maint-0.4.0] Merge remote-tracking branch 'tor-github/pr/988' into maint-0.4.0

2019-06-05 Thread nickm
commit 6a6f7eb6718f22da80596a35e7774b075a417e97
Merge: d63c17f2a 821dd5458
Author: Nick Mathewson 
Date:   Wed Jun 5 16:22:52 2019 -0400

Merge remote-tracking branch 'tor-github/pr/988' into maint-0.4.0

 changes/bug30316  |  4 
 src/feature/dirauth/dirvote.c | 11 +--
 2 files changed, 9 insertions(+), 6 deletions(-)

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


[tor-commits] [tor/maint-0.4.0] Travis: remove sudo configuration

2019-06-05 Thread nickm
commit 10c71105e6403025f380dee7c3d7e1ce40e8f2b6
Author: rl1987 
Date:   Wed Apr 24 13:29:23 2019 +0300

Travis: remove sudo configuration

See: 
https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
---
 .travis.yml | 22 +-
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index ab7db2a92..7f20875cf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,7 +39,7 @@ env:
 - RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true
 
 matrix:
-  ## include creates builds with gcc, linux, sudo: false
+  ## include creates builds with gcc, linux
   include:
 ## We include a single coverage build with the best options for coverage
 - env: COVERAGE_OPTIONS="--enable-coverage" HARDENING_OPTIONS=""
@@ -71,12 +71,6 @@ matrix:
   ## allow failures by env:
   ## 
https://docs.travis-ci.com/user/customizing-the-build#matching-jobs-with-allow_failures
   exclude:
-## Clang doesn't work in containerized builds, see below.
-- compiler: clang
-  sudo: false
-## Non-containerized gcc are slow and redundant.
-- compiler: gcc
-  sudo: required
 ## gcc on OSX is less useful, because the default compiler is clang.
 - compiler: gcc
   os: osx
@@ -92,20 +86,6 @@ matrix:
   ## TOR_RUST_DEPENDENCIES is spelt RUST_DEPENDENCIES in 0.3.2
   env: RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true 
HARDENING_OPTIONS=""
 
-## We don't need sudo. (The "apt:" stanza after this allows us to not need
-## sudo; otherwise, we would need it for getting dependencies.)
-##
-## But we use "sudo: required" to force non-containerized builds, working
-## around a Travis CI environment issue: clang LeakAnalyzer fails
-## because it requires ptrace and the containerized environment no
-## longer allows ptrace.
-## https://github.com/travis-ci/travis-ci/issues/9033
-##
-## In the matrix above, we exclude redundant combinations.
-sudo:
-  - false
-  - required
-
 ## (Linux only) Use the latest Linux image (Ubuntu Trusty)
 dist: trusty
 



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


[tor-commits] [tor/maint-0.4.0] Add changes file

2019-06-05 Thread nickm
commit b05b165a75a9d9e912da64788fc873fb215f5d75
Author: rl1987 
Date:   Sun Apr 21 21:06:57 2019 +0300

Add changes file
---
 changes/ticket30213 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/changes/ticket30213 b/changes/ticket30213
new file mode 100644
index 0..acb761480
--- /dev/null
+++ b/changes/ticket30213
@@ -0,0 +1,3 @@
+  o Minor features (continuous integration):
+- Remove sudo configuration lines from .travis.yml as they are no longer
+  needed with current Travis build environment. Resolves issue 30213.



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


[tor-commits] [tor/maint-0.4.0] Merge remote-tracking branch 'tor-github/pr/989' into maint-0.4.0

2019-06-05 Thread nickm
commit d63c17f2afb810f5db896b10909fe9ff2bfe7cf9
Merge: e51b57ee0 b05b165a7
Author: Nick Mathewson 
Date:   Wed Jun 5 16:22:29 2019 -0400

Merge remote-tracking branch 'tor-github/pr/989' into maint-0.4.0

 .travis.yml | 22 +-
 changes/ticket30213 |  3 +++
 2 files changed, 4 insertions(+), 21 deletions(-)

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


[tor-commits] [tor/maint-0.4.0] Merge remote-tracking branch 'tor-github/pr/952' into maint-0.4.0

2019-06-05 Thread nickm
commit e51b57ee047420b929c7d58de70df6ea5ca77565
Merge: 04cb2d401 802ac8ad6
Author: Nick Mathewson 
Date:   Wed Jun 5 16:16:34 2019 -0400

Merge remote-tracking branch 'tor-github/pr/952' into maint-0.4.0

 changes/bug30189   |  4 
 src/lib/log/util_bug.c | 14 ++
 src/lib/log/util_bug.h |  8 +---
 3 files changed, 23 insertions(+), 3 deletions(-)

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


[tor-commits] [tor/maint-0.4.0] Use a tor_abort_() wrapper in our util_bug.h macros

2019-06-05 Thread nickm
commit 802ac8ad618a0674c26bb973a2277e07b20f8c7b
Author: Nick Mathewson 
Date:   Mon Apr 15 14:16:23 2019 -0400

Use a tor_abort_() wrapper in our util_bug.h macros

Previously, our use of abort() would break anywhere that we didn't
include stdlib.h.  This was especially troublesome in case where
tor_assert_nonfatal() was used with ALL_BUGS_ARE_FATAL, since that
one seldom gets tested.

As an alternative, we could have just made this header include
stdlib.h.  But that seems bloaty.

Fixes bug 30189; bugfix on 0.3.4.1-alpha.
---
 changes/bug30189   |  4 
 src/lib/log/util_bug.c | 14 ++
 src/lib/log/util_bug.h |  8 +---
 3 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/changes/bug30189 b/changes/bug30189
new file mode 100644
index 0..f8c932a5f
--- /dev/null
+++ b/changes/bug30189
@@ -0,0 +1,4 @@
+  o Minor bugfixes (compilation, unusual configuration):
+- Avoid failures when building with ALL_BUGS_ARE_FAILED due to
+  missing declarations of abort(), and prevent other such failures
+  in the future. Fixes bug 30189; bugfix on 0.3.4.1-alpha.
diff --git a/src/lib/log/util_bug.c b/src/lib/log/util_bug.c
index f42d2d2ab..c65a91ae9 100644
--- a/src/lib/log/util_bug.c
+++ b/src/lib/log/util_bug.c
@@ -19,6 +19,7 @@
 #include "lib/string/printf.h"
 
 #include 
+#include 
 
 #ifdef TOR_UNIT_TESTS
 static void (*failed_assertion_cb)(void) = NULL;
@@ -120,6 +121,19 @@ tor_bug_occurred_(const char *fname, unsigned int line,
 #endif
 }
 
+/**
+ * Call the abort() function to kill the current process with a fatal
+ * error.
+ *
+ * (This is a separate function so that we declare it in util_bug.h without
+ * including stdlib in all the users of util_bug.h)
+ **/
+void
+tor_abort_(void)
+{
+  abort();
+}
+
 #ifdef _WIN32
 /** Take a filename and return a pointer to its final element.  This
  * function is called on __FILE__ to fix a MSVC nit where __FILE__
diff --git a/src/lib/log/util_bug.h b/src/lib/log/util_bug.h
index 18d40bbf3..2a4d68127 100644
--- a/src/lib/log/util_bug.h
+++ b/src/lib/log/util_bug.h
@@ -99,7 +99,7 @@
   if (ASSERT_PREDICT_LIKELY_(expr)) {   \
   } else {  \
 tor_assertion_failed_(SHORT_FILE__, __LINE__, __func__, #expr); \
-abort();\
+tor_abort_();   \
   } STMT_END
 #endif /* defined(TOR_UNIT_TESTS) && defined(DISABLE_ASSERTS_IN_UNIT_TESTS) */
 
@@ -107,7 +107,7 @@
   STMT_BEGIN {  \
 tor_assertion_failed_(SHORT_FILE__, __LINE__, __func__, \
   "line should be unreached");  \
-abort();\
+tor_abort_();   \
   } STMT_END
 
 /* Non-fatal bug assertions. The "unreached" variants mean "this line should
@@ -141,7 +141,7 @@
 #define BUG(cond)   \
   (ASSERT_PREDICT_UNLIKELY_(cond) ? \
(tor_assertion_failed_(SHORT_FILE__,__LINE__,__func__,"!("#cond")"), \
-abort(), 1) \
+tor_abort_(), 1)\
: 0)
 #elif defined(TOR_UNIT_TESTS) && defined(DISABLE_ASSERTS_IN_UNIT_TESTS)
 #define tor_assert_nonfatal_unreached() STMT_NIL
@@ -226,6 +226,8 @@ void tor_bug_occurred_(const char *fname, unsigned int line,
const char *func, const char *expr,
int once);
 
+void tor_abort_(void) ATTR_NORETURN;
+
 #ifdef _WIN32
 #define SHORT_FILE__ (tor_fix_source_file(__FILE__))
 const char *tor_fix_source_file(const char *fname);



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


[tor-commits] [tor/maint-0.4.0] Merge remote-tracking branch 'tor-github/pr/971' into maint-0.4.0

2019-06-05 Thread nickm
commit 851e881f01355b0290e79100c09dbedd425f8946
Merge: a56d7e37a 9a97b5ff5
Author: Nick Mathewson 
Date:   Wed Jun 5 16:12:07 2019 -0400

Merge remote-tracking branch 'tor-github/pr/971' into maint-0.4.0

 .travis.yml | 1 +
 changes/ticket30234 | 2 ++
 2 files changed, 3 insertions(+)




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


[tor-commits] [tor/maint-0.4.0] Merge remote-tracking branch 'tor-github/pr/741' into maint-0.4.0

2019-06-05 Thread nickm
commit 04cb2d4010f131c970d0cf3ba56c9d752b8facb9
Merge: 2300a619a 9b7cdd23d
Author: Nick Mathewson 
Date:   Wed Jun 5 16:14:51 2019 -0400

Merge remote-tracking branch 'tor-github/pr/741' into maint-0.4.0

 doc/tor.1.txt  | 13 +++--
 src/config/torrc.sample.in | 21 -
 2 files changed, 23 insertions(+), 11 deletions(-)

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


[tor-commits] [tor/maint-0.4.0] doc: update the man page and sample torrc for ExitRelay

2019-06-05 Thread nickm
commit 9b7cdd23deb5830cce794ce6e901b82fa094dd9f
Author: teor 
Date:   Thu Feb 28 11:22:20 2019 +1000

doc: update the man page and sample torrc for ExitRelay

We changed the default of ExitRelay in #21530 in 0.3.5.1-alpha, but
forgot to update the documentation.

Closes 29612.
---
 doc/tor.1.txt  | 13 +++--
 src/config/torrc.sample.in | 21 -
 2 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/doc/tor.1.txt b/doc/tor.1.txt
index 573fdf221..60997ad16 100644
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@ -1849,15 +1849,16 @@ is non-zero):
 [[ExitRelay]] **ExitRelay** **0**|**1**|**auto**::
 Tells Tor whether to run as an exit relay.  If Tor is running as a
 non-bridge server, and ExitRelay is set to 1, then Tor allows traffic to
-exit according to the ExitPolicy option (or the default ExitPolicy if
-none is specified). +
+exit according to the ExitPolicy option, the ReducedExitPolicy option,
+or the default ExitPolicy (if no other exit policy option is specified). +
  +
 If ExitRelay is set to 0, no traffic is allowed to
-exit, and the ExitPolicy option is ignored. +
+exit, and the ExitPolicy and ReducedExitPolicy options are ignored. +
  +
-If ExitRelay is set to "auto", then Tor behaves as if it were set to 1, but
-warns the user if this would cause traffic to exit.  In a future version,
-the default value will be 0. (Default: auto)
+If ExitRelay is set to "auto", then Tor checks the ExitPolicy and
+ReducedExitPolicy options. If either is set, Tor behaves as if ExitRelay
+were set to 1. If neither exit policy option is set, Tor behaves as if
+ExitRelay were set to 0. (Default: auto)
 
 [[ExitPolicy]] **ExitPolicy** __policy__,__policy__,__...__::
 Set an exit policy for this server. Each policy is of the form
diff --git a/src/config/torrc.sample.in b/src/config/torrc.sample.in
index 8d56b0896..c2ae707e9 100644
--- a/src/config/torrc.sample.in
+++ b/src/config/torrc.sample.in
@@ -1,5 +1,5 @@
 ## Configuration file for a typical Tor user
-## Last updated 22 December 2017 for Tor 0.3.2.8-rc.
+## Last updated 28 February 2019 for Tor 0.3.5.1-alpha.
 ## (may or may not work for much older or much newer versions of Tor.)
 ##
 ## Lines that begin with "## " try to explain what's going on. Lines
@@ -172,14 +172,25 @@
 ## Note: do not use MyFamily on bridge relays.
 #MyFamily $keyid,$keyid,...
 
-## Uncomment this if you do *not* want your relay to allow any exit traffic.
-## (Relays allow exit traffic by default.)
-#ExitRelay 0
+## Uncomment this if you want your relay to be an exit, with the default
+## exit policy (or whatever exit policy you set below).
+## (If ReducedExitPolicy or ExitPolicy are set, relays are exits.
+## If neither exit policy option is set, relays are non-exits.)
+#ExitRelay 1
 
 ## Uncomment this if you want your relay to allow IPv6 exit traffic.
-## (Relays only allow IPv4 exit traffic by default.)
+## You must also set ExitRelay, ReducedExitPolicy, or ExitPolicy to make your
+## relay into an exit.
+## (Relays do not allow any exit traffic by default.)
 #IPv6Exit 1
 
+## Uncomment this if you want your relay to be an exit, with a reduced set
+## of exit ports.
+#ReducedExitPolicy 1
+
+## Uncomment these lines if you want your relay to be an exit, with the
+## specified set of exit IPs and ports.
+##
 ## A comma-separated list of exit policies. They're considered first
 ## to last, and the first match wins.
 ##



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


[tor-commits] [tor/maint-0.4.0] hs: Define INTRODUCE_ACK status code in trunnel

2019-06-05 Thread nickm
commit 590d97bc1065bdb93c70695c91de9c548ef802af
Author: David Goulet 
Date:   Thu May 9 12:55:52 2019 -0400

hs: Define INTRODUCE_ACK status code in trunnel

Remove the hs_intro_ack_status_t enum and move the value into trunnel. Only
use these values from now on in the intro point code.

Interestingly enough, the client side also re-define these values in 
hs_cell.h
with the hs_cell_introd_ack_status_t enum. Next commit will fix that and 
force
to use the trunnel ABI.

Part of #30454

Signed-off-by: David Goulet 
---
 src/or/hs_intropoint.c | 16 
 src/or/hs_intropoint.h |  7 ---
 src/trunnel/hs/cell_introduce1.c   | 13 +++--
 src/trunnel/hs/cell_introduce1.h   |  3 +++
 src/trunnel/hs/cell_introduce1.trunnel |  9 -
 5 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/src/or/hs_intropoint.c b/src/or/hs_intropoint.c
index e0ab27bd3..472e4afe9 100644
--- a/src/or/hs_intropoint.c
+++ b/src/or/hs_intropoint.c
@@ -336,7 +336,7 @@ hs_intro_received_establish_intro(or_circuit_t *circ, const 
uint8_t *request,
  * Return 0 on success else a negative value on error which will close the
  * circuit. */
 static int
-send_introduce_ack_cell(or_circuit_t *circ, hs_intro_ack_status_t status)
+send_introduce_ack_cell(or_circuit_t *circ, uint16_t status)
 {
   int ret = -1;
   uint8_t *encoded_cell = NULL;
@@ -433,7 +433,7 @@ handle_introduce1(or_circuit_t *client_circ, const uint8_t 
*request,
   int ret = -1;
   or_circuit_t *service_circ;
   trn_cell_introduce1_t *parsed_cell;
-  hs_intro_ack_status_t status = HS_INTRO_ACK_STATUS_SUCCESS;
+  uint16_t status = TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS;
 
   tor_assert(client_circ);
   tor_assert(request);
@@ -448,14 +448,14 @@ handle_introduce1(or_circuit_t *client_circ, const 
uint8_t *request,
"Rejecting %s INTRODUCE1 cell. Responding with NACK.",
cell_size == -1 ? "invalid" : "truncated");
 /* Inform client that the INTRODUCE1 has a bad format. */
-status = HS_INTRO_ACK_STATUS_BAD_FORMAT;
+status = TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT;
 goto send_ack;
   }
 
   /* Once parsed validate the cell format. */
   if (validate_introduce1_parsed_cell(parsed_cell) < 0) {
 /* Inform client that the INTRODUCE1 has bad format. */
-status = HS_INTRO_ACK_STATUS_BAD_FORMAT;
+status = TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT;
 goto send_ack;
   }
 
@@ -472,7 +472,7 @@ handle_introduce1(or_circuit_t *client_circ, const uint8_t 
*request,
 "Responding with NACK.",
safe_str(b64_key), client_circ->p_circ_id);
   /* Inform the client that we don't know the requested service ID. */
-  status = HS_INTRO_ACK_STATUS_UNKNOWN_ID;
+  status = TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID;
   goto send_ack;
 }
   }
@@ -485,12 +485,12 @@ handle_introduce1(or_circuit_t *client_circ, const 
uint8_t *request,
 log_warn(LD_PROTOCOL, "Unable to send INTRODUCE2 cell to the service.");
 /* Inform the client that we can't relay the cell. Use the unknown ID
  * status code since it means that we do not know the service. */
-status = HS_INTRO_ACK_STATUS_UNKNOWN_ID;
+status = TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID;
 goto send_ack;
   }
 
   /* Success! Send an INTRODUCE_ACK success status onto the client circuit. */
-  status = HS_INTRO_ACK_STATUS_SUCCESS;
+  status = TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS;
   ret = 0;
 
  send_ack:
@@ -501,7 +501,7 @@ handle_introduce1(or_circuit_t *client_circ, const uint8_t 
*request,
 /* Circuit has been closed on failure of transmission. */
 goto done;
   }
-  if (status != HS_INTRO_ACK_STATUS_SUCCESS) {
+  if (status != TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS) {
 /* We just sent a NACK that is a non success status code so close the
  * circuit because it's not useful to keep it open. Remember, a client can
  * only send one INTRODUCE1 cell on a circuit. */
diff --git a/src/or/hs_intropoint.h b/src/or/hs_intropoint.h
index 014f9339a..1c2cc564a 100644
--- a/src/or/hs_intropoint.h
+++ b/src/or/hs_intropoint.h
@@ -19,13 +19,6 @@ typedef enum {
   HS_INTRO_AUTH_KEY_TYPE_ED25519 = 0x02,
 } hs_intro_auth_key_type_t;
 
-/* INTRODUCE_ACK status code. */
-typedef enum {
-  HS_INTRO_ACK_STATUS_SUCCESS= 0x,
-  HS_INTRO_ACK_STATUS_UNKNOWN_ID = 0x0001,
-  HS_INTRO_ACK_STATUS_BAD_FORMAT = 0x0002,
-} hs_intro_ack_status_t;
-
 /* Object containing introduction point common data between the service and
  * the client side. */
 typedef struct hs_intropoint_t {
diff --git a/src/trunnel/hs/cell_introduce1.c b/src/trunnel/hs/cell_introduce1.c
index 358b355cd..b93add64c 100644
--- a/src/trunnel/hs/cell_introduce1.c
+++ b/src/trunnel/hs/cell_introduce1.c
@@ -519,6 +519,7 @@ trn_cell_introduce_ack_new(void)
   trn_cell_introduce_ack_t *val = trunnel_calloc(1, 
sizeof(trn_cell_introduce_ack_t));
   if (NULL == 

[tor-commits] [tor/maint-0.4.0] trunnel: Remove INTRODUCE1 status code IN statement

2019-06-05 Thread nickm
commit 7d3e904a27ac714c33f9b1e14b4d1d18d4042147
Author: David Goulet 
Date:   Wed May 15 15:27:27 2019 -0400

trunnel: Remove INTRODUCE1 status code IN statement

We want to support parsing a cell with unknown status code so we are forward
compatible.

Part of #30454

Signed-off-by: David Goulet 
---
 src/trunnel/hs/cell_introduce1.c   | 18 +++---
 src/trunnel/hs/cell_introduce1.trunnel |  4 +---
 2 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/src/trunnel/hs/cell_introduce1.c b/src/trunnel/hs/cell_introduce1.c
index 1fdb95453..cebfa2867 100644
--- a/src/trunnel/hs/cell_introduce1.c
+++ b/src/trunnel/hs/cell_introduce1.c
@@ -520,7 +520,6 @@ trn_cell_introduce_ack_new(void)
   trn_cell_introduce_ack_t *val = trunnel_calloc(1, 
sizeof(trn_cell_introduce_ack_t));
   if (NULL == val)
 return NULL;
-  val->status = TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT;
   return val;
 }
 
@@ -552,10 +551,6 @@ trn_cell_introduce_ack_get_status(const 
trn_cell_introduce_ack_t *inp)
 int
 trn_cell_introduce_ack_set_status(trn_cell_introduce_ack_t *inp, uint16_t val)
 {
-  if (! ((val == TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT || val == 
TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS || val == 
TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID))) {
- TRUNNEL_SET_ERROR_CODE(inp);
- return -1;
-  }
   inp->status = val;
   return 0;
 }
@@ -589,8 +584,6 @@ trn_cell_introduce_ack_check(const trn_cell_introduce_ack_t 
*obj)
 return "Object was NULL";
   if (obj->trunnel_error_code_)
 return "A set function failed on this object";
-  if (! (obj->status == TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT || obj->status 
== TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS || obj->status == 
TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID))
-return "Integer out of bounds";
   {
 const char *msg;
 if (NULL != (msg = trn_cell_extension_check(obj->extensions)))
@@ -608,7 +601,7 @@ trn_cell_introduce_ack_encoded_len(const 
trn_cell_introduce_ack_t *obj)
  return -1;
 
 
-  /* Length of u16 status IN [TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT, 
TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS, TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID] */
+  /* Length of u16 status */
   result += 2;
 
   /* Length of struct trn_cell_extension extensions */
@@ -640,7 +633,7 @@ trn_cell_introduce_ack_encode(uint8_t *output, const size_t 
avail, const trn_cel
   trunnel_assert(encoded_len >= 0);
 #endif
 
-  /* Encode u16 status IN [TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT, 
TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS, TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID] */
+  /* Encode u16 status */
   trunnel_assert(written <= avail);
   if (avail - written < 2)
 goto truncated;
@@ -689,12 +682,10 @@ 
trn_cell_introduce_ack_parse_into(trn_cell_introduce_ack_t *obj, const uint8_t *
   ssize_t result = 0;
   (void)result;
 
-  /* Parse u16 status IN [TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT, 
TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS, TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID] */
+  /* Parse u16 status */
   CHECK_REMAINING(2, truncated);
   obj->status = trunnel_ntohs(trunnel_get_uint16(ptr));
   remaining -= 2; ptr += 2;
-  if (! (obj->status == TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT || obj->status 
== TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS || obj->status == 
TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID))
-goto fail;
 
   /* Parse struct trn_cell_extension extensions */
   result = trn_cell_extension_parse(>extensions, ptr, remaining);
@@ -710,9 +701,6 @@ trn_cell_introduce_ack_parse_into(trn_cell_introduce_ack_t 
*obj, const uint8_t *
  relay_fail:
   trunnel_assert(result < 0);
   return result;
- fail:
-  result = -1;
-  return result;
 }
 
 ssize_t
diff --git a/src/trunnel/hs/cell_introduce1.trunnel 
b/src/trunnel/hs/cell_introduce1.trunnel
index 69da2c113..bbb091d2b 100644
--- a/src/trunnel/hs/cell_introduce1.trunnel
+++ b/src/trunnel/hs/cell_introduce1.trunnel
@@ -44,9 +44,7 @@ struct trn_cell_introduce1 {
 /* INTRODUCE_ACK payload. See details in section 3.2.2. */
 struct trn_cell_introduce_ack {
   /* Status of introduction. */
-  u16 status IN [TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS,
- TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID,
- TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT];
+  u16 status;
 
   /* Extension(s). Reserved fields. */
   struct trn_cell_extension extensions;



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


[tor-commits] [tor/maint-0.4.0] Make --list-modules imply --hush

2019-06-05 Thread nickm
commit 0c451b31d2694c96ec20145e3b0e9b22cd54819d
Author: Nick Mathewson 
Date:   Tue May 14 19:55:35 2019 -0400

Make --list-modules imply --hush
---
 src/app/main/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/app/main/main.c b/src/app/main/main.c
index c45c87d8d..67f2181cd 100644
--- a/src/app/main/main.c
+++ b/src/app/main/main.c
@@ -577,6 +577,7 @@ tor_init(int argc, char *argv[])
   if (!strcmp(cl->key, "--version") || !strcmp(cl->key, "--digests") ||
   !strcmp(cl->key, "--list-torrc-options") ||
   !strcmp(cl->key, "--library-versions") ||
+  !strcmp(cl->key, "--list-modules") ||
   !strcmp(cl->key, "--hash-password") ||
   !strcmp(cl->key, "-h") || !strcmp(cl->key, "--help")) {
 if (quiet < 1)



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


[tor-commits] [tor/maint-0.4.0] Travis: Show stem's tor log after failure

2019-06-05 Thread nickm
commit 9a97b5ff56fc6f29d93ee515eb7244fe4db34c66
Author: teor 
Date:   Mon Apr 22 11:48:07 2019 +1000

Travis: Show stem's tor log after failure

Closes ticket 30234.
---
 .travis.yml | 1 +
 changes/ticket30234 | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 89040d822..1b04fa48f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -225,6 +225,7 @@ after_failure:
   ## `make distcheck` puts it somewhere different.
   - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog || echo "make 
failed"; fi
   - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-core || echo "make 
failed"; fi
+  - if [[ "$TEST_STEM" != "" ]]; then cat "$STEM_SOURCE_DIR"/test/data/tor_log 
|| echo "cat failed"; fi
 
 before_cache:
   ## Delete all gcov files.
diff --git a/changes/ticket30234 b/changes/ticket30234
new file mode 100644
index 0..5a0076bad
--- /dev/null
+++ b/changes/ticket30234
@@ -0,0 +1,2 @@
+  o Testing (continuous integration):
+- In Travis, show stem's tor log after failure. Closes ticket 30234.



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


[tor-commits] [tor/maint-0.4.0] Merge remote-tracking branch 'tor-github/pr/1020' into maint-0.4.0

2019-06-05 Thread nickm
commit a56d7e37aa8f52397f9fd762d07b85f3360afd2a
Merge: 00108b75d 0c451b31d
Author: Nick Mathewson 
Date:   Wed Jun 5 16:10:51 2019 -0400

Merge remote-tracking branch 'tor-github/pr/1020' into maint-0.4.0

 changes/bug30452   |  3 +++
 doc/tor.1.txt  |  4 
 src/app/config/config.c| 13 +
 src/app/main/main.c|  1 +
 src/feature/dirauth/authmode.h |  4 
 5 files changed, 25 insertions(+)

diff --cc doc/tor.1.txt
index c2df7687f,f46929897..b9a48b680
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@@ -88,10 -88,12 +88,14 @@@ COMMAND-LINE OPTION
  List all valid options that are scheduled to become obsolete in a
  future version. (This is a warning, not a promise.)
  
+ [[opt-list-modules]] **--list-modules**::
+ For each optional module, list whether or not it has been compiled
+ into Tor.  (Any module not listed is not optional in this version of Tor.)
+ 
  [[opt-version]] **--version**::
 -Display Tor version and exit.
 +Display Tor version and exit. The output is a single line of the format
 +"Tor version [version number]."  (The version number format
 +is as specified in version-spec.txt.)
  
  [[opt-quiet]] **--quiet**|**--hush**::
  Override the default console log.  By default, Tor starts out logging



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


[tor-commits] [tor/maint-0.4.0] Merge remote-tracking branch 'tor-github/pr/1039' into maint-0.4.0

2019-06-05 Thread nickm
commit 2300a619a548ed529551c731dd706fea0b2a0a20
Merge: 851e881f0 245dccb77
Author: Nick Mathewson 
Date:   Wed Jun 5 16:13:53 2019 -0400

Merge remote-tracking branch 'tor-github/pr/1039' into maint-0.4.0

 changes/ticket30454| 10 
 src/feature/hs/hs_cell.c   | 16 +++--
 src/feature/hs/hs_cell.h   | 13 --
 src/feature/hs/hs_client.c | 18 +++---
 src/feature/hs/hs_intropoint.c | 27 +++--
 src/feature/hs/hs_intropoint.h | 15 
 src/test/test_hs_cell.c|  2 +-
 src/test/test_hs_intropoint.c  |  4 ++--
 src/trunnel/hs/cell_introduce1.c   | 44 +-
 src/trunnel/hs/cell_introduce1.h   |  7 ++
 src/trunnel/hs/cell_introduce1.trunnel | 21 +---
 11 files changed, 87 insertions(+), 90 deletions(-)

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


[tor-commits] [tor/maint-0.4.0] hs: Remove hs_intro_auth_key_type_t enum

2019-06-05 Thread nickm
commit 79cfe2ddd7c030e679104588c7e4842c2ff6b239
Author: David Goulet 
Date:   Thu May 9 13:09:44 2019 -0400

hs: Remove hs_intro_auth_key_type_t enum

Like the previous commit about the INTRODUCE_ACK status code, change all 
auth
key type to use the one defined in the trunnel file.

Standardize the use of these auth type to a common ABI.

Part of #30454

Signed-off-by: David Goulet 
---
 src/or/hs_cell.c   |  5 +++--
 src/or/hs_intropoint.c | 10 +-
 src/or/hs_intropoint.h |  7 ---
 src/test/test_hs_cell.c|  2 +-
 src/test/test_hs_intropoint.c  |  4 ++--
 src/trunnel/hs/cell_introduce1.c   | 13 +++--
 src/trunnel/hs/cell_introduce1.h   |  3 +++
 src/trunnel/hs/cell_introduce1.trunnel |  9 -
 8 files changed, 29 insertions(+), 24 deletions(-)

diff --git a/src/or/hs_cell.c b/src/or/hs_cell.c
index ba80653a7..7bbefe8fd 100644
--- a/src/or/hs_cell.c
+++ b/src/or/hs_cell.c
@@ -441,7 +441,8 @@ introduce1_set_auth_key(trn_cell_introduce1_t *cell,
   tor_assert(cell);
   tor_assert(data);
   /* There is only one possible type for a non legacy cell. */
-  trn_cell_introduce1_set_auth_key_type(cell, HS_INTRO_AUTH_KEY_TYPE_ED25519);
+  trn_cell_introduce1_set_auth_key_type(cell,
+   TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_ED25519);
   trn_cell_introduce1_set_auth_key_len(cell, ED25519_PUBKEY_LEN);
   trn_cell_introduce1_setlen_auth_key(cell, ED25519_PUBKEY_LEN);
   memcpy(trn_cell_introduce1_getarray_auth_key(cell),
@@ -514,7 +515,7 @@ hs_cell_build_establish_intro(const char *circ_nonce,
 
   /* Set AUTH_KEY_TYPE: 2 means ed25519 */
   trn_cell_establish_intro_set_auth_key_type(cell,
- HS_INTRO_AUTH_KEY_TYPE_ED25519);
+TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_ED25519);
 
   /* Set AUTH_KEY and AUTH_KEY_LEN field. Must also set byte-length of
* AUTH_KEY to match */
diff --git a/src/or/hs_intropoint.c b/src/or/hs_intropoint.c
index 472e4afe9..a12a3210c 100644
--- a/src/or/hs_intropoint.c
+++ b/src/or/hs_intropoint.c
@@ -75,7 +75,7 @@ verify_establish_intro_cell(const trn_cell_establish_intro_t 
*cell,
   /* We only reach this function if the first byte of the cell is 0x02 which
* means that auth_key_type is of ed25519 type, hence this check should
* always pass. See hs_intro_received_establish_intro().  */
-  if (BUG(cell->auth_key_type != HS_INTRO_AUTH_KEY_TYPE_ED25519)) {
+  if (BUG(cell->auth_key_type != TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_ED25519)) {
 return -1;
   }
 
@@ -315,10 +315,10 @@ hs_intro_received_establish_intro(or_circuit_t *circ, 
const uint8_t *request,
* ESTABLISH_INTRO and pass it to the appropriate cell handler */
   const uint8_t first_byte = request[0];
   switch (first_byte) {
-case HS_INTRO_AUTH_KEY_TYPE_LEGACY0:
-case HS_INTRO_AUTH_KEY_TYPE_LEGACY1:
+case TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_LEGACY0:
+case TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_LEGACY1:
   return rend_mid_establish_intro_legacy(circ, request, request_len);
-case HS_INTRO_AUTH_KEY_TYPE_ED25519:
+case TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_ED25519:
   return handle_establish_intro(circ, request, request_len);
 default:
   log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
@@ -396,7 +396,7 @@ validate_introduce1_parsed_cell(const trn_cell_introduce1_t 
*cell)
   /* The auth key of an INTRODUCE1 should be of type ed25519 thus leading to a
* known fixed length as well. */
   if (trn_cell_introduce1_get_auth_key_type(cell) !=
-  HS_INTRO_AUTH_KEY_TYPE_ED25519) {
+  TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_ED25519) {
 log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
"Rejecting invalid INTRODUCE1 cell auth key type. "
"Responding with NACK.");
diff --git a/src/or/hs_intropoint.h b/src/or/hs_intropoint.h
index 1c2cc564a..1891bffac 100644
--- a/src/or/hs_intropoint.h
+++ b/src/or/hs_intropoint.h
@@ -12,13 +12,6 @@
 #include "crypto_curve25519.h"
 #include "torcert.h"
 
-/* Authentication key type in an ESTABLISH_INTRO cell. */
-typedef enum {
-  HS_INTRO_AUTH_KEY_TYPE_LEGACY0 = 0x00,
-  HS_INTRO_AUTH_KEY_TYPE_LEGACY1 = 0x01,
-  HS_INTRO_AUTH_KEY_TYPE_ED25519 = 0x02,
-} hs_intro_auth_key_type_t;
-
 /* Object containing introduction point common data between the service and
  * the client side. */
 typedef struct hs_intropoint_t {
diff --git a/src/test/test_hs_cell.c b/src/test/test_hs_cell.c
index 8e15184c2..f754068a0 100644
--- a/src/test/test_hs_cell.c
+++ b/src/test/test_hs_cell.c
@@ -50,7 +50,7 @@ test_gen_establish_intro_cell(void *arg)
   /* Check the contents of the cell */
   {
 /* First byte is the auth key type: make sure its correct */
-tt_int_op(buf[0], OP_EQ, HS_INTRO_AUTH_KEY_TYPE_ED25519);
+tt_int_op(buf[0], OP_EQ, TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_ED25519);
 /* Next two bytes is auth key len */
 

[tor-commits] [tor/maint-0.4.0] Add a --list-modules command

2019-06-05 Thread nickm
commit 1b16fcb70cb9507184fe7316396c93c1daa12674
Author: Nick Mathewson 
Date:   Thu May 9 11:26:13 2019 -0400

Add a --list-modules command

Closes ticket 30452.
---
 changes/bug30452   |  3 +++
 doc/tor.1.txt  |  4 
 src/app/config/config.c| 13 +
 src/feature/dirauth/authmode.h |  4 
 4 files changed, 24 insertions(+)

diff --git a/changes/bug30452 b/changes/bug30452
new file mode 100644
index 0..2bb401d87
--- /dev/null
+++ b/changes/bug30452
@@ -0,0 +1,3 @@
+  o Minor features (compile-time modules):
+- Add a --list-modules command to print a list of which compile-time
+  modules are enabled. Closes ticket 30452.
diff --git a/doc/tor.1.txt b/doc/tor.1.txt
index 975a19818..f46929897 100644
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@ -88,6 +88,10 @@ COMMAND-LINE OPTIONS
 List all valid options that are scheduled to become obsolete in a
 future version. (This is a warning, not a promise.)
 
+[[opt-list-modules]] **--list-modules**::
+For each optional module, list whether or not it has been compiled
+into Tor.  (Any module not listed is not optional in this version of Tor.)
+
 [[opt-version]] **--version**::
 Display Tor version and exit.
 
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 2a504d306..7ccd76e7f 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -2474,6 +2474,7 @@ static const struct {
   { "--quiet",TAKES_NO_ARGUMENT },
   { "--hush", TAKES_NO_ARGUMENT },
   { "--version",  TAKES_NO_ARGUMENT },
+  { "--list-modules", TAKES_NO_ARGUMENT },
   { "--library-versions", TAKES_NO_ARGUMENT },
   { "-h", TAKES_NO_ARGUMENT },
   { "--help", TAKES_NO_ARGUMENT },
@@ -2695,6 +2696,13 @@ list_deprecated_options(void)
   }
 }
 
+/** Print all compile-time modules and their enabled/disabled status. */
+static void
+list_enabled_modules(void)
+{
+  printf("%s: %s\n", "dirauth", have_module_dirauth() ? "yes" : "no");
+}
+
 /** Last value actually set by resolve_my_address. */
 static uint32_t last_resolved_addr = 0;
 
@@ -5198,6 +5206,11 @@ options_init_from_torrc(int argc, char **argv)
 return 1;
   }
 
+  if (config_line_find(cmdline_only_options, "--list-modules")) {
+list_enabled_modules();
+return 1;
+  }
+
   if (config_line_find(cmdline_only_options, "--library-versions")) {
 printf("Tor version %s. \n", get_version());
 printf("Library versions\tCompiled\t\tRuntime\n");
diff --git a/src/feature/dirauth/authmode.h b/src/feature/dirauth/authmode.h
index 40a89c739..876a1f947 100644
--- a/src/feature/dirauth/authmode.h
+++ b/src/feature/dirauth/authmode.h
@@ -27,6 +27,8 @@ authdir_mode_v3(const or_options_t *options)
   return authdir_mode(options) && options->V3AuthoritativeDir != 0;
 }
 
+#define have_module_dirauth() (1)
+
 #else /* HAVE_MODULE_DIRAUTH */
 
 #define authdir_mode(options) (((void)(options)),0)
@@ -37,6 +39,8 @@ authdir_mode_v3(const or_options_t *options)
 #define authdir_mode_bridge(options) (((void)(options)),0)
 #define authdir_mode_v3(options) (((void)(options)),0)
 
+#define have_module_dirauth() (0)
+
 #endif /* HAVE_MODULE_DIRAUTH */
 
 #endif /* TOR_MODE_H */



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


[tor-commits] [tor/maint-0.4.0] hs: Remove hs_cell_onion_key_type_t enum

2019-06-05 Thread nickm
commit 56908c6f1c63d32bef7011c811976e24156f17d3
Author: David Goulet 
Date:   Wed May 15 15:30:29 2019 -0400

hs: Remove hs_cell_onion_key_type_t enum

Unify this with the trunnel ABI so we don't duplicate.

Part of #30454

Signed-off-by: David Goulet 
---
 src/or/hs_cell.c   |  7 ---
 src/or/hs_cell.h   |  5 -
 src/trunnel/hs/cell_introduce1.c   | 14 +++---
 src/trunnel/hs/cell_introduce1.h   |  1 +
 src/trunnel/hs/cell_introduce1.trunnel |  5 -
 5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/or/hs_cell.c b/src/or/hs_cell.c
index 7bbefe8fd..7b7e9379c 100644
--- a/src/or/hs_cell.c
+++ b/src/or/hs_cell.c
@@ -160,11 +160,12 @@ parse_introduce2_encrypted(const uint8_t *decrypted_data,
   }
 
   if (trn_cell_introduce_encrypted_get_onion_key_type(enc_cell) !=
-  HS_CELL_ONION_KEY_TYPE_NTOR) {
+  TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR) {
 log_info(LD_REND, "INTRODUCE2 onion key type is invalid. Got %u but "
   "expected %u on circuit %u for service %s",
  trn_cell_introduce_encrypted_get_onion_key_type(enc_cell),
- HS_CELL_ONION_KEY_TYPE_NTOR, TO_CIRCUIT(circ)->n_circ_id,
+ TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR,
+ TO_CIRCUIT(circ)->n_circ_id,
  safe_str_client(service->onion_address));
 goto err;
   }
@@ -257,7 +258,7 @@ 
introduce1_set_encrypted_onion_key(trn_cell_introduce_encrypted_t *cell,
   tor_assert(onion_pk);
   /* There is only one possible key type for a non legacy cell. */
   trn_cell_introduce_encrypted_set_onion_key_type(cell,
-  HS_CELL_ONION_KEY_TYPE_NTOR);
+   TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR);
   trn_cell_introduce_encrypted_set_onion_key_len(cell, CURVE25519_PUBKEY_LEN);
   trn_cell_introduce_encrypted_setlen_onion_key(cell, CURVE25519_PUBKEY_LEN);
   memcpy(trn_cell_introduce_encrypted_getarray_onion_key(cell), onion_pk,
diff --git a/src/or/hs_cell.h b/src/or/hs_cell.h
index ed4af3c5a..49b29a43b 100644
--- a/src/or/hs_cell.h
+++ b/src/or/hs_cell.h
@@ -16,11 +16,6 @@
  * 3.2.2 of the specification). Below this value, the cell must be padded. */
 #define HS_CELL_INTRODUCE1_MIN_SIZE 246
 
-/* Onion key type found in the INTRODUCE1 cell. */
-typedef enum {
-  HS_CELL_ONION_KEY_TYPE_NTOR = 1,
-} hs_cell_onion_key_type_t;
-
 /* This data structure contains data that we need to build an INTRODUCE1 cell
  * used by the INTRODUCE1 build function. */
 typedef struct hs_cell_introduce1_data_t {
diff --git a/src/trunnel/hs/cell_introduce1.c b/src/trunnel/hs/cell_introduce1.c
index cebfa2867..53b3d299f 100644
--- a/src/trunnel/hs/cell_introduce1.c
+++ b/src/trunnel/hs/cell_introduce1.c
@@ -723,7 +723,7 @@ trn_cell_introduce_encrypted_new(void)
   trn_cell_introduce_encrypted_t *val = trunnel_calloc(1, 
sizeof(trn_cell_introduce_encrypted_t));
   if (NULL == val)
 return NULL;
-  val->onion_key_type = 1;
+  val->onion_key_type = TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR;
   return val;
 }
 
@@ -827,7 +827,7 @@ trn_cell_introduce_encrypted_get_onion_key_type(const 
trn_cell_introduce_encrypt
 int
 trn_cell_introduce_encrypted_set_onion_key_type(trn_cell_introduce_encrypted_t 
*inp, uint8_t val)
 {
-  if (! ((val == 1))) {
+  if (! ((val == TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR))) {
  TRUNNEL_SET_ERROR_CODE(inp);
  return -1;
   }
@@ -1069,7 +1069,7 @@ trn_cell_introduce_encrypted_check(const 
trn_cell_introduce_encrypted_t *obj)
 if (NULL != (msg = trn_cell_extension_check(obj->extensions)))
   return msg;
   }
-  if (! (obj->onion_key_type == 1))
+  if (! (obj->onion_key_type == TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR))
 return "Integer out of bounds";
   if (TRUNNEL_DYNARRAY_LEN(>onion_key) != obj->onion_key_len)
 return "Length mismatch for onion_key";
@@ -1102,7 +1102,7 @@ trn_cell_introduce_encrypted_encoded_len(const 
trn_cell_introduce_encrypted_t *o
   /* Length of struct trn_cell_extension extensions */
   result += trn_cell_extension_encoded_len(obj->extensions);
 
-  /* Length of u8 onion_key_type IN [1] */
+  /* Length of u8 onion_key_type IN [TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR] */
   result += 1;
 
   /* Length of u16 onion_key_len */
@@ -1166,7 +1166,7 @@ trn_cell_introduce_encrypted_encode(uint8_t *output, 
const size_t avail, const t
 goto fail; /* XXX !*/
   written += result; ptr += result;
 
-  /* Encode u8 onion_key_type IN [1] */
+  /* Encode u8 onion_key_type IN [TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR] */
   trunnel_assert(written <= avail);
   if (avail - written < 1)
 goto truncated;
@@ -1270,11 +1270,11 @@ 
trn_cell_introduce_encrypted_parse_into(trn_cell_introduce_encrypted_t *obj, con
   trunnel_assert((size_t)result <= remaining);
   remaining -= result; ptr += result;
 
-  /* Parse u8 onion_key_type IN [1] */
+  /* Parse u8 onion_key_type IN 

[tor-commits] [tor/maint-0.4.0] hs: Get rid of duplicate hs_cell_introd_ack_status_t

2019-06-05 Thread nickm
commit dcc1d8d15bf11ca1c4e2760bbc47d5fa3df3814d
Author: David Goulet 
Date:   Thu May 9 13:01:15 2019 -0400

hs: Get rid of duplicate hs_cell_introd_ack_status_t

This enum was the exact same as hs_intro_ack_status_t that was removed at 
the
previous commit. It was used client side when parsing the INTRODUCE_ACK 
cell.

Now, the entire code dealing with the INTRODUCE_ACK cell (both sending and
receiving) have been modified to all use the same ABI defined in the trunnel
introduce1 file.

Finally, the client will default to the normal behavior when receiving an
unknown NACK status code which is to note down that we've failed and 
re-extend
to the next intro point. This way, unknown status code won't trigger a
different behavior client side.

Part of #30454.

Signed-off-by: David Goulet 
---
 src/or/hs_cell.c   |  4 ++--
 src/or/hs_cell.h   |  8 
 src/or/hs_client.c | 18 +-
 3 files changed, 11 insertions(+), 19 deletions(-)

diff --git a/src/or/hs_cell.c b/src/or/hs_cell.c
index 03273a44f..ba80653a7 100644
--- a/src/or/hs_cell.c
+++ b/src/or/hs_cell.c
@@ -881,9 +881,9 @@ hs_cell_parse_introduce_ack(const uint8_t *payload, size_t 
payload_len)
* do a special case. */
   if (payload_len <= 1) {
 if (payload_len == 0) {
-  ret = HS_CELL_INTRO_ACK_SUCCESS;
+  ret = TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS;
 } else {
-  ret = HS_CELL_INTRO_ACK_FAILURE;
+  ret = TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID;
 }
 goto end;
   }
diff --git a/src/or/hs_cell.h b/src/or/hs_cell.h
index 958dde4ff..ed4af3c5a 100644
--- a/src/or/hs_cell.h
+++ b/src/or/hs_cell.h
@@ -16,14 +16,6 @@
  * 3.2.2 of the specification). Below this value, the cell must be padded. */
 #define HS_CELL_INTRODUCE1_MIN_SIZE 246
 
-/* Status code of an INTRODUCE_ACK cell. */
-typedef enum {
-  HS_CELL_INTRO_ACK_SUCCESS = 0x, /* Cell relayed to service. */
-  HS_CELL_INTRO_ACK_FAILURE = 0x0001, /* Service ID not recognized */
-  HS_CELL_INTRO_ACK_BADFMT  = 0x0002, /* Bad message format */
-  HS_CELL_INTRO_ACK_NORELAY = 0x0003, /* Can't relay cell to service */
-} hs_cell_introd_ack_status_t;
-
 /* Onion key type found in the INTRODUCE1 cell. */
 typedef enum {
   HS_CELL_ONION_KEY_TYPE_NTOR = 1,
diff --git a/src/or/hs_client.c b/src/or/hs_client.c
index 8ecefc120..7d44952e4 100644
--- a/src/or/hs_client.c
+++ b/src/or/hs_client.c
@@ -35,6 +35,8 @@
 #include "router.h"
 #include "routerset.h"
 
+#include "trunnel/hs/cell_introduce1.h"
+
 /* Return a human-readable string for the client fetch status code. */
 static const char *
 fetch_status_to_string(hs_client_fetch_status_t status)
@@ -1018,23 +1020,21 @@ handle_introduce_ack(origin_circuit_t *circ, const 
uint8_t *payload,
 
   status = hs_cell_parse_introduce_ack(payload, payload_len);
   switch (status) {
-  case HS_CELL_INTRO_ACK_SUCCESS:
+  case TRUNNEL_HS_INTRO_ACK_STATUS_SUCCESS:
 ret = 0;
 handle_introduce_ack_success(circ);
 goto end;
-  case HS_CELL_INTRO_ACK_FAILURE:
-  case HS_CELL_INTRO_ACK_BADFMT:
-  case HS_CELL_INTRO_ACK_NORELAY:
+  case TRUNNEL_HS_INTRO_ACK_STATUS_UNKNOWN_ID:
+  case TRUNNEL_HS_INTRO_ACK_STATUS_BAD_FORMAT:
+  /* It is possible that the intro point can send us an unknown status code
+   * for the NACK that we do not know about like a new code for instance.
+   * Just fallthrough so we can note down the NACK and re-extend. */
+  default:
 handle_introduce_ack_bad(circ, status);
 /* We are going to see if we have to close the circuits (IP and RP) or we
  * can re-extend to a new intro point. */
 ret = close_or_reextend_intro_circ(circ);
 break;
-  default:
-log_info(LD_PROTOCOL, "Unknown INTRODUCE_ACK status code %u from %s",
-status,
-safe_str_client(extend_info_describe(circ->build_state->chosen_exit)));
-break;
   }
 
  end:



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


[tor-commits] [tor/maint-0.4.0] hs: Add changes file for #30454

2019-06-05 Thread nickm
commit 9f52b875184098aef91bfdebcfd272a60b3b879e
Author: David Goulet 
Date:   Thu May 9 13:23:14 2019 -0400

hs: Add changes file for #30454

Signed-off-by: David Goulet 
---
 changes/ticket30454 | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/changes/ticket30454 b/changes/ticket30454
new file mode 100644
index 0..77c45d0fe
--- /dev/null
+++ b/changes/ticket30454
@@ -0,0 +1,10 @@
+  o Major bugfixes (hidden service v3):
+- An intro point could try to send an INTRODUCE_ACK with a status code
+  that it wasn't able to encode leading to a hard assert() of the relay.
+  Fortunately, that specific code path can not be reached thus this issue
+  can't be triggered. We've consolidated the ABI values into trunnel now.
+  Fixes bug 30454; bugfix on 0.3.0.1-alpha.
+- HSv3 client will now be able to properly handle unknown status code from
+  a INTRODUCE_ACK cell (nack) even if they do not know it. The NACK
+  behavior will stay the same. This will allow us to extend status code if
+  we want in the future without breaking the normal client behavior.



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


[tor-commits] [tor/maint-0.4.0] hs: Remove usage of HS_INTRO_ACK_STATUS_CANT_RELAY

2019-06-05 Thread nickm
commit cbcc570ff4a8e03fc08bfd020d6b4c7365d4d137
Author: David Goulet 
Date:   Thu May 9 12:45:17 2019 -0400

hs: Remove usage of HS_INTRO_ACK_STATUS_CANT_RELAY

The INTRODUCE1 trunnel definition file doesn't support that value so it can
not be used else it leads to an assert on the intro point side if ever 
tried.

Fortunately, it was impossible to reach that code path.

Part of #30454

Signed-off-by: David Goulet 
---
 src/or/hs_intropoint.c | 5 +++--
 src/or/hs_intropoint.h | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/or/hs_intropoint.c b/src/or/hs_intropoint.c
index ee79109ca..e0ab27bd3 100644
--- a/src/or/hs_intropoint.c
+++ b/src/or/hs_intropoint.c
@@ -483,8 +483,9 @@ handle_introduce1(or_circuit_t *client_circ, const uint8_t 
*request,
RELAY_COMMAND_INTRODUCE2,
(char *) request, request_len, NULL)) {
 log_warn(LD_PROTOCOL, "Unable to send INTRODUCE2 cell to the service.");
-/* Inform the client that we can't relay the cell. */
-status = HS_INTRO_ACK_STATUS_CANT_RELAY;
+/* Inform the client that we can't relay the cell. Use the unknown ID
+ * status code since it means that we do not know the service. */
+status = HS_INTRO_ACK_STATUS_UNKNOWN_ID;
 goto send_ack;
   }
 
diff --git a/src/or/hs_intropoint.h b/src/or/hs_intropoint.h
index 749d1530e..014f9339a 100644
--- a/src/or/hs_intropoint.h
+++ b/src/or/hs_intropoint.h
@@ -24,7 +24,6 @@ typedef enum {
   HS_INTRO_ACK_STATUS_SUCCESS= 0x,
   HS_INTRO_ACK_STATUS_UNKNOWN_ID = 0x0001,
   HS_INTRO_ACK_STATUS_BAD_FORMAT = 0x0002,
-  HS_INTRO_ACK_STATUS_CANT_RELAY = 0x0003,
 } hs_intro_ack_status_t;
 
 /* Object containing introduction point common data between the service and



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


[tor-commits] [tor/master] push release date to tomorrow: too many last minute surprises

2019-06-05 Thread nickm
commit 30f0e993c9021c1ad31d5a5134d150fabb359c32
Author: Nick Mathewson 
Date:   Wed Jun 5 15:53:52 2019 -0400

push release date to tomorrow: too many last minute surprises
---
 ChangeLog | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index ca2215f16..d44ce316c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-Changes in version 0.4.1.2-alpha - 2019-06-05
+Changes in version 0.4.1.2-alpha - 2019-06-06
   Tor 0.4.1.2-alpha resolves numerous bugs--some of them from the
   previous alpha, and some much older. It also contains minor testing
   improvements, and an improvement to the security of our authenticated

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


[tor-commits] [tor/master] change some CI-substitute logic

2019-06-05 Thread nickm
commit 4ceec4760c659122d900e56559b75157d1837ae2
Author: Nick Mathewson 
Date:   Wed Jun 5 15:38:25 2019 -0400

change some CI-substitute logic
---
 doc/HACKING/ReleasingTor.md | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/doc/HACKING/ReleasingTor.md b/doc/HACKING/ReleasingTor.md
index 4c87a366c..02e846a3b 100644
--- a/doc/HACKING/ReleasingTor.md
+++ b/doc/HACKING/ReleasingTor.md
@@ -40,10 +40,14 @@ new Tor release:
 * clang scan-build.  (See the script in ./scripts/test/scan_build.sh)
 
 * make test-network and make test-network-all (with
-  --enable-expensive-hardening)
+  --enable-fragile-hardening)
 
 * Running Tor yourself and making sure that it actually works for you.
 
+* Running Tor under valgrind.  (Our 'fragile hardening' doesn't cover
+  libevent and openssl, so using valgrind will sometimes find extra
+  memory leaks.)
+
 
 === II. Write a changelog
 



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


[tor-commits] [tor/master] Revert "hs: Implement a helper to repurpose a circuit"

2019-06-05 Thread nickm
commit 31c34f6524fecd6a104a8dac04d9330b5323e3c0
Author: Mike Perry 
Date:   Wed Jun 5 11:38:01 2019 -0700

Revert "hs: Implement a helper to repurpose a circuit"

This reverts commit 3789f22bcbfbc6de415a838e4c4bfb2555c7d6c3.
---
 src/core/or/circuituse.c  |  6 --
 src/feature/hs/hs_circuit.c   | 31 ---
 src/feature/hs/hs_circuit.h   |  1 -
 src/feature/rend/rendcommon.c | 11 ---
 src/feature/rend/rendcommon.h |  2 --
 5 files changed, 51 deletions(-)

diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c
index b3d5c6bb8..485c38905 100644
--- a/src/core/or/circuituse.c
+++ b/src/core/or/circuituse.c
@@ -3068,12 +3068,6 @@ circuit_change_purpose(circuit_t *circ, uint8_t 
new_purpose)
 
   if (circ->purpose == new_purpose) return;
 
-  /* Take specific actions if we are repurposing a hidden service circuit. */
-  if (circuit_purpose_is_hidden_service(circ->purpose) &&
-  !circuit_purpose_is_hidden_service(new_purpose)) {
-hs_circ_repurpose(circ);
-  }
-
   if (CIRCUIT_IS_ORIGIN(circ)) {
 char old_purpose_desc[80] = "";
 
diff --git a/src/feature/hs/hs_circuit.c b/src/feature/hs/hs_circuit.c
index 79377eb73..a6e86c5ab 100644
--- a/src/feature/hs/hs_circuit.c
+++ b/src/feature/hs/hs_circuit.c
@@ -25,7 +25,6 @@
 #include "feature/nodelist/describe.h"
 #include "feature/nodelist/nodelist.h"
 #include "feature/rend/rendservice.h"
-#include "feature/rend/rendcommon.h"
 #include "feature/stats/rephist.h"
 #include "lib/crypt_ops/crypto_dh.h"
 #include "lib/crypt_ops/crypto_rand.h"
@@ -1193,33 +1192,3 @@ hs_circ_cleanup(circuit_t *circ)
 hs_circuitmap_remove_circuit(circ);
   }
 }
-
-/* The given circuit will be repurposed so take the appropriate actions. A
- * cleanup from the HS maps and of all HS related structures is done.
- *
- * Once this function returns, the circuit can be safely repurposed. */
-void
-hs_circ_repurpose(circuit_t *circ)
-{
-  origin_circuit_t *origin_circ;
-
-  tor_assert(circ);
-
-  /* Only repurposing an origin circuit is possible for HS. */
-  if (!CIRCUIT_IS_ORIGIN(circ)) {
-return;
-  }
-  origin_circ = TO_ORIGIN_CIRCUIT(circ);
-
-  /* First, cleanup the circuit from the HS maps. */
-  hs_circ_cleanup(circ);
-
-  /* Depending on the version, different cleanup is done. */
-  if (origin_circ->rend_data) {
-/* v2. */
-rend_circ_cleanup(origin_circ);
-  } else if (origin_circ->hs_ident) {
-/* v3. */
-hs_ident_circuit_free(origin_circ->hs_ident);
-  }
-}
diff --git a/src/feature/hs/hs_circuit.h b/src/feature/hs/hs_circuit.h
index 0786f3ee4..b8d8b25ad 100644
--- a/src/feature/hs/hs_circuit.h
+++ b/src/feature/hs/hs_circuit.h
@@ -16,7 +16,6 @@
 
 /* Cleanup function when the circuit is closed or/and freed. */
 void hs_circ_cleanup(circuit_t *circ);
-void hs_circ_repurpose(circuit_t *circ);
 
 /* Circuit API. */
 int hs_circ_service_intro_has_opened(hs_service_t *service,
diff --git a/src/feature/rend/rendcommon.c b/src/feature/rend/rendcommon.c
index 265ee368f..777de2984 100644
--- a/src/feature/rend/rendcommon.c
+++ b/src/feature/rend/rendcommon.c
@@ -1046,14 +1046,3 @@ rend_circuit_pk_digest_eq(const origin_circuit_t *ocirc,
  match:
   return 1;
 }
-
-/* Cleanup the given circuit of all HS v2 data structure. */
-void
-rend_circ_cleanup(origin_circuit_t *circ)
-{
-  tor_assert(circ);
-
-  /* Both fields are set to NULL with these. */
-  crypto_pk_free(circ->intro_key);
-  rend_data_free(circ->rend_data);
-}
diff --git a/src/feature/rend/rendcommon.h b/src/feature/rend/rendcommon.h
index c9a04846d..f136863c7 100644
--- a/src/feature/rend/rendcommon.h
+++ b/src/feature/rend/rendcommon.h
@@ -71,8 +71,6 @@ int rend_non_anonymous_mode_enabled(const or_options_t 
*options);
 void assert_circ_anonymity_ok(const origin_circuit_t *circ,
   const or_options_t *options);
 
-void rend_circ_cleanup(origin_circuit_t *circ);
-
 #ifdef RENDCOMMON_PRIVATE
 
 STATIC int



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


[tor-commits] [tor/master] Bug 29034: Cleanup hs circuitmap when purpose changes.

2019-06-05 Thread nickm
commit c525135dac354892a45ad3d2f6de9450d393f09f
Author: Mike Perry 
Date:   Wed Jun 5 11:50:44 2019 -0700

Bug 29034: Cleanup hs circuitmap when purpose changes.

Leave the other rend and hs_ident data around until circuit free, since code
may still try to inspect it after marking the circuit for close. The
circuitmap is the important thing to clean up, since repurposed
intropoints must be removed from this map to ensure validity.
---
 changes/bug29034 | 5 +
 src/core/or/circuituse.c | 6 ++
 2 files changed, 11 insertions(+)

diff --git a/changes/bug29034 b/changes/bug29034
new file mode 100644
index 0..e7aa9af00
--- /dev/null
+++ b/changes/bug29034
@@ -0,0 +1,5 @@
+  o Major bugfixes (Onion service reachability):
+- Properly clean up the introduction point map when circuits change purpose
+  from onion service circuits to pathbias, measurement, or other circuit 
types.
+  This should fix some service-side instances of introduction point 
failure.
+  Fixes bug 29034; bugfix on 0.3.2.1-alpha.
diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c
index 485c38905..18b419e99 100644
--- a/src/core/or/circuituse.c
+++ b/src/core/or/circuituse.c
@@ -3082,6 +3082,12 @@ circuit_change_purpose(circuit_t *circ, uint8_t 
new_purpose)
   circ->purpose,
   circuit_purpose_to_string(new_purpose),
   new_purpose);
+
+/* Take specific actions if we are repurposing a hidden service circuit. */
+if (circuit_purpose_is_hidden_service(circ->purpose) &&
+!circuit_purpose_is_hidden_service(new_purpose)) {
+  hs_circ_cleanup(circ);
+}
   }
 
   old_purpose = circ->purpose;



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


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

2019-06-05 Thread nickm
commit 54eb3c043c1c7599a7cbd73321fba3476d49728b
Merge: 27e067df4 c525135da
Author: Nick Mathewson 
Date:   Wed Jun 5 15:35:43 2019 -0400

Merge remote-tracking branch 'tor-github/pr/1076'

 changes/bug29034  |  5 
 src/core/or/circuituse.c  | 12 
 src/feature/hs/hs_circuit.c   | 31 ---
 src/feature/hs/hs_circuit.h   |  1 -
 src/feature/rend/rendcommon.c | 11 ---
 src/feature/rend/rendcommon.h |  2 --
 src/test/include.am   |  1 -
 src/test/test.c   |  1 -
 src/test/test.h   |  1 -
 src/test/test_hs_circ.c   | 70 ---
 10 files changed, 11 insertions(+), 124 deletions(-)

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


[tor-commits] [tor/master] Revert "test: Add test_hs_circ.c for HS circuit testing"

2019-06-05 Thread nickm
commit a42131bf4823bed42563f30d4925462b2df02c27
Author: Mike Perry 
Date:   Wed Jun 5 11:37:32 2019 -0700

Revert "test: Add test_hs_circ.c for HS circuit testing"

This reverts commit 41b94722e5c93ec06911f9c63296a65ce295c1ea.
---
 src/test/include.am |  1 -
 src/test/test.c |  1 -
 src/test/test.h |  1 -
 src/test/test_hs_circ.c | 70 -
 4 files changed, 73 deletions(-)

diff --git a/src/test/include.am b/src/test/include.am
index fdfe96c55..85f9c9f88 100644
--- a/src/test/include.am
+++ b/src/test/include.am
@@ -145,7 +145,6 @@ src_test_test_SOURCES += \
src/test/test_hs_common.c \
src/test/test_hs_config.c \
src/test/test_hs_cell.c \
-   src/test/test_hs_circ.c \
src/test/test_hs_ntor.c \
src/test/test_hs_service.c \
src/test/test_hs_client.c  \
diff --git a/src/test/test.c b/src/test/test.c
index d7682b661..cac98dd83 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -871,7 +871,6 @@ struct testgroup_t testgroups[] = {
   { "guardfraction/", guardfraction_tests },
   { "hs_cache/", hs_cache },
   { "hs_cell/", hs_cell_tests },
-  { "hs_circ/", hs_circ_tests },
   { "hs_client/", hs_client_tests },
   { "hs_common/", hs_common_tests },
   { "hs_config/", hs_config_tests },
diff --git a/src/test/test.h b/src/test/test.h
index b108d795e..167fd090a 100644
--- a/src/test/test.h
+++ b/src/test/test.h
@@ -221,7 +221,6 @@ extern struct testcase_t guardfraction_tests[];
 extern struct testcase_t handle_tests[];
 extern struct testcase_t hs_cache[];
 extern struct testcase_t hs_cell_tests[];
-extern struct testcase_t hs_circ_tests[];
 extern struct testcase_t hs_client_tests[];
 extern struct testcase_t hs_common_tests[];
 extern struct testcase_t hs_config_tests[];
diff --git a/src/test/test_hs_circ.c b/src/test/test_hs_circ.c
deleted file mode 100644
index af28af257..0
--- a/src/test/test_hs_circ.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Copyright (c) 2017-2019, The Tor Project, Inc. */
-/* See LICENSE for licensing information */
-
-/**
- * \file test_hs_circ.c
- * \brief Test hidden service circuit functionality.
- */
-
-#define CIRCUITLIST_PRIVATE
-
-#include "test/test.h"
-#include "test/test_helpers.h"
-#include "test/log_test_helpers.h"
-
-#include "core/or/circuitbuild.h"
-#include "core/or/circuitlist.h"
-#include "core/or/circuituse.h"
-#include "core/or/origin_circuit_st.h"
-
-#include "feature/hs/hs_circuit.h"
-#include "feature/hs/hs_circuitmap.h"
-
-static void
-test_circuit_repurpose(void *arg)
-{
-  origin_circuit_t *intro_circ = NULL;
-  const origin_circuit_t *search;
-  ed25519_keypair_t kp;
-
-  (void) arg;
-
-  hs_init();
-
-  intro_circ = origin_circuit_init(CIRCUIT_PURPOSE_S_ESTABLISH_INTRO, 0);
-  tt_assert(intro_circ);
-  ed25519_keypair_generate(, 0);
-
-  /* Register circuit in global map and make sure it is actually there. */
-  hs_circuitmap_register_intro_circ_v3_service_side(intro_circ,
-);
-  tt_assert(TO_CIRCUIT(intro_circ)->hs_token);
-  search = hs_circuitmap_get_intro_circ_v3_service_side();
-  tt_mem_op(search, OP_EQ, intro_circ, sizeof(origin_circuit_t));
-
-  /* Setup circuit HS ident. We don't care about the service pubkey. */
-  intro_circ->hs_ident = hs_ident_circuit_new(,
-  HS_IDENT_CIRCUIT_INTRO);
-  tt_assert(intro_circ->hs_ident);
-
-  /* Trigger a repurpose. State should be cleaned up. */
-  hs_circ_repurpose(TO_CIRCUIT(intro_circ));
-
-  /* Removed from map. */
-  search = hs_circuitmap_get_intro_circ_v3_service_side();
-  tt_assert(!search);
-  /* HS identifier has been removed. */
-  tt_assert(!intro_circ->hs_ident);
-
- done:
-  circuit_free_(TO_CIRCUIT(intro_circ));
-  hs_free_all();
-}
-
-struct testcase_t hs_circ_tests[] = {
-  { "repurpose", test_circuit_repurpose, TT_FORK,
-NULL, NULL },
-
-  END_OF_TESTCASES
-};
-



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


[tor-commits] [tor/master] Add missing newline after decode_intro_points() closing bracket

2019-06-05 Thread nickm
commit 27e067df4fd3148b59dd0377d1a7b111460a2b53
Author: Neel Chauhan 
Date:   Wed Jun 5 12:50:01 2019 -0400

Add missing newline after decode_intro_points() closing bracket
---
 src/feature/hs/hs_descriptor.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/feature/hs/hs_descriptor.c b/src/feature/hs/hs_descriptor.c
index 52dc8690c..a8796c002 100644
--- a/src/feature/hs/hs_descriptor.c
+++ b/src/feature/hs/hs_descriptor.c
@@ -1968,6 +1968,7 @@ decode_intro_points(const hs_descriptor_t *desc,
   SMARTLIST_FOREACH(intro_points, char *, a, tor_free(a));
   smartlist_free(intro_points);
 }
+
 /* Return 1 iff the given base64 encoded signature in b64_sig from the encoded
  * descriptor in encoded_desc validates the descriptor content. */
 STATIC int

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


[tor-commits] [tor/master] Don't access rend data after a circuit has been marked for close.

2019-06-05 Thread nickm
commit 917e4e9eae8645e65ea93836cbd82890eb5d7872
Author: George Kadianakis 
Date:   Wed Jun 5 18:19:23 2019 +0300

Don't access rend data after a circuit has been marked for close.

This can cause issues if the circuit was repurposed into a padding circuit
instead of closing, since in that case we will wipe off the rend_data.
---
 src/feature/rend/rendclient.c | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/feature/rend/rendclient.c b/src/feature/rend/rendclient.c
index f84d221b1..5bdd4d453 100644
--- a/src/feature/rend/rendclient.c
+++ b/src/feature/rend/rendclient.c
@@ -403,14 +403,23 @@ rend_client_introduction_acked(origin_circuit_t *circ,
 } else {
   log_info(LD_REND,"...Found no rend circ. Dropping on the floor.");
 }
+/* Save the rend data digest to a temporary object so that we don't access
+ * it after we mark the circuit for close. */
+const uint8_t *rend_digest_tmp = NULL;
+size_t digest_len;
+uint8_t *cached_rend_digest = NULL;
+rend_digest_tmp = rend_data_get_pk_digest(circ->rend_data, _len);
+cached_rend_digest = tor_malloc_zero(digest_len);
+memcpy(cached_rend_digest, rend_digest_tmp, digest_len);
+
 /* close the circuit: we won't need it anymore. */
 circuit_change_purpose(TO_CIRCUIT(circ),
CIRCUIT_PURPOSE_C_INTRODUCE_ACKED);
 circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_FINISHED);
 
 /* close any other intros launched in parallel */
-rend_client_close_other_intros(rend_data_get_pk_digest(circ->rend_data,
-   NULL));
+rend_client_close_other_intros(cached_rend_digest);
+tor_free(cached_rend_digest); /* free the temporary digest */
   } else {
 /* It's a NAK; the introduction point didn't relay our request. */
 circuit_change_purpose(TO_CIRCUIT(circ), CIRCUIT_PURPOSE_C_INTRODUCING);

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


[tor-commits] [tpo/staging] Merge branch 'master' into staging

2019-06-05 Thread emmapeel
commit 1a1c2aa8b222a173fc5c0a8e1b1ef5f7d890bc3f
Merge: a848be0 2dfd5f7
Author: emma peel 
Date:   Wed Jun 5 16:19:25 2019 +0200

Merge branch 'master' into staging

 content/menu/contents.lr | 2 +-
 databags/versions.ini| 4 ++--
 models/sponsors.ini  | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

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


[tor-commits] [tpo/staging] translate sponsors overview page (ref: #30583)

2019-06-05 Thread emmapeel
commit 2dfd5f76ead3b6613e7f9009634de4a1568462b4
Author: emma peel 
Date:   Wed Jun 5 13:13:36 2019 +0200

translate sponsors overview page (ref: #30583)
---
 content/menu/contents.lr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/content/menu/contents.lr b/content/menu/contents.lr
index 105278d..42d2091 100644
--- a/content/menu/contents.lr
+++ b/content/menu/contents.lr
@@ -4,7 +4,7 @@ section: About
 ---
 color: primary
 ---
-title: About
+title:  Sponsors
 ---
 body:
 



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


[tor-commits] [tpo/staging] Update website

2019-06-05 Thread emmapeel
commit f201e0b26c3d14d46df6dbf5d1137f2cc6370ff7
Author: Nicolas Vigier 
Date:   Tue Jun 4 20:52:47 2019 +0200

Update website



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


[tor-commits] [tpo/staging] Add new Tor Browser version: 8.5.1

2019-06-05 Thread emmapeel
commit 556542756217d9d60ff99baaf9ca5ae7eb5cd9d7
Author: Nicolas Vigier 
Date:   Tue Jun 4 20:39:35 2019 +0200

Add new Tor Browser version: 8.5.1
---
 content/projects/torbrowser/RecommendedTBBVersions/contents.lr | 4 
 databags/versions.ini  | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/content/projects/torbrowser/RecommendedTBBVersions/contents.lr 
b/content/projects/torbrowser/RecommendedTBBVersions/contents.lr
index 5c86649..ebf1875 100644
--- a/content/projects/torbrowser/RecommendedTBBVersions/contents.lr
+++ b/content/projects/torbrowser/RecommendedTBBVersions/contents.lr
@@ -9,6 +9,10 @@ body:
 "8.5-MacOS",
 "8.5-Linux",
 "8.5-Windows",
+"8.5.1",
+"8.5.1-MacOS",
+"8.5.1-Linux",
+"8.5.1-Windows",
 "9.0a1",
 "9.0a1-MacOS",
 "9.0a1-Linux",
diff --git a/databags/versions.ini b/databags/versions.ini
index 88dc298..091e26c 100644
--- a/databags/versions.ini
+++ b/databags/versions.ini
@@ -1,6 +1,6 @@
 [torbrowser-stable]
-version = 8.5
-release_date = 2019-05-21
+version = 8.5.1
+release_date = 2019-06-04
 win32 = 0.3.5.8
 
 [torbrowser-alpha]



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


[tor-commits] [tpo/staging] update pronoun

2019-06-05 Thread emmapeel
commit dec5b24ae8f54c173298502c666f40d2305f9b0a
Author: emma peel 
Date:   Mon Jun 3 21:22:02 2019 +0200

update pronoun
---
 content/about/people/catalyst/contents.lr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/content/about/people/catalyst/contents.lr 
b/content/about/people/catalyst/contents.lr
index 85695d4..e8e2412 100644
--- a/content/about/people/catalyst/contents.lr
+++ b/content/about/people/catalyst/contents.lr
@@ -10,7 +10,7 @@ nickname: catalyst
 ---
 twitter_handle: argonblue
 ---
-pronoun: https://pronoun.is/they
+pronoun: https://pronoun.is/they?or=she
 ---
 gpg: 
https://db.torproject.org/fetchkey.cgi?fingerprint=2C732B1C0DBEF678AB3AF606A32F17FD0055C305
 ---



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


[tor-commits] [tpo/staging] translate sponsors overview page (ref: #30583)

2019-06-05 Thread emmapeel
commit 88404ecf90da8f42c772da11c63eca1450595f96
Author: emma peel 
Date:   Wed Jun 5 11:04:14 2019 +0200

translate sponsors overview page (ref: #30583)
---
 models/sponsors.ini | 1 +
 1 file changed, 1 insertion(+)

diff --git a/models/sponsors.ini b/models/sponsors.ini
index 9bb89db..b9a4fee 100644
--- a/models/sponsors.ini
+++ b/models/sponsors.ini
@@ -20,6 +20,7 @@ translate = False
 [fields.body]
 label = Body
 type = markdown
+translate = True
 
 [fields.color]
 label = Color



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


[tor-commits] [tpo/staging] update pronoun

2019-06-05 Thread emmapeel
commit a848be007bd0c28ea10be04cf27de61c610bb0e1
Author: emma peel 
Date:   Mon Jun 3 21:22:02 2019 +0200

update pronoun
---
 content/about/people/catalyst/contents.lr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/content/about/people/catalyst/contents.lr 
b/content/about/people/catalyst/contents.lr
index 85695d4..e8e2412 100644
--- a/content/about/people/catalyst/contents.lr
+++ b/content/about/people/catalyst/contents.lr
@@ -10,7 +10,7 @@ nickname: catalyst
 ---
 twitter_handle: argonblue
 ---
-pronoun: https://pronoun.is/they
+pronoun: https://pronoun.is/they?or=she
 ---
 gpg: 
https://db.torproject.org/fetchkey.cgi?fingerprint=2C732B1C0DBEF678AB3AF606A32F17FD0055C305
 ---



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


[tor-commits] [tor/master] minor changelog edits

2019-06-05 Thread nickm
commit 7f341d64828d48ebaf4bfaa2720c614a25c8dbba
Author: Nick Mathewson 
Date:   Wed Jun 5 09:43:43 2019 -0400

minor changelog edits
---
 ChangeLog | 45 +++--
 1 file changed, 23 insertions(+), 22 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6387d6dbb..ca2215f16 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@ Changes in version 0.4.1.2-alpha - 2019-06-05
   Tor 0.4.1.2-alpha resolves numerous bugs--some of them from the
   previous alpha, and some much older. It also contains minor testing
   improvements, and an improvement to the security of our authenticated
-  sendme implementation.
+  SENDME implementation.
 
   o Major bugfixes (bridges):
 - Consider our directory information to have changed when our list
@@ -16,26 +16,27 @@ Changes in version 0.4.1.2-alpha - 2019-06-05
   and delay fetching router descriptors for the new ones. Fixes part
   of bug 29875; bugfix on 0.3.0.1-alpha.
 
-  o Major bugfixes (Flow Control, SENDME):
-- The decrement of the stream-level package window was done in a
-  log_debug() statement meaning that if the debug logs were not
-  enabled, the decrement would never happen and thus the window
-  would be out of sync with the other end point. Fixes bug 30628;
-  bugfix on 0.4.1.1-alpha.
+  o Major bugfixes (flow control, SENDME):
+- Decrement the stream-level package window after packaging a cell.
+  Previously, it was done inside a log_debug() call, meaning that if
+  debug logs were not enabled, the decrement would never happen, and
+  thus the window would be out of sync with the other end point.
+  Fixes bug 30628; bugfix on 0.4.1.1-alpha.
 
-  o Major bugfixes (Onion service reachability):
+  o Major bugfixes (onion service reachability):
 - Properly clean up the introduction point map and associated state
   when circuits change purpose from onion service circuits to
-  pathbias, measurement, or other circuit types. This should fix
-  some instances of introduction point failure. Fixes bug 29034;
-  bugfix on 0.3.2.1-alpha.
+  pathbias, measurement, or other circuit types. This may fix some
+  instances of introduction point failure. Fixes bug 29034; bugfix
+  on 0.3.2.1-alpha.
 
   o Minor features (authenticated SENDME):
 - Ensure that there is enough randomness on every circuit to prevent
-  an attacker from successfully predicting what SENDME cells they
-  will need to send: at a random interval, if we have not send
-  randomness already, leave some extra space at the end of a cell
-  that we can fill with random bytes. Closes ticket 26846.
+  an attacker from successfully predicting the hashes they will need
+  to include in authenticated SENDME cells. At a random interval, if
+  we have not sent randomness already, we now leave some extra space
+  at the end of a cell that we can fill with random bytes. Closes
+  ticket 26846.
 
   o Minor features (continuous integration):
 - When running coverage builds on Travis, we now set
@@ -71,9 +72,9 @@ Changes in version 0.4.1.2-alpha - 2019-06-05
   on 0.4.1.1-alpha.
 
   o Minor bugfixes (developer tooling):
-- Fix pre-push hook to refrain from rejecting fixup and squash
-  commits when pushing to non-upstream git remote. Fixes bug 30286;
-  bugfix on 0.4.0.1-alpha.
+- Fix pre-push hook to allow fixup and squash commits when pushing
+  to non-upstream git remote. Fixes bug 30286; bugfix
+  on 0.4.0.1-alpha.
 
   o Minor bugfixes (directory authority):
 - Move the "bandwidth-file-headers" line in directory authority
@@ -88,7 +89,8 @@ Changes in version 0.4.1.2-alpha - 2019-06-05
   o Minor bugfixes (out-of-memory handler):
 - When purging the DNS cache because of an out-of-memory condition,
   try purging just the older entries at first. Previously, we would
-  purge the whole thing. Fixes bug 29617; bugfix on 0.3.5.1-alpha.
+  always purge the whole thing. Fixes bug 29617; bugfix
+  on 0.3.5.1-alpha.
 
   o Minor bugfixes (portability):
 - Avoid crashing in our tor_vasprintf() implementation on systems
@@ -107,9 +109,8 @@ Changes in version 0.4.1.2-alpha - 2019-06-05
 
   o Minor bugfixes (static analysis):
 - Fix several spurious Coverity warnings about the unit tests, to
-  lower our chances of missing any real warnings in the future.
-  Fixes bug 30150; bugfix on 0.3.5.1-alpha and various other
-  Tor versions.
+  lower our chances of missing real warnings in the future. Fixes
+  bug 30150; bugfix on 0.3.5.1-alpha and various other Tor versions.
 
   o Testing:
 - Specify torrc paths (with empty files) when launching tor in

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


[tor-commits] [tor/master] Replace a missing end-of-comment string

2019-06-05 Thread nickm
commit 892a313b6a9edbcb1930454b424503c4cc2c791a
Author: Nick Mathewson 
Date:   Wed Jun 5 09:35:45 2019 -0400

Replace a missing end-of-comment string

This happened when I went to fix long lines after running "make
autostyle".
---
 src/lib/tls/tortls_openssl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/tls/tortls_openssl.c b/src/lib/tls/tortls_openssl.c
index 04027104e..86f0ac42c 100644
--- a/src/lib/tls/tortls_openssl.c
+++ b/src/lib/tls/tortls_openssl.c
@@ -673,7 +673,7 @@ tor_tls_context_new(crypto_pk_t *identity, unsigned int 
key_lifetime,
   SSL_CTX_set_tmp_ecdh(result->ctx, ec_key);
 EC_KEY_free(ec_key);
   }
-#endif /* defined(SSL_CTX_set1_groups_list) || ...)
+#endif /* defined(SSL_CTX_set1_groups_list) || ...) */
   SSL_CTX_set_verify(result->ctx, SSL_VERIFY_PEER,
  always_accept_verify_cb);
   /* let us realloc bufs that we're writing from */

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


[tor-commits] [tor/master] Regenerate practracker excpetions file

2019-06-05 Thread nickm
commit 2926f49b24938fee8a3e33357687eb2831eb62e0
Author: Nick Mathewson 
Date:   Wed Jun 5 09:34:14 2019 -0400

Regenerate practracker excpetions file
---
 scripts/maint/practracker/exceptions.txt | 64 ++--
 1 file changed, 28 insertions(+), 36 deletions(-)

diff --git a/scripts/maint/practracker/exceptions.txt 
b/scripts/maint/practracker/exceptions.txt
index c59648250..eb0625b8d 100644
--- a/scripts/maint/practracker/exceptions.txt
+++ b/scripts/maint/practracker/exceptions.txt
@@ -29,13 +29,13 @@
 #
 # Remember: It is better to fix the problem than to add a new exception!
 
-problem file-size /src/app/config/config.c 8520
-problem include-count /src/app/config/config.c 88
+problem file-size /src/app/config/config.c 8518
+problem include-count /src/app/config/config.c 87
 problem function-size /src/app/config/config.c:options_act_reversible() 296
-problem function-size /src/app/config/config.c:options_act() 590
+problem function-size /src/app/config/config.c:options_act() 589
 problem function-size /src/app/config/config.c:resolve_my_address() 192
-problem function-size /src/app/config/config.c:options_validate() 1220
-problem function-size /src/app/config/config.c:options_init_from_torrc() 210
+problem function-size /src/app/config/config.c:options_validate() 1217
+problem function-size /src/app/config/config.c:options_init_from_torrc() 207
 problem function-size /src/app/config/config.c:options_init_from_string() 173
 problem function-size /src/app/config/config.c:options_init_logs() 146
 problem function-size /src/app/config/config.c:parse_bridge_line() 104
@@ -53,8 +53,7 @@ problem function-size /src/app/main/main.c:tor_init() 137
 problem function-size /src/app/main/main.c:sandbox_init_filter() 291
 problem function-size /src/app/main/main.c:run_tor_main_loop() 105
 problem function-size /src/app/main/ntmain.c:nt_service_install() 125
-problem include-count /src/app/main/shutdown.c 52
-problem file-size /src/core/mainloop/connection.c 5570
+problem file-size /src/core/mainloop/connection.c 5569
 problem include-count /src/core/mainloop/connection.c 62
 problem function-size 
/src/core/mainloop/connection.c:connection_free_minimal() 185
 problem function-size 
/src/core/mainloop/connection.c:connection_listener_new() 328
@@ -67,18 +66,15 @@ problem function-size 
/src/core/mainloop/connection.c:connection_handle_read_imp
 problem function-size 
/src/core/mainloop/connection.c:connection_buf_read_from_socket() 181
 problem function-size 
/src/core/mainloop/connection.c:connection_handle_write_impl() 241
 problem function-size /src/core/mainloop/connection.c:assert_connection_ok() 
143
-problem file-size /src/core/mainloop/mainloop.c 3051
-problem include-count /src/core/mainloop/mainloop.c 66
+problem include-count /src/core/mainloop/mainloop.c 63
 problem function-size /src/core/mainloop/mainloop.c:conn_close_if_marked() 108
 problem function-size 
/src/core/mainloop/mainloop.c:run_connection_housekeeping() 123
-problem function-size /src/core/mainloop/mainloop.c:CALLBACK() 116
 problem file-size /src/core/or/channel.c 3487
 problem function-size /src/core/or/channeltls.c:channel_tls_handle_var_cell() 
160
 problem function-size 
/src/core/or/channeltls.c:channel_tls_process_versions_cell() 170
 problem function-size 
/src/core/or/channeltls.c:channel_tls_process_netinfo_cell() 214
 problem function-size 
/src/core/or/channeltls.c:channel_tls_process_certs_cell() 246
 problem function-size 
/src/core/or/channeltls.c:channel_tls_process_authenticate_cell() 202
-problem file-size /src/core/or/circuitbuild.c 3061
 problem include-count /src/core/or/circuitbuild.c 54
 problem function-size /src/core/or/circuitbuild.c:get_unique_circ_id_by_chan() 
128
 problem function-size /src/core/or/circuitbuild.c:circuit_extend() 147
@@ -91,9 +87,12 @@ problem function-size 
/src/core/or/circuitlist.c:circuit_about_to_free() 120
 problem function-size /src/core/or/circuitlist.c:circuits_handle_oom() 117
 problem function-size /src/core/or/circuitmux.c:circuitmux_set_policy() 110
 problem function-size /src/core/or/circuitmux.c:circuitmux_attach_circuit() 114
+problem function-size 
/src/core/or/circuitpadding.c:circpad_machine_schedule_padding() 107
+problem function-size 
/src/core/or/circuitpadding_machines.c:circpad_machine_relay_hide_intro_circuits()
 104
+problem function-size 
/src/core/or/circuitpadding_machines.c:circpad_machine_client_hide_rend_circuits()
 112
 problem function-size 
/src/core/or/circuitstats.c:circuit_build_times_parse_state() 124
 problem file-size /src/core/or/circuituse.c 3162
-problem function-size /src/core/or/circuituse.c:circuit_is_acceptable() 133
+problem function-size /src/core/or/circuituse.c:circuit_is_acceptable() 132
 problem function-size /src/core/or/circuituse.c:circuit_expire_building() 394
 problem function-size 
/src/core/or/circuituse.c:circuit_log_ancient_one_hop_circuits() 126
 problem function-size 

[tor-commits] [tor/master] Bump to 0.4.1.2-alpha

2019-06-05 Thread nickm
commit d1b02456c107256ee562b36b0ef2f5544eb27cee
Author: Nick Mathewson 
Date:   Wed Jun 5 09:25:21 2019 -0400

Bump to 0.4.1.2-alpha
---
 configure.ac| 4 ++--
 contrib/win32build/tor-mingw.nsi.in | 2 +-
 src/win32/orconfig.h| 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index e7f959f17..f068d1646 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Copyright (c) 2007-2019, The Tor Project, Inc.
 dnl See LICENSE for licensing information
 
 AC_PREREQ([2.63])
-AC_INIT([tor],[0.4.1.1-alpha-dev])
+AC_INIT([tor],[0.4.1.2-alpha])
 AC_CONFIG_SRCDIR([src/app/main/tor_main.c])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -14,7 +14,7 @@ AC_CONFIG_MACRO_DIR([m4])
 # version number changes.  Tor uses it to make sure that it
 # only shuts down for missing "required protocols" when those protocols
 # are listed as required by a consensus after this date.
-AC_DEFINE(APPROX_RELEASE_DATE, ["2019-05-22"], # for 0.4.1.1-alpha-dev
+AC_DEFINE(APPROX_RELEASE_DATE, ["2019-06-05"], # for 0.4.1.2-alpha
   [Approximate date when this software was released. (Updated when the 
version changes.)])
 
 # "foreign" means we don't follow GNU package layout standards
diff --git a/contrib/win32build/tor-mingw.nsi.in 
b/contrib/win32build/tor-mingw.nsi.in
index 49958a462..99783c40f 100644
--- a/contrib/win32build/tor-mingw.nsi.in
+++ b/contrib/win32build/tor-mingw.nsi.in
@@ -8,7 +8,7 @@
 !include "LogicLib.nsh"
 !include "FileFunc.nsh"
 !insertmacro GetParameters
-!define VERSION "0.4.1.1-alpha-dev"
+!define VERSION "0.4.1.2-alpha"
 !define INSTALLER "tor-${VERSION}-win32.exe"
 !define WEBSITE "https://www.torproject.org/;
 !define LICENSE "LICENSE"
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index 442bb8157..a3daa98de 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -218,7 +218,7 @@
 #define USING_TWOS_COMPLEMENT
 
 /* Version number of package */
-#define VERSION "0.4.1.1-alpha-dev"
+#define VERSION "0.4.1.2-alpha"
 
 
 

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


[tor-commits] [tor/master] Start a changelog for 0.4.1.2-alpha

2019-06-05 Thread nickm
commit 0982d0136996179e1c4bcf26d2890e12301f6aad
Author: Nick Mathewson 
Date:   Wed Jun 5 09:24:18 2019 -0400

Start a changelog for 0.4.1.2-alpha
---
 ChangeLog   | 115 
 changes/bug29034|   5 ---
 changes/bug29670|   4 --
 changes/bug29875|  11 -
 changes/bug30286|   4 --
 changes/bug30316|   4 --
 changes/bug30561|   6 ---
 changes/bug30614|   4 --
 changes/bug30629|   6 ---
 changes/bug30646|   4 --
 changes/ticket26846 |   6 ---
 changes/ticket28878 |  11 -
 changes/ticket29617 |   4 --
 changes/ticket29702 |   4 --
 changes/ticket30150 |   4 --
 changes/ticket30519 |   4 --
 changes/ticket30539 |   4 --
 changes/ticket30580 |   4 --
 changes/ticket30628 |   5 ---
 19 files changed, 115 insertions(+), 94 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 86f39bfd7..f3eac65d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,118 @@
+Changes in version 0.4.1.2-alpha - 2019-06-05
+  Tor 0.4.1.2-alpha resolves numerous bugs--some of them from the previous
+  alpha, and some much older. It also contains minor testing improvements,
+  and an improvement to the security of our authenticated sendme
+  implementation.
+
+  o Major bugfixes (bridges):
+- Consider our directory information to have changed when our list of
+  bridges changes. Previously, Tor would not re-compute the status of its
+  directory information when bridges changed, and therefore would not
+  realize that it was no longer able to build circuits. Fixes part of bug
+  29875.
+- Do not count previously configured working bridges towards our total of
+  working bridges. Previously, when Tor's list of bridges changed, it
+  would think that the old bridges were still usable, and delay fetching
+  router descriptors for the new ones.  Fixes part of bug 29875; bugfix
+  on 0.3.0.1-alpha.
+
+  o Major bugfixes (Flow Control, SENDME):
+- The decrement of the stream-level package window was done in a 
log_debug()
+  statement meaning that if the debug logs were not enabled, the decrement
+  would never happen and thus the window would be out of sync with the 
other
+  end point. Fixes bug 30628; bugfix on 0.4.1.1-alpha.
+
+  o Major bugfixes (Onion service reachability):
+- Properly clean up the introduction point map and associated state when
+  circuits change purpose from onion service circuits to pathbias,
+  measurement, or other circuit types. This should fix some instances of
+  introduction point failure. Fixes bug 29034; bugfix on 0.3.2.1-alpha.
+
+  o Minor features (authenticated SENDME):
+- Ensure that there is enough randomness on every circuit
+  to prevent an attacker from successfully predicting what SENDME cells
+  they will need to send: at a random interval, if we have not send
+  randomness already, leave some extra space at the end of a cell that
+  we can fill with random bytes.  Closes ticket 26846.
+
+  o Minor features (continuous integration):
+- When running coverage builds on Travis, we now set TOR_TEST_RNG_SEED,
+  to avoid RNG-based coverage differences.
+  Part of ticket 28878.
+
+  o Minor features (maintenance):
+- Add a new "make autostyle" target that developers can use to
+  apply all automatic Tor style and consistency conversions to the
+  codebase. Closes ticket 30539.
+
+  o Minor features (testing):
+- The circuitpadding tests now use a reproducible RNG implementation,
+  so that if a test fails, we can learn why. Part of ticket 28878.
+- Tor's tests now support an environment variable, TOR_TEST_RNG_SEED,
+  to set the RNG seed for tests that use a reproducible RNG.
+  Part of ticket 28878.
+- When running tests in coverage mode, take additional care to make
+  our coverage deterministic, so that we can accurately track changes in
+  code coverage. Closes ticket 30519.
+
+  o Minor bugfixes (configuration, proxies):
+- Fix a bug that prevented us from supporting SOCKS5 proxies that want
+  authentication along with configured (but unused!)
+  ClientTransportPlugins. Fixes bug 29670; bugfix on 0.2.6.1-alpha.
+
+  o Minor bugfixes (controller):
+- POSTDESCRIPTOR requests should work again. Previously, they were
+  broken if a "purpose=" flag was specified.  Fixes bug 30580;
+  bugfix on 0.4.1.1-alpha.
+- Repair the HSFETCH command so that it works again. Previously, it
+  expected a body when it shouldn't have. Fixes bug 30646; bugfix on
+  0.4.1.1-alpha.
+
+  o Minor bugfixes (developer tooling):
+- Fix pre-push hook to refrain from rejecting fixup and squash commits
+  when pushing to non-upstream git remote. Fixes bug 30286; bugfix on
+  0.4.0.1-alpha.
+
+  o Minor bugfixes (directory authority):
+- Move the "bandwidth-file-headers" line in directory authority votes
+  so that it conforms to 

[tor-commits] [tor/master] Rewrap the changelog

2019-06-05 Thread nickm
commit d2de899bf4f954e0886b88f4ee2562a13f49a716
Author: Nick Mathewson 
Date:   Wed Jun 5 09:24:42 2019 -0400

Rewrap the changelog
---
 ChangeLog | 128 --
 1 file changed, 66 insertions(+), 62 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f3eac65d5..6387d6dbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,82 +1,84 @@
 Changes in version 0.4.1.2-alpha - 2019-06-05
-  Tor 0.4.1.2-alpha resolves numerous bugs--some of them from the previous
-  alpha, and some much older. It also contains minor testing improvements,
-  and an improvement to the security of our authenticated sendme
-  implementation.
+  Tor 0.4.1.2-alpha resolves numerous bugs--some of them from the
+  previous alpha, and some much older. It also contains minor testing
+  improvements, and an improvement to the security of our authenticated
+  sendme implementation.
 
   o Major bugfixes (bridges):
-- Consider our directory information to have changed when our list of
-  bridges changes. Previously, Tor would not re-compute the status of its
-  directory information when bridges changed, and therefore would not
-  realize that it was no longer able to build circuits. Fixes part of bug
-  29875.
-- Do not count previously configured working bridges towards our total of
-  working bridges. Previously, when Tor's list of bridges changed, it
-  would think that the old bridges were still usable, and delay fetching
-  router descriptors for the new ones.  Fixes part of bug 29875; bugfix
-  on 0.3.0.1-alpha.
+- Consider our directory information to have changed when our list
+  of bridges changes. Previously, Tor would not re-compute the
+  status of its directory information when bridges changed, and
+  therefore would not realize that it was no longer able to build
+  circuits. Fixes part of bug 29875.
+- Do not count previously configured working bridges towards our
+  total of working bridges. Previously, when Tor's list of bridges
+  changed, it would think that the old bridges were still usable,
+  and delay fetching router descriptors for the new ones. Fixes part
+  of bug 29875; bugfix on 0.3.0.1-alpha.
 
   o Major bugfixes (Flow Control, SENDME):
-- The decrement of the stream-level package window was done in a 
log_debug()
-  statement meaning that if the debug logs were not enabled, the decrement
-  would never happen and thus the window would be out of sync with the 
other
-  end point. Fixes bug 30628; bugfix on 0.4.1.1-alpha.
+- The decrement of the stream-level package window was done in a
+  log_debug() statement meaning that if the debug logs were not
+  enabled, the decrement would never happen and thus the window
+  would be out of sync with the other end point. Fixes bug 30628;
+  bugfix on 0.4.1.1-alpha.
 
   o Major bugfixes (Onion service reachability):
-- Properly clean up the introduction point map and associated state when
-  circuits change purpose from onion service circuits to pathbias,
-  measurement, or other circuit types. This should fix some instances of
-  introduction point failure. Fixes bug 29034; bugfix on 0.3.2.1-alpha.
+- Properly clean up the introduction point map and associated state
+  when circuits change purpose from onion service circuits to
+  pathbias, measurement, or other circuit types. This should fix
+  some instances of introduction point failure. Fixes bug 29034;
+  bugfix on 0.3.2.1-alpha.
 
   o Minor features (authenticated SENDME):
-- Ensure that there is enough randomness on every circuit
-  to prevent an attacker from successfully predicting what SENDME cells
-  they will need to send: at a random interval, if we have not send
-  randomness already, leave some extra space at the end of a cell that
-  we can fill with random bytes.  Closes ticket 26846.
+- Ensure that there is enough randomness on every circuit to prevent
+  an attacker from successfully predicting what SENDME cells they
+  will need to send: at a random interval, if we have not send
+  randomness already, leave some extra space at the end of a cell
+  that we can fill with random bytes. Closes ticket 26846.
 
   o Minor features (continuous integration):
-- When running coverage builds on Travis, we now set TOR_TEST_RNG_SEED,
-  to avoid RNG-based coverage differences.
-  Part of ticket 28878.
+- When running coverage builds on Travis, we now set
+  TOR_TEST_RNG_SEED, to avoid RNG-based coverage differences. Part
+  of ticket 28878.
 
   o Minor features (maintenance):
-- Add a new "make autostyle" target that developers can use to
-  apply all automatic Tor style and consistency conversions to the
+- Add a new "make autostyle" target that developers can use to apply
+  all automatic Tor style and consistency conversions 

[tor-commits] [community/staging] Add links and Calls to Action

2019-06-05 Thread pili
commit 0410032427414d4073b5f0773aef80cb95265b0d
Author: Pili Guerra 
Date:   Thu May 30 13:35:11 2019 +0200

Add links and Calls to Action
---
 content/onion-services/setup/contents.lr | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/content/onion-services/setup/contents.lr 
b/content/onion-services/setup/contents.lr
index 0ff0556..c15a110 100644
--- a/content/onion-services/setup/contents.lr
+++ b/content/onion-services/setup/contents.lr
@@ -12,7 +12,9 @@ title: Set up your .onion Service
 ---
 subtitle: Learn how to set up a .onion of your very own.
 ---
-key: 2
+key: 1
+---
+cta: Get Started
 ---
 cta: Get Started
 ---



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


[tor-commits] [community/staging] Onion services

2019-06-05 Thread pili
commit 2680fbaf327de82adec7e106baeae0d50e8710ed
Author: Pili Guerra 
Date:   Thu May 30 13:53:53 2019 +

Onion services
---
 content/onion-services/setup/contents.lr | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/content/onion-services/setup/contents.lr 
b/content/onion-services/setup/contents.lr
index c15a110..54dd91d 100644
--- a/content/onion-services/setup/contents.lr
+++ b/content/onion-services/setup/contents.lr
@@ -16,8 +16,11 @@ key: 1
 ---
 cta: Get Started
 ---
+<<< HEAD
 cta: Get Started
 ---
+===
+>>> 456701b... Onion services
 html: onion-services.html
 ---
 body:

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


[tor-commits] [community/staging] Move images to section subfolder

2019-06-05 Thread pili
commit 5e52e407332e411bc44bfc349c1cff6dd8aa620e
Author: Pili Guerra 
Date:   Thu May 30 13:34:01 2019 +0200

Move images to section subfolder
---
 .../images/onion-services/tor-onion-services-1.png  | Bin 17222 -> 0 bytes
 .../images/onion-services/tor-onion-services-2.png  | Bin 19207 -> 0 bytes
 .../images/onion-services/tor-onion-services-3.png  | Bin 22213 -> 0 bytes
 .../images/onion-services/tor-onion-services-4.png  | Bin 21419 -> 0 bytes
 .../images/onion-services/tor-onion-services-5.png  | Bin 22165 -> 0 bytes
 .../images/onion-services/tor-onion-services-6.png  | Bin 18018 -> 0 bytes
 6 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/assets/static/images/onion-services/tor-onion-services-1.png 
b/assets/static/images/onion-services/tor-onion-services-1.png
deleted file mode 100644
index 75de366..000
Binary files a/assets/static/images/onion-services/tor-onion-services-1.png and 
/dev/null differ
diff --git a/assets/static/images/onion-services/tor-onion-services-2.png 
b/assets/static/images/onion-services/tor-onion-services-2.png
deleted file mode 100644
index 4081cdb..000
Binary files a/assets/static/images/onion-services/tor-onion-services-2.png and 
/dev/null differ
diff --git a/assets/static/images/onion-services/tor-onion-services-3.png 
b/assets/static/images/onion-services/tor-onion-services-3.png
deleted file mode 100644
index 3a948ac..000
Binary files a/assets/static/images/onion-services/tor-onion-services-3.png and 
/dev/null differ
diff --git a/assets/static/images/onion-services/tor-onion-services-4.png 
b/assets/static/images/onion-services/tor-onion-services-4.png
deleted file mode 100644
index 88db970..000
Binary files a/assets/static/images/onion-services/tor-onion-services-4.png and 
/dev/null differ
diff --git a/assets/static/images/onion-services/tor-onion-services-5.png 
b/assets/static/images/onion-services/tor-onion-services-5.png
deleted file mode 100644
index c171d71..000
Binary files a/assets/static/images/onion-services/tor-onion-services-5.png and 
/dev/null differ
diff --git a/assets/static/images/onion-services/tor-onion-services-6.png 
b/assets/static/images/onion-services/tor-onion-services-6.png
deleted file mode 100644
index 23f9f71..000
Binary files a/assets/static/images/onion-services/tor-onion-services-6.png and 
/dev/null differ



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


[tor-commits] [community/staging] Start adding onion services content

2019-06-05 Thread pili
commit 187b36ad840f624f0cecf1a82205c9c8cc49df04
Author: Pili Guerra 
Date:   Thu May 30 11:24:09 2019 +0200

Start adding onion services content
---
 .../images/onion-services/tor-onion-services-1.png  | Bin 0 -> 17222 bytes
 .../images/onion-services/tor-onion-services-2.png  | Bin 0 -> 19207 bytes
 .../images/onion-services/tor-onion-services-3.png  | Bin 0 -> 22213 bytes
 .../images/onion-services/tor-onion-services-4.png  | Bin 0 -> 21419 bytes
 .../images/onion-services/tor-onion-services-5.png  | Bin 0 -> 22165 bytes
 .../images/onion-services/tor-onion-services-6.png  | Bin 0 -> 18018 bytes
 content/onion-services/overview/contents.lr |   4 +++-
 content/onion-services/setup/contents.lr|   2 +-
 8 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/assets/static/images/onion-services/tor-onion-services-1.png 
b/assets/static/images/onion-services/tor-onion-services-1.png
new file mode 100644
index 000..75de366
Binary files /dev/null and 
b/assets/static/images/onion-services/tor-onion-services-1.png differ
diff --git a/assets/static/images/onion-services/tor-onion-services-2.png 
b/assets/static/images/onion-services/tor-onion-services-2.png
new file mode 100644
index 000..4081cdb
Binary files /dev/null and 
b/assets/static/images/onion-services/tor-onion-services-2.png differ
diff --git a/assets/static/images/onion-services/tor-onion-services-3.png 
b/assets/static/images/onion-services/tor-onion-services-3.png
new file mode 100644
index 000..3a948ac
Binary files /dev/null and 
b/assets/static/images/onion-services/tor-onion-services-3.png differ
diff --git a/assets/static/images/onion-services/tor-onion-services-4.png 
b/assets/static/images/onion-services/tor-onion-services-4.png
new file mode 100644
index 000..88db970
Binary files /dev/null and 
b/assets/static/images/onion-services/tor-onion-services-4.png differ
diff --git a/assets/static/images/onion-services/tor-onion-services-5.png 
b/assets/static/images/onion-services/tor-onion-services-5.png
new file mode 100644
index 000..c171d71
Binary files /dev/null and 
b/assets/static/images/onion-services/tor-onion-services-5.png differ
diff --git a/assets/static/images/onion-services/tor-onion-services-6.png 
b/assets/static/images/onion-services/tor-onion-services-6.png
new file mode 100644
index 000..23f9f71
Binary files /dev/null and 
b/assets/static/images/onion-services/tor-onion-services-6.png differ
diff --git a/content/onion-services/overview/contents.lr 
b/content/onion-services/overview/contents.lr
index 9ba18c6..f62f927 100644
--- a/content/onion-services/overview/contents.lr
+++ b/content/onion-services/overview/contents.lr
@@ -4,6 +4,8 @@ section_id: onion-services
 ---
 color: primary
 ---
+image: cloud-upload-alt
+---
 _template: layout.html
 ---
 title: How do .onion Services work?
@@ -129,4 +131,4 @@ 
https://svn.torproject.org/svn/projects/design-paper/tor-design.pdf
 https://gitweb.torproject.org/torspec.git/tree/rend-spec-v3.txt
 - Presentations about onion services
 https://www.youtube.com/watch?v=VmsFxBEN3fc
-https://www.youtube.com/watch?v=Di7qAVidy1Y
+https://www.youtube.com/watch?v=Di7qAVidy1Y
\ No newline at end of file
diff --git a/content/onion-services/setup/contents.lr 
b/content/onion-services/setup/contents.lr
index 08be1b7..0ff0556 100644
--- a/content/onion-services/setup/contents.lr
+++ b/content/onion-services/setup/contents.lr
@@ -12,7 +12,7 @@ title: Set up your .onion Service
 ---
 subtitle: Learn how to set up a .onion of your very own.
 ---
-key: 1
+key: 2
 ---
 cta: Get Started
 ---



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


[tor-commits] [tor/master] hs: Implement a helper to repurpose a circuit

2019-06-05 Thread nickm
commit 3789f22bcbfbc6de415a838e4c4bfb2555c7d6c3
Author: David Goulet 
Date:   Tue May 28 09:44:06 2019 -0400

hs: Implement a helper to repurpose a circuit

When we repurpose a hidden service circuit, we need to clean up from the HS
circuit map and any HS related data structured contained in the circuit.

This commit adds an helper function that does it when repurposing a hidden
service circuit.

Fixes #29034

Signed-off-by: David Goulet 
---
 changes/bug29034  |  5 +
 src/core/or/circuituse.c  |  6 ++
 src/feature/hs/hs_circuit.c   | 31 +++
 src/feature/hs/hs_circuit.h   |  1 +
 src/feature/rend/rendcommon.c | 11 +++
 src/feature/rend/rendcommon.h |  2 ++
 6 files changed, 56 insertions(+)

diff --git a/changes/bug29034 b/changes/bug29034
new file mode 100644
index 0..816b61500
--- /dev/null
+++ b/changes/bug29034
@@ -0,0 +1,5 @@
+  o Major bugfixes (Onion service reachability):
+- Properly clean up the introduction point map and associated state when
+  circuits change purpose from onion service circuits to pathbias,
+  measurement, or other circuit types. This should fix some instances of
+  introduction point failure. Fixes bug 29034; bugfix on 0.3.2.1-alpha.
diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c
index 02bfa15fb..465d64215 100644
--- a/src/core/or/circuituse.c
+++ b/src/core/or/circuituse.c
@@ -3052,6 +3052,12 @@ circuit_change_purpose(circuit_t *circ, uint8_t 
new_purpose)
 
   if (circ->purpose == new_purpose) return;
 
+  /* Take specific actions if we are repurposing a hidden service circuit. */
+  if (circuit_purpose_is_hidden_service(circ->purpose) &&
+  !circuit_purpose_is_hidden_service(new_purpose)) {
+hs_circ_repurpose(circ);
+  }
+
   if (CIRCUIT_IS_ORIGIN(circ)) {
 char old_purpose_desc[80] = "";
 
diff --git a/src/feature/hs/hs_circuit.c b/src/feature/hs/hs_circuit.c
index e3873d2f1..2e59a357b 100644
--- a/src/feature/hs/hs_circuit.c
+++ b/src/feature/hs/hs_circuit.c
@@ -24,6 +24,7 @@
 #include "feature/nodelist/describe.h"
 #include "feature/nodelist/nodelist.h"
 #include "feature/rend/rendservice.h"
+#include "feature/rend/rendcommon.h"
 #include "feature/stats/rephist.h"
 #include "lib/crypt_ops/crypto_dh.h"
 #include "lib/crypt_ops/crypto_rand.h"
@@ -1269,3 +1270,33 @@ hs_circ_cleanup(circuit_t *circ)
 hs_circuitmap_remove_circuit(circ);
   }
 }
+
+/* The given circuit will be repurposed so take the appropriate actions. A
+ * cleanup from the HS maps and of all HS related structures is done.
+ *
+ * Once this function returns, the circuit can be safely repurposed. */
+void
+hs_circ_repurpose(circuit_t *circ)
+{
+  origin_circuit_t *origin_circ;
+
+  tor_assert(circ);
+
+  /* Only repurposing an origin circuit is possible for HS. */
+  if (!CIRCUIT_IS_ORIGIN(circ)) {
+return;
+  }
+  origin_circ = TO_ORIGIN_CIRCUIT(circ);
+
+  /* First, cleanup the circuit from the HS maps. */
+  hs_circ_cleanup(circ);
+
+  /* Depending on the version, different cleanup is done. */
+  if (origin_circ->rend_data) {
+/* v2. */
+rend_circ_cleanup(origin_circ);
+  } else if (origin_circ->hs_ident) {
+/* v3. */
+hs_ident_circuit_free(origin_circ->hs_ident);
+  }
+}
diff --git a/src/feature/hs/hs_circuit.h b/src/feature/hs/hs_circuit.h
index b8d8b25ad..0786f3ee4 100644
--- a/src/feature/hs/hs_circuit.h
+++ b/src/feature/hs/hs_circuit.h
@@ -16,6 +16,7 @@
 
 /* Cleanup function when the circuit is closed or/and freed. */
 void hs_circ_cleanup(circuit_t *circ);
+void hs_circ_repurpose(circuit_t *circ);
 
 /* Circuit API. */
 int hs_circ_service_intro_has_opened(hs_service_t *service,
diff --git a/src/feature/rend/rendcommon.c b/src/feature/rend/rendcommon.c
index de48af795..b10a5863b 100644
--- a/src/feature/rend/rendcommon.c
+++ b/src/feature/rend/rendcommon.c
@@ -1045,3 +1045,14 @@ rend_circuit_pk_digest_eq(const origin_circuit_t *ocirc,
  match:
   return 1;
 }
+
+/* Cleanup the given circuit of all HS v2 data structure. */
+void
+rend_circ_cleanup(origin_circuit_t *circ)
+{
+  tor_assert(circ);
+
+  /* Both fields are set to NULL with these. */
+  crypto_pk_free(circ->intro_key);
+  rend_data_free(circ->rend_data);
+}
diff --git a/src/feature/rend/rendcommon.h b/src/feature/rend/rendcommon.h
index f136863c7..c9a04846d 100644
--- a/src/feature/rend/rendcommon.h
+++ b/src/feature/rend/rendcommon.h
@@ -71,6 +71,8 @@ int rend_non_anonymous_mode_enabled(const or_options_t 
*options);
 void assert_circ_anonymity_ok(const origin_circuit_t *circ,
   const or_options_t *options);
 
+void rend_circ_cleanup(origin_circuit_t *circ);
+
 #ifdef RENDCOMMON_PRIVATE
 
 STATIC int



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


[tor-commits] [tor/master] practracker update

2019-06-05 Thread nickm
commit ae490189f8fc5291152ce9a49b5b8a5b0e1ddf1a
Author: Nick Mathewson 
Date:   Wed Jun 5 09:06:43 2019 -0400

practracker update
---
 scripts/maint/practracker/exceptions.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/maint/practracker/exceptions.txt 
b/scripts/maint/practracker/exceptions.txt
index 1445475f5..c59648250 100644
--- a/scripts/maint/practracker/exceptions.txt
+++ b/scripts/maint/practracker/exceptions.txt
@@ -92,7 +92,7 @@ problem function-size 
/src/core/or/circuitlist.c:circuits_handle_oom() 117
 problem function-size /src/core/or/circuitmux.c:circuitmux_set_policy() 110
 problem function-size /src/core/or/circuitmux.c:circuitmux_attach_circuit() 114
 problem function-size 
/src/core/or/circuitstats.c:circuit_build_times_parse_state() 124
-problem file-size /src/core/or/circuituse.c 3156
+problem file-size /src/core/or/circuituse.c 3162
 problem function-size /src/core/or/circuituse.c:circuit_is_acceptable() 133
 problem function-size /src/core/or/circuituse.c:circuit_expire_building() 394
 problem function-size 
/src/core/or/circuituse.c:circuit_log_ancient_one_hop_circuits() 126

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


[tor-commits] [tor/master] test: Add test_hs_circ.c for HS circuit testing

2019-06-05 Thread nickm
commit 41b94722e5c93ec06911f9c63296a65ce295c1ea
Author: David Goulet 
Date:   Fri May 31 10:43:01 2019 -0400

test: Add test_hs_circ.c for HS circuit testing

For now, only tests HS circuit repurpose function.

Part of #29034

Signed-off-by: David Goulet 
---
 src/test/include.am |  1 +
 src/test/test.c |  1 +
 src/test/test.h |  1 +
 src/test/test_hs_circ.c | 70 +
 4 files changed, 73 insertions(+)

diff --git a/src/test/include.am b/src/test/include.am
index ecb768957..955016bee 100644
--- a/src/test/include.am
+++ b/src/test/include.am
@@ -132,6 +132,7 @@ src_test_test_SOURCES += \
src/test/test_hs_common.c \
src/test/test_hs_config.c \
src/test/test_hs_cell.c \
+   src/test/test_hs_circ.c \
src/test/test_hs_ntor.c \
src/test/test_hs_service.c \
src/test/test_hs_client.c  \
diff --git a/src/test/test.c b/src/test/test.c
index 58b468775..70c555815 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -877,6 +877,7 @@ struct testgroup_t testgroups[] = {
   { "legacy_hs/", hs_tests },
   { "hs_cache/", hs_cache },
   { "hs_cell/", hs_cell_tests },
+  { "hs_circ/", hs_circ_tests },
   { "hs_common/", hs_common_tests },
   { "hs_config/", hs_config_tests },
   { "hs_control/", hs_control_tests },
diff --git a/src/test/test.h b/src/test/test.h
index aacc9dba8..8a5c675bc 100644
--- a/src/test/test.h
+++ b/src/test/test.h
@@ -216,6 +216,7 @@ extern struct testcase_t geoip_tests[];
 extern struct testcase_t hs_tests[];
 extern struct testcase_t hs_cache[];
 extern struct testcase_t hs_cell_tests[];
+extern struct testcase_t hs_circ_tests[];
 extern struct testcase_t hs_common_tests[];
 extern struct testcase_t hs_config_tests[];
 extern struct testcase_t hs_control_tests[];
diff --git a/src/test/test_hs_circ.c b/src/test/test_hs_circ.c
new file mode 100644
index 0..af28af257
--- /dev/null
+++ b/src/test/test_hs_circ.c
@@ -0,0 +1,70 @@
+/* Copyright (c) 2017-2019, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file test_hs_circ.c
+ * \brief Test hidden service circuit functionality.
+ */
+
+#define CIRCUITLIST_PRIVATE
+
+#include "test/test.h"
+#include "test/test_helpers.h"
+#include "test/log_test_helpers.h"
+
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "core/or/origin_circuit_st.h"
+
+#include "feature/hs/hs_circuit.h"
+#include "feature/hs/hs_circuitmap.h"
+
+static void
+test_circuit_repurpose(void *arg)
+{
+  origin_circuit_t *intro_circ = NULL;
+  const origin_circuit_t *search;
+  ed25519_keypair_t kp;
+
+  (void) arg;
+
+  hs_init();
+
+  intro_circ = origin_circuit_init(CIRCUIT_PURPOSE_S_ESTABLISH_INTRO, 0);
+  tt_assert(intro_circ);
+  ed25519_keypair_generate(, 0);
+
+  /* Register circuit in global map and make sure it is actually there. */
+  hs_circuitmap_register_intro_circ_v3_service_side(intro_circ,
+);
+  tt_assert(TO_CIRCUIT(intro_circ)->hs_token);
+  search = hs_circuitmap_get_intro_circ_v3_service_side();
+  tt_mem_op(search, OP_EQ, intro_circ, sizeof(origin_circuit_t));
+
+  /* Setup circuit HS ident. We don't care about the service pubkey. */
+  intro_circ->hs_ident = hs_ident_circuit_new(,
+  HS_IDENT_CIRCUIT_INTRO);
+  tt_assert(intro_circ->hs_ident);
+
+  /* Trigger a repurpose. State should be cleaned up. */
+  hs_circ_repurpose(TO_CIRCUIT(intro_circ));
+
+  /* Removed from map. */
+  search = hs_circuitmap_get_intro_circ_v3_service_side();
+  tt_assert(!search);
+  /* HS identifier has been removed. */
+  tt_assert(!intro_circ->hs_ident);
+
+ done:
+  circuit_free_(TO_CIRCUIT(intro_circ));
+  hs_free_all();
+}
+
+struct testcase_t hs_circ_tests[] = {
+  { "repurpose", test_circuit_repurpose, TT_FORK,
+NULL, NULL },
+
+  END_OF_TESTCASES
+};
+



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


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

2019-06-05 Thread nickm
commit b39a8d315dcbfae002c6ced7434b6afd5a5670d1
Merge: 0c16ec4c0 41b94722e
Author: Nick Mathewson 
Date:   Wed Jun 5 09:04:09 2019 -0400

Merge remote-tracking branch 'tor-github/pr/1053'

 changes/bug29034  |  5 
 src/core/or/circuituse.c  |  6 
 src/feature/hs/hs_circuit.c   | 31 +++
 src/feature/hs/hs_circuit.h   |  1 +
 src/feature/rend/rendcommon.c | 11 +++
 src/feature/rend/rendcommon.h |  2 ++
 src/test/include.am   |  1 +
 src/test/test.c   |  1 +
 src/test/test.h   |  1 +
 src/test/test_hs_circ.c   | 70 +++
 10 files changed, 129 insertions(+)

diff --cc src/test/test.c
index cac98dd83,70c555815..d7682b661
--- a/src/test/test.c
+++ b/src/test/test.c
@@@ -866,12 -871,13 +866,13 @@@ struct testgroup_t testgroups[] = 
{ "dos/", dos_tests },
{ "entryconn/", entryconn_tests },
{ "entrynodes/", entrynodes_tests },
 -  { "guardfraction/", guardfraction_tests },
{ "extorport/", extorport_tests },
{ "geoip/", geoip_tests },
 -  { "legacy_hs/", hs_tests },
 +  { "guardfraction/", guardfraction_tests },
{ "hs_cache/", hs_cache },
{ "hs_cell/", hs_cell_tests },
+   { "hs_circ/", hs_circ_tests },
 +  { "hs_client/", hs_client_tests },
{ "hs_common/", hs_common_tests },
{ "hs_config/", hs_config_tests },
{ "hs_control/", hs_control_tests },
diff --cc src/test/test.h
index 167fd090a,8a5c675bc..b108d795e
--- a/src/test/test.h
+++ b/src/test/test.h
@@@ -215,13 -210,13 +215,14 @@@ extern struct testcase_t dns_tests[]
  extern struct testcase_t dos_tests[];
  extern struct testcase_t entryconn_tests[];
  extern struct testcase_t entrynodes_tests[];
 -extern struct testcase_t guardfraction_tests[];
  extern struct testcase_t extorport_tests[];
  extern struct testcase_t geoip_tests[];
 -extern struct testcase_t hs_tests[];
 +extern struct testcase_t guardfraction_tests[];
 +extern struct testcase_t handle_tests[];
  extern struct testcase_t hs_cache[];
  extern struct testcase_t hs_cell_tests[];
+ extern struct testcase_t hs_circ_tests[];
 +extern struct testcase_t hs_client_tests[];
  extern struct testcase_t hs_common_tests[];
  extern struct testcase_t hs_config_tests[];
  extern struct testcase_t hs_control_tests[];

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


[tor-commits] [tor/master] Document TOR_UPSTREAM_REMOTE_NAME env variable

2019-06-05 Thread nickm
commit e8aab46a3a95e6d424553625c2a671d79c583d22
Author: rl1987 
Date:   Fri May 17 19:24:26 2019 +0300

Document TOR_UPSTREAM_REMOTE_NAME env variable
---
 scripts/git/pre-push.git-hook | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/git/pre-push.git-hook b/scripts/git/pre-push.git-hook
index 00e048029..c9e72a4d4 100755
--- a/scripts/git/pre-push.git-hook
+++ b/scripts/git/pre-push.git-hook
@@ -8,6 +8,9 @@
 #
 # To install this script, copy it into .git/hooks/pre-push path in your
 # local copy of git repository. Make sure it has permission to execute.
+# Furthermore, make sure that TOR_UPSTREAM_REMOTE_NAME environment
+# variable is set to local name of git remote that corresponds to upstream
+# repository on e.g. git.torproject.org.
 #
 # The following sample script was used as starting point:
 # https://github.com/git/git/blob/master/templates/hooks--pre-push.sample



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


[tor-commits] [tor/master] pre-push.git-hook: Allow fixup and squash commits when pushing to non-upstream branches

2019-06-05 Thread nickm
commit d91d45c3433cc7dcaf1e67a84692420db870
Author: rl1987 
Date:   Wed May 1 12:41:49 2019 +0300

pre-push.git-hook: Allow fixup and squash commits when pushing to 
non-upstream branches
---
 scripts/git/pre-push.git-hook | 28 ++--
 1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/scripts/git/pre-push.git-hook b/scripts/git/pre-push.git-hook
index 740180d6f..238541d9f 100755
--- a/scripts/git/pre-push.git-hook
+++ b/scripts/git/pre-push.git-hook
@@ -16,16 +16,6 @@ echo "Running pre-push hook"
 
 z40=
 
-remote="$1"
-
-ref_is_upstream_branch() {
-if [ "$1" == "refs/heads/master" ] ||
-[[ "$1" == refs/heads/release-* ]] ||
-[[ "$1" == refs/heads/maint-* ]]
-then
-return 1
-fi
-}
 
 workdir=$(git rev-parse --show-toplevel)
 if [ -x "$workdir/.git/hooks/pre-commit" ]; then
@@ -40,6 +30,24 @@ if [ -e scripts/maint/practracker/practracker.py ]; then
   fi
 fi
 
+remote="$1"
+remote_loc="$2"
+
+if [[ "$remote_loc" != *github.com/torproject/tor.git ]] &&
+   [[ "$remote_loc" != *torproject.org/tor.git ]]; then
+  echo "Not pushing to upstream - refraining from further checks"
+  exit 0
+fi
+
+ref_is_upstream_branch() {
+if [ "$1" == "refs/heads/master" ] ||
+[[ "$1" == refs/heads/release-* ]] ||
+[[ "$1" == refs/heads/maint-* ]]
+then
+return 1
+fi
+}
+
 # shellcheck disable=SC2034
 while read -r local_ref local_sha remote_ref remote_sha
 do



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


[tor-commits] [tor/master] pre-push.git-hook: Check remote name to see if it's upstream

2019-06-05 Thread nickm
commit 6f1527f88871d16c4edf83f56ed5cdde1f6d2b82
Author: rl1987 
Date:   Sat May 11 18:58:14 2019 +0300

pre-push.git-hook: Check remote name to see if it's upstream
---
 scripts/git/pre-push.git-hook | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/git/pre-push.git-hook b/scripts/git/pre-push.git-hook
index 238541d9f..00e048029 100755
--- a/scripts/git/pre-push.git-hook
+++ b/scripts/git/pre-push.git-hook
@@ -16,6 +16,7 @@ echo "Running pre-push hook"
 
 z40=
 
+upstream_name=${TOR_UPSTREAM_REMOTE_NAME:-"upstream"}
 
 workdir=$(git rev-parse --show-toplevel)
 if [ -x "$workdir/.git/hooks/pre-commit" ]; then
@@ -33,8 +34,9 @@ fi
 remote="$1"
 remote_loc="$2"
 
-if [[ "$remote_loc" != *github.com/torproject/tor.git ]] &&
-   [[ "$remote_loc" != *torproject.org/tor.git ]]; then
+remote_name=$(git remote --verbose | grep "$2" | awk '{print $1}' | head -n 1)
+
+if [[ "$remote_name" != "$upstream_name" ]]; then
   echo "Not pushing to upstream - refraining from further checks"
   exit 0
 fi



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


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

2019-06-05 Thread nickm
commit 0c16ec4c0775db4a91a99cb935d2528233deafb2
Merge: 8cb6b2b9a e8aab46a3
Author: Nick Mathewson 
Date:   Wed Jun 5 08:32:39 2019 -0400

Merge branch 'bug30286_2_squashed'

 changes/bug30286  |  4 
 scripts/git/pre-push.git-hook | 33 +++--
 2 files changed, 27 insertions(+), 10 deletions(-)

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


[tor-commits] [tor/master] Add changes file

2019-06-05 Thread nickm
commit 0a4e68e4e24849a8d95dfa9ca0eb773b2cda6ebf
Author: rl1987 
Date:   Sat May 11 19:03:46 2019 +0300

Add changes file
---
 changes/bug30286 | 4 
 1 file changed, 4 insertions(+)

diff --git a/changes/bug30286 b/changes/bug30286
new file mode 100644
index 0..f2fc67a48
--- /dev/null
+++ b/changes/bug30286
@@ -0,0 +1,4 @@
+  o Minor bugfixes (developer tooling):
+- Fix pre-push hook to refrain from rejecting fixup and squash commits
+  when pushing to non-upstream git remote. Fixes bug 30286; bugfix on
+  0.4.0.1-alpha.



___
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 'bug29670_035' into bug29670_041

2019-06-05 Thread asn
commit 4022b6d6b7a2b5e1260c4bccbad119e8461c0b84
Merge: 180048e01 5cbd71b97
Author: Nick Mathewson 
Date:   Tue Jun 4 08:29:05 2019 -0400

Merge branch 'bug29670_035' into bug29670_041

 changes/bug29670   |  4 
 src/core/mainloop/connection.c | 33 +
 2 files changed, 25 insertions(+), 12 deletions(-)




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


[tor-commits] [tor/master] update practracker

2019-06-05 Thread asn
commit dc5cdde60c5efb1a37d919134e28b6445e235765
Author: Nick Mathewson 
Date:   Tue Jun 4 08:29:43 2019 -0400

update practracker
---
 scripts/maint/practracker/exceptions.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/maint/practracker/exceptions.txt 
b/scripts/maint/practracker/exceptions.txt
index 3a32e97be..e0db60efb 100644
--- a/scripts/maint/practracker/exceptions.txt
+++ b/scripts/maint/practracker/exceptions.txt
@@ -54,7 +54,7 @@ problem function-size 
/src/app/main/main.c:sandbox_init_filter() 291
 problem function-size /src/app/main/main.c:run_tor_main_loop() 105
 problem function-size /src/app/main/ntmain.c:nt_service_install() 125
 problem include-count /src/app/main/shutdown.c 52
-problem file-size /src/core/mainloop/connection.c 5560
+problem file-size /src/core/mainloop/connection.c 5570
 problem include-count /src/core/mainloop/connection.c 62
 problem function-size 
/src/core/mainloop/connection.c:connection_free_minimal() 185
 problem function-size 
/src/core/mainloop/connection.c:connection_listener_new() 328



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


[tor-commits] [tor/master] Fix typo in #29670 changes file.

2019-06-05 Thread asn
commit 8cb6b2b9ab74d187e4839d298fbce06dafeb33f0
Author: George Kadianakis 
Date:   Wed Jun 5 14:56:28 2019 +0300

Fix typo in #29670 changes file.
---
 changes/bug29670 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/changes/bug29670 b/changes/bug29670
index 00b0c3332..288bbbf62 100644
--- a/changes/bug29670
+++ b/changes/bug29670
@@ -1,4 +1,4 @@
   o Minor bugfixes (configuration, proxies):
 - Fix a bug that prevented us from supporting SOCKS5 proxies that want
-  authentication along with configued (but unused!)
+  authentication along with configured (but unused!)
   ClientTransportPlugins. Fixes bug 29670; bugfix on 0.2.6.1-alpha.

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


  1   2   >