tor-commits
Threads by month
- ----- 2025 -----
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
July 2017
- 14 participants
- 1743 discussions

01 Jul '17
commit 0cd2e12a31cccd62dd134aff43f1529208ec0422
Author: Damian Johnson <atagar(a)torproject.org>
Date: Wed Jun 28 11:03:56 2017 -0700
Randomize created microdescriptor fields
---
stem/descriptor/microdescriptor.py | 10 ++++------
test/unit/descriptor/microdescriptor.py | 1 -
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/stem/descriptor/microdescriptor.py b/stem/descriptor/microdescriptor.py
index 3990720..1cd1ce6 100644
--- a/stem/descriptor/microdescriptor.py
+++ b/stem/descriptor/microdescriptor.py
@@ -69,7 +69,6 @@ import hashlib
import stem.exit_policy
from stem.descriptor import (
- CRYPTO_BLOB,
Descriptor,
_descriptor_content,
_descriptor_components,
@@ -78,6 +77,7 @@ from stem.descriptor import (
_parse_simple_line,
_parse_protocol_line,
_parse_key_block,
+ _random_crypto_blob,
)
from stem.descriptor.router_status_entry import (
@@ -104,10 +104,6 @@ SINGLE_FIELDS = (
'pr',
)
-MICRODESCRIPTOR = (
- ('onion-key', '\n-----BEGIN RSA PUBLIC KEY-----%s-----END RSA PUBLIC KEY-----' % CRYPTO_BLOB),
-)
-
def _parse_file(descriptor_file, validate = False, **kwargs):
"""
@@ -267,7 +263,9 @@ class Microdescriptor(Descriptor):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, MICRODESCRIPTOR)
+ return _descriptor_content(attr, exclude, sign, (
+ ('onion-key', _random_crypto_blob('RSA PUBLIC KEY')),
+ ))
def __init__(self, raw_contents, validate = False, annotations = None):
super(Microdescriptor, self).__init__(raw_contents, lazy_load = not validate)
diff --git a/test/unit/descriptor/microdescriptor.py b/test/unit/descriptor/microdescriptor.py
index 0de947f..aab9ab4 100644
--- a/test/unit/descriptor/microdescriptor.py
+++ b/test/unit/descriptor/microdescriptor.py
@@ -83,7 +83,6 @@ class TestMicrodescriptor(unittest.TestCase):
desc = Microdescriptor.create()
- self.assertTrue(stem.descriptor.CRYPTO_BLOB in desc.onion_key)
self.assertEqual(None, desc.ntor_onion_key)
self.assertEqual([], desc.or_addresses)
self.assertEqual([], desc.family)
1
0

01 Jul '17
commit a2c6b6184f39a12607b9b10fca6fae298e2c29b2
Author: Damian Johnson <atagar(a)torproject.org>
Date: Tue Jun 27 10:35:32 2017 -0700
Randomize created extrainfo descirptor fields
---
stem/descriptor/__init__.py | 12 +++++---
stem/descriptor/extrainfo_descriptor.py | 42 +++++++++++++---------------
stem/descriptor/server_descriptor.py | 2 +-
test/unit/descriptor/extrainfo_descriptor.py | 10 ++-----
4 files changed, 31 insertions(+), 35 deletions(-)
diff --git a/stem/descriptor/__init__.py b/stem/descriptor/__init__.py
index ac9367b..f78de9a 100644
--- a/stem/descriptor/__init__.py
+++ b/stem/descriptor/__init__.py
@@ -1038,6 +1038,14 @@ def _append_router_signature(content, private_key):
return content + b'\n'.join([b'-----BEGIN SIGNATURE-----'] + stem.util.str_tools._split_by_length(signature, 64) + [b'-----END SIGNATURE-----\n'])
+def _random_nickname():
+ return ('Unnamed%i' % random.randint(0, sys.maxint))[:20]
+
+
+def _random_fingerprint():
+ return ('%040x' % random.randrange(16 ** 40)).upper()
+
+
def _random_ipv4_address():
return '%i.%i.%i.%i' % (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255), random.randint(0, 255))
@@ -1059,10 +1067,6 @@ def _random_crypto_blob(block_type = None):
return crypto_blob
-def _random_nickname():
- return ('Unnamed%i' % random.randint(0, sys.maxint))[:19]
-
-
def _descriptor_components(raw_contents, validate, extra_keywords = (), non_ascii_fields = ()):
"""
Initial breakup of the server descriptor contents to make parsing easier.
diff --git a/stem/descriptor/extrainfo_descriptor.py b/stem/descriptor/extrainfo_descriptor.py
index 3a4a0f8..08a07ab 100644
--- a/stem/descriptor/extrainfo_descriptor.py
+++ b/stem/descriptor/extrainfo_descriptor.py
@@ -77,7 +77,6 @@ import stem.util.enum
import stem.util.str_tools
from stem.descriptor import (
- CRYPTO_BLOB,
PGP_BLOCK_END,
Descriptor,
create_signing_key,
@@ -91,6 +90,10 @@ from stem.descriptor import (
_parse_forty_character_hex,
_parse_key_block,
_append_router_signature,
+ _random_nickname,
+ _random_fingerprint,
+ _random_date,
+ _random_crypto_blob,
)
try:
@@ -159,25 +162,6 @@ SINGLE_FIELDS = (
'exit-streams-opened',
)
-RELAY_EXTRAINFO_HEADER = (
- ('extra-info', 'ninja B2289C3EAB83ECD6EB916A2F481A02E6B76A0A48'),
- ('published', '2012-05-05 17:03:50'),
-)
-
-RELAY_EXTRAINFO_FOOTER = (
- ('router-signature', '\n-----BEGIN SIGNATURE-----%s-----END SIGNATURE-----' % CRYPTO_BLOB),
-)
-
-BRIDGE_EXTRAINFO_HEADER = (
- ('extra-info', 'ec2bridgereaac65a3 1EC248422B57D9C0BD751892FE787585407479A4'),
- ('published', '2012-05-05 17:03:50'),
-)
-
-BRIDGE_EXTRAINFO_FOOTER = (
- ('router-digest', '006FD96BA35E7785A6A3B8B75FE2E2435A13BDB4'),
-)
-
-
_timestamp_re = re.compile('^(.*) \(([0-9]+) s\)( .*)?$')
_locale_re = re.compile('^[a-zA-Z0-9\?]{2}$')
@@ -976,6 +960,11 @@ class RelayExtraInfoDescriptor(ExtraInfoDescriptor):
@classmethod
def content(cls, attr = None, exclude = (), sign = False, signing_key = None):
+ base_header = (
+ ('extra-info', '%s %s' % (_random_nickname(), _random_fingerprint())),
+ ('published', _random_date()),
+ )
+
if signing_key:
sign = True
@@ -986,10 +975,12 @@ class RelayExtraInfoDescriptor(ExtraInfoDescriptor):
if signing_key is None:
signing_key = create_signing_key()
- content = _descriptor_content(attr, exclude, sign, RELAY_EXTRAINFO_HEADER) + b'\nrouter-signature\n'
+ content = _descriptor_content(attr, exclude, sign, base_header) + b'\nrouter-signature\n'
return _append_router_signature(content, signing_key.private)
else:
- return _descriptor_content(attr, exclude, sign, RELAY_EXTRAINFO_HEADER, RELAY_EXTRAINFO_FOOTER)
+ return _descriptor_content(attr, exclude, sign, base_header, (
+ ('router-signature', _random_crypto_blob('SIGNATURE')),
+ ))
@classmethod
def create(cls, attr = None, exclude = (), validate = True, sign = False, signing_key = None):
@@ -1032,7 +1023,12 @@ class BridgeExtraInfoDescriptor(ExtraInfoDescriptor):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, BRIDGE_EXTRAINFO_HEADER, BRIDGE_EXTRAINFO_FOOTER)
+ return _descriptor_content(attr, exclude, sign, (
+ ('extra-info', 'ec2bridgereaac65a3 %s' % _random_fingerprint()),
+ ('published', _random_date()),
+ ), (
+ ('router-digest', _random_fingerprint()),
+ ))
def digest(self):
return self._digest
diff --git a/stem/descriptor/server_descriptor.py b/stem/descriptor/server_descriptor.py
index edd1612..793cb8d 100644
--- a/stem/descriptor/server_descriptor.py
+++ b/stem/descriptor/server_descriptor.py
@@ -68,10 +68,10 @@ from stem.descriptor import (
_parse_protocol_line,
_parse_key_block,
_append_router_signature,
+ _random_nickname,
_random_ipv4_address,
_random_date,
_random_crypto_blob,
- _random_nickname,
)
try:
diff --git a/test/unit/descriptor/extrainfo_descriptor.py b/test/unit/descriptor/extrainfo_descriptor.py
index 1f91e72..aa14b46 100644
--- a/test/unit/descriptor/extrainfo_descriptor.py
+++ b/test/unit/descriptor/extrainfo_descriptor.py
@@ -23,8 +23,8 @@ from test.unit.descriptor import (
base_expect_invalid_attr_for_text,
)
-expect_invalid_attr = functools.partial(base_expect_invalid_attr, RelayExtraInfoDescriptor, 'nickname', 'ninja')
-expect_invalid_attr_for_text = functools.partial(base_expect_invalid_attr_for_text, RelayExtraInfoDescriptor, 'nickname', 'ninja')
+expect_invalid_attr = functools.partial(base_expect_invalid_attr, RelayExtraInfoDescriptor, 'nickname', 'Unnamed')
+expect_invalid_attr_for_text = functools.partial(base_expect_invalid_attr_for_text, RelayExtraInfoDescriptor, 'nickname', 'Unnamed')
class TestExtraInfoDescriptor(unittest.TestCase):
@@ -201,9 +201,7 @@ k0d2aofcVbHr4fPQOSST0LXDrhFl5Fqo5um296zpJGvRUeO6S44U/EfJAGShtqWw
"""
desc = RelayExtraInfoDescriptor.create()
- self.assertEqual('ninja', desc.nickname)
- self.assertEqual('B2289C3EAB83ECD6EB916A2F481A02E6B76A0A48', desc.fingerprint)
- self.assertTrue(stem.descriptor.CRYPTO_BLOB in desc.signature)
+ self.assertTrue(desc.nickname.startswith('Unnamed'))
def test_unrecognized_line(self):
"""
@@ -721,8 +719,6 @@ k0d2aofcVbHr4fPQOSST0LXDrhFl5Fqo5um296zpJGvRUeO6S44U/EfJAGShtqWw
desc = BridgeExtraInfoDescriptor.create()
self.assertEqual('ec2bridgereaac65a3', desc.nickname)
- self.assertEqual('1EC248422B57D9C0BD751892FE787585407479A4', desc.fingerprint)
- self.assertEqual('006FD96BA35E7785A6A3B8B75FE2E2435A13BDB4', desc.digest())
self.assertEqual([], desc.get_unrecognized_lines())
# check that we don't have crypto fields
1
0

01 Jul '17
commit 582b9b5f9f210d01080a0a22c0811704fbb35104
Merge: 9844976 a2ff991
Author: Damian Johnson <atagar(a)torproject.org>
Date: Sat Jul 1 12:18:21 2017 -0700
Randomize fields of all descriptor types
To start we randomized attributes of server descriptors we create. Now that
that's working doing the same for all the other descriptor types.
stem/descriptor/__init__.py | 20 ++--
stem/descriptor/extrainfo_descriptor.py | 42 +++----
stem/descriptor/hidden_service_descriptor.py | 29 +++--
stem/descriptor/microdescriptor.py | 10 +-
stem/descriptor/networkstatus.py | 128 +++++++++------------
stem/descriptor/router_status_entry.py | 33 +++---
stem/descriptor/server_descriptor.py | 8 +-
test/unit/descriptor/extrainfo_descriptor.py | 10 +-
test/unit/descriptor/hidden_service_descriptor.py | 3 -
test/unit/descriptor/microdescriptor.py | 1 -
.../networkstatus/directory_authority.py | 41 ++++---
test/unit/descriptor/networkstatus/document_v2.py | 14 +--
test/unit/descriptor/networkstatus/document_v3.py | 34 ++----
.../descriptor/networkstatus/key_certificate.py | 26 ++---
test/unit/descriptor/router_status_entry.py | 32 ++----
test/unit/tutorial.py | 12 +-
test/unit/tutorial_examples.py | 12 +-
17 files changed, 195 insertions(+), 260 deletions(-)
1
0

[stem/master] Randomize created hidden service descriptor fields
by atagar@torproject.org 01 Jul '17
by atagar@torproject.org 01 Jul '17
01 Jul '17
commit 1986f7dfbd9f4281e4c7165041b0e0137f31a74e
Author: Damian Johnson <atagar(a)torproject.org>
Date: Sat Jul 1 12:15:04 2017 -0700
Randomize created hidden service descriptor fields
---
stem/descriptor/hidden_service_descriptor.py | 29 ++++++++++-------------
test/unit/descriptor/hidden_service_descriptor.py | 3 ---
2 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/stem/descriptor/hidden_service_descriptor.py b/stem/descriptor/hidden_service_descriptor.py
index f9a5e35..c78c9f0 100644
--- a/stem/descriptor/hidden_service_descriptor.py
+++ b/stem/descriptor/hidden_service_descriptor.py
@@ -31,7 +31,6 @@ import stem.util.connection
import stem.util.str_tools
from stem.descriptor import (
- CRYPTO_BLOB,
PGP_BLOCK_END,
Descriptor,
_descriptor_content,
@@ -42,6 +41,8 @@ from stem.descriptor import (
_parse_simple_line,
_parse_timestamp_line,
_parse_key_block,
+ _random_date,
+ _random_crypto_blob,
)
try:
@@ -82,20 +83,6 @@ SINGLE_INTRODUCTION_POINT_FIELDS = [
BASIC_AUTH = 1
STEALTH_AUTH = 2
-HIDDEN_SERVICE_HEADER = (
- ('rendezvous-service-descriptor', 'y3olqqblqw2gbh6phimfuiroechjjafa'),
- ('version', '2'),
- ('permanent-key', '\n-----BEGIN RSA PUBLIC KEY-----%s-----END RSA PUBLIC KEY-----' % CRYPTO_BLOB),
- ('secret-id-part', 'e24kgecavwsznj7gpbktqsiwgvngsf4e'),
- ('publication-time', '2015-02-23 20:00:00'),
- ('protocol-versions', '2,3'),
- ('introduction-points', '\n-----BEGIN MESSAGE-----\n-----END MESSAGE-----'),
-)
-
-HIDDEN_SERVICE_FOOTER = (
- ('signature', '\n-----BEGIN SIGNATURE-----%s-----END SIGNATURE-----' % CRYPTO_BLOB),
-)
-
class IntroductionPoints(collections.namedtuple('IntroductionPoints', INTRODUCTION_POINTS_ATTR.keys())):
"""
@@ -255,7 +242,17 @@ class HiddenServiceDescriptor(Descriptor):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, HIDDEN_SERVICE_HEADER, HIDDEN_SERVICE_FOOTER)
+ return _descriptor_content(attr, exclude, sign, (
+ ('rendezvous-service-descriptor', 'y3olqqblqw2gbh6phimfuiroechjjafa'),
+ ('version', '2'),
+ ('permanent-key', _random_crypto_blob('RSA PUBLIC KEY')),
+ ('secret-id-part', 'e24kgecavwsznj7gpbktqsiwgvngsf4e'),
+ ('publication-time', _random_date()),
+ ('protocol-versions', '2,3'),
+ ('introduction-points', '\n-----BEGIN MESSAGE-----\n-----END MESSAGE-----'),
+ ), (
+ ('signature', _random_crypto_blob('SIGNATURE')),
+ ))
@classmethod
def create(cls, attr = None, exclude = (), validate = True, sign = False):
diff --git a/test/unit/descriptor/hidden_service_descriptor.py b/test/unit/descriptor/hidden_service_descriptor.py
index 09d8de5..1e8c135 100644
--- a/test/unit/descriptor/hidden_service_descriptor.py
+++ b/test/unit/descriptor/hidden_service_descriptor.py
@@ -418,14 +418,11 @@ class TestHiddenServiceDescriptor(unittest.TestCase):
self.assertEqual('y3olqqblqw2gbh6phimfuiroechjjafa', desc.descriptor_id)
self.assertEqual(2, desc.version)
- self.assertTrue(stem.descriptor.CRYPTO_BLOB in desc.permanent_key)
self.assertEqual('e24kgecavwsznj7gpbktqsiwgvngsf4e', desc.secret_id_part)
- self.assertEqual(datetime.datetime(2015, 2, 23, 20, 0, 0), desc.published)
self.assertEqual([2, 3], desc.protocol_versions)
self.assertEqual('-----BEGIN MESSAGE-----\n-----END MESSAGE-----', desc.introduction_points_encoded)
self.assertEqual([], desc.introduction_points_auth)
self.assertEqual(b'', desc.introduction_points_content)
- self.assertTrue(stem.descriptor.CRYPTO_BLOB in desc.signature)
self.assertEqual([], desc.introduction_points())
def test_unrecognized_line(self):
1
0

01 Jul '17
commit 59a96efbddfab60d9a3958946b2d0a0a4525fb61
Author: Damian Johnson <atagar(a)torproject.org>
Date: Sat Jul 1 10:50:36 2017 -0700
Randomize created router status entry fields
---
stem/descriptor/router_status_entry.py | 33 +++++++++++------------
test/unit/descriptor/networkstatus/document_v3.py | 4 +--
test/unit/descriptor/router_status_entry.py | 32 ++++++++--------------
test/unit/tutorial.py | 12 ++++++---
test/unit/tutorial_examples.py | 9 ++++---
5 files changed, 43 insertions(+), 47 deletions(-)
diff --git a/stem/descriptor/router_status_entry.py b/stem/descriptor/router_status_entry.py
index c5f21bf..34e9a6a 100644
--- a/stem/descriptor/router_status_entry.py
+++ b/stem/descriptor/router_status_entry.py
@@ -35,21 +35,9 @@ from stem.descriptor import (
_descriptor_components,
_parse_protocol_line,
_read_until_keywords,
-)
-
-ROUTER_STATUS_ENTRY_V2_HEADER = (
- ('r', 'caerSidi p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE 2012-08-06 11:19:31 71.35.150.29 9001 0'),
-)
-
-ROUTER_STATUS_ENTRY_V3_HEADER = (
- ('r', 'caerSidi p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE 2012-08-06 11:19:31 71.35.150.29 9001 0'),
- ('s', 'Fast Named Running Stable Valid'),
-)
-
-ROUTER_STATUS_ENTRY_MICRO_V3_HEADER = (
- ('r', 'Konata ARIJF2zbqirB9IwsW0mQznccWww 2012-09-24 13:40:40 69.64.48.168 9001 9030'),
- ('m', 'aiUklwBrua82obG5AsTX+iEpkjQA2+AQHxZ7GwMfY70'),
- ('s', 'Fast Guard HSDir Named Running Stable V2Dir Valid'),
+ _random_nickname,
+ _random_ipv4_address,
+ _random_date,
)
_parse_pr_line = _parse_protocol_line('pr', 'protocols')
@@ -532,7 +520,9 @@ class RouterStatusEntryV2(RouterStatusEntry):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, ROUTER_STATUS_ENTRY_V2_HEADER)
+ return _descriptor_content(attr, exclude, sign, (
+ ('r', '%s p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE %s %s 9001 0' % (_random_nickname(), _random_date(), _random_ipv4_address())),
+ ))
def _name(self, is_plural = False):
return 'Router status entries (v2)' if is_plural else 'Router status entry (v2)'
@@ -632,7 +622,10 @@ class RouterStatusEntryV3(RouterStatusEntry):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, ROUTER_STATUS_ENTRY_V3_HEADER)
+ return _descriptor_content(attr, exclude, sign, (
+ ('r', '%s p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE %s %s 9001 0' % (_random_nickname(), _random_date(), _random_ipv4_address())),
+ ('s', 'Fast Named Running Stable Valid'),
+ ))
def _name(self, is_plural = False):
return 'Router status entries (v3)' if is_plural else 'Router status entry (v3)'
@@ -708,7 +701,11 @@ class RouterStatusEntryMicroV3(RouterStatusEntry):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, ROUTER_STATUS_ENTRY_MICRO_V3_HEADER)
+ return _descriptor_content(attr, exclude, sign, (
+ ('r', '%s ARIJF2zbqirB9IwsW0mQznccWww %s %s 9001 9030' % (_random_nickname(), _random_date(), _random_ipv4_address())),
+ ('m', 'aiUklwBrua82obG5AsTX+iEpkjQA2+AQHxZ7GwMfY70'),
+ ('s', 'Fast Guard HSDir Named Running Stable V2Dir Valid'),
+ ))
def _name(self, is_plural = False):
return 'Router status entries (micro v3)' if is_plural else 'Router status entry (micro v3)'
diff --git a/test/unit/descriptor/networkstatus/document_v3.py b/test/unit/descriptor/networkstatus/document_v3.py
index 3de445b..832ba9c 100644
--- a/test/unit/descriptor/networkstatus/document_v3.py
+++ b/test/unit/descriptor/networkstatus/document_v3.py
@@ -397,13 +397,13 @@ DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
consensus_file.close()
for router in consensus.routers.values():
- self.assertEqual('caerSidi', router.nickname)
+ self.assertTrue(router.nickname.startswith('Unnamed'))
# second example: using stem.descriptor.parse_file
with io.BytesIO(content) as consensus_file:
for router in stem.descriptor.parse_file(consensus_file, 'network-status-consensus-3 1.0'):
- self.assertEqual('caerSidi', router.nickname)
+ self.assertTrue(router.nickname.startswith('Unnamed'))
@test.require.cryptography
def test_signature_validation(self):
diff --git a/test/unit/descriptor/router_status_entry.py b/test/unit/descriptor/router_status_entry.py
index 166b419..a4c14e0 100644
--- a/test/unit/descriptor/router_status_entry.py
+++ b/test/unit/descriptor/router_status_entry.py
@@ -20,7 +20,6 @@ from test.unit.descriptor import (
)
from stem.descriptor.router_status_entry import (
- ROUTER_STATUS_ENTRY_V3_HEADER,
RouterStatusEntryV2,
RouterStatusEntryV3,
RouterStatusEntryMicroV3,
@@ -53,8 +52,8 @@ m 18,19,20 sha256=AkZH3gIvz3wunsroqh5izBJizdYuR7kn2oVbsvqgML8
m 21 sha256=AVp41YVxKEJCaoEf0+77Cdvyw5YgpyDXdob0+LSv/pE
"""
-expect_invalid_attr = functools.partial(base_expect_invalid_attr, RouterStatusEntryV3, 'nickname', 'caerSidi')
-expect_invalid_attr_for_text = functools.partial(base_expect_invalid_attr_for_text, RouterStatusEntryV3, 'nickname', 'caerSidi')
+expect_invalid_attr = functools.partial(base_expect_invalid_attr, RouterStatusEntryV3, 'nickname', 'Unnamed')
+expect_invalid_attr_for_text = functools.partial(base_expect_invalid_attr_for_text, RouterStatusEntryV3, 'nickname', 'Unnamed')
def vote_document():
@@ -98,11 +97,8 @@ class TestRouterStatusEntry(unittest.TestCase):
entry = RouterStatusEntryV2.create()
self.assertEqual(None, entry.document)
- self.assertEqual('caerSidi', entry.nickname)
- self.assertEqual('A7569A83B5706AB1B1A9CB52EFF7D2D32E4553EB', entry.fingerprint)
+ self.assertTrue(entry.nickname.startswith('Unnamed'))
self.assertEqual('A106452D87BD7B803B6CE916291ED368DC5BD091', entry.digest)
- self.assertEqual(datetime.datetime(2012, 8, 6, 11, 19, 31), entry.published)
- self.assertEqual('71.35.150.29', entry.address)
self.assertEqual(9001, entry.or_port)
self.assertEqual(None, entry.dir_port)
self.assertEqual(None, entry.flags)
@@ -119,11 +115,8 @@ class TestRouterStatusEntry(unittest.TestCase):
expected_flags = set([Flag.FAST, Flag.NAMED, Flag.RUNNING, Flag.STABLE, Flag.VALID])
self.assertEqual(None, entry.document)
- self.assertEqual('caerSidi', entry.nickname)
- self.assertEqual('A7569A83B5706AB1B1A9CB52EFF7D2D32E4553EB', entry.fingerprint)
+ self.assertTrue(entry.nickname.startswith('Unnamed'))
self.assertEqual('A106452D87BD7B803B6CE916291ED368DC5BD091', entry.digest)
- self.assertEqual(datetime.datetime(2012, 8, 6, 11, 19, 31), entry.published)
- self.assertEqual('71.35.150.29', entry.address)
self.assertEqual(9001, entry.or_port)
self.assertEqual(None, entry.dir_port)
self.assertEqual(expected_flags, set(entry.flags))
@@ -148,10 +141,7 @@ class TestRouterStatusEntry(unittest.TestCase):
expected_flags = set([Flag.FAST, Flag.GUARD, Flag.HSDIR, Flag.NAMED, Flag.RUNNING, Flag.STABLE, Flag.V2DIR, Flag.VALID])
self.assertEqual(None, entry.document)
- self.assertEqual('Konata', entry.nickname)
- self.assertEqual('011209176CDBAA2AC1F48C2C5B4990CE771C5B0C', entry.fingerprint)
- self.assertEqual(datetime.datetime(2012, 9, 24, 13, 40, 40), entry.published)
- self.assertEqual('69.64.48.168', entry.address)
+ self.assertTrue(entry.nickname.startswith('Unnamed'))
self.assertEqual(9001, entry.or_port)
self.assertEqual(9030, entry.dir_port)
self.assertEqual(expected_flags, set(entry.flags))
@@ -279,7 +269,7 @@ class TestRouterStatusEntry(unittest.TestCase):
self.assertRaises(ValueError, RouterStatusEntryV3, content, True)
entry = RouterStatusEntryV3(content, False)
- self.assertEqual('caerSidi', entry.nickname)
+ self.assertTrue(entry.nickname.startswith('Unnamed'))
def test_missing_r_field(self):
"""
@@ -315,7 +305,7 @@ class TestRouterStatusEntry(unittest.TestCase):
)
for value in test_values:
- r_line = ROUTER_STATUS_ENTRY_V3_HEADER[0][1].replace('caerSidi', value)
+ r_line = '%s p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE 2012-08-06 11:19:31 71.35.150.29 9001 0' % value
# TODO: Initial whitespace is consumed as part of the keyword/value
# divider. This is a bug in the case of V3 router status entries, but
@@ -344,7 +334,7 @@ class TestRouterStatusEntry(unittest.TestCase):
)
for value in test_values:
- r_line = ROUTER_STATUS_ENTRY_V3_HEADER[0][1].replace('p1aag7VwarGxqctS7/fS0y5FU+s', value)
+ r_line = 'caerSidi %s oQZFLYe9e4A7bOkWKR7TaNxb0JE 2012-08-06 11:19:31 71.35.150.29 9001 0' % value
expect_invalid_attr(self, {'r': r_line}, 'fingerprint')
def test_malformed_published_date(self):
@@ -369,7 +359,7 @@ class TestRouterStatusEntry(unittest.TestCase):
)
for value in test_values:
- r_line = ROUTER_STATUS_ENTRY_V3_HEADER[0][1].replace('2012-08-06 11:19:31', value)
+ r_line = 'caerSidi p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE %s 71.35.150.29 9001 0' % value
expect_invalid_attr(self, {'r': r_line}, 'published')
def test_malformed_address(self):
@@ -386,7 +376,7 @@ class TestRouterStatusEntry(unittest.TestCase):
)
for value in test_values:
- r_line = ROUTER_STATUS_ENTRY_V3_HEADER[0][1].replace('71.35.150.29', value)
+ r_line = 'caerSidi p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE 2012-08-06 11:19:31 %s 9001 0' % value
expect_invalid_attr(self, {'r': r_line}, 'address')
def test_malformed_port(self):
@@ -407,7 +397,7 @@ class TestRouterStatusEntry(unittest.TestCase):
if not include_or_port and not include_dir_port:
continue
- r_line = ROUTER_STATUS_ENTRY_V3_HEADER[0][1]
+ r_line = 'caerSidi p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE 2012-08-06 11:19:31 71.35.150.29 9001 0'
if include_or_port:
r_line = r_line.replace(' 9001 ', ' %s ' % value)
diff --git a/test/unit/tutorial.py b/test/unit/tutorial.py
index b0f5b71..662f1db 100644
--- a/test/unit/tutorial.py
+++ b/test/unit/tutorial.py
@@ -128,7 +128,9 @@ class TestTutorial(unittest.TestCase):
@patch('sys.stdout', new_callable = StringIO)
@patch('stem.descriptor.remote.DescriptorDownloader')
def test_mirror_mirror_on_the_wall_1(self, downloader_mock, stdout_mock):
- downloader_mock().get_consensus().run.return_value = [RouterStatusEntryV2.create()]
+ downloader_mock().get_consensus().run.return_value = [RouterStatusEntryV2.create({
+ 'r': 'caerSidi p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE 2012-08-06 11:19:31 71.35.150.29 9001 0',
+ })]
exec_documentation_example('current_descriptors.py')
self.assertEqual('found relay caerSidi (A7569A83B5706AB1B1A9CB52EFF7D2D32E4553EB)\n', stdout_mock.getvalue())
@@ -137,7 +139,9 @@ class TestTutorial(unittest.TestCase):
@patch('stem.control.Controller.from_port', spec = Controller)
def test_mirror_mirror_on_the_wall_2(self, from_port_mock, stdout_mock):
controller = from_port_mock().__enter__()
- controller.get_network_statuses.return_value = [RouterStatusEntryV2.create()]
+ controller.get_network_statuses.return_value = [RouterStatusEntryV2.create({
+ 'r': 'caerSidi p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE 2012-08-06 11:19:31 71.35.150.29 9001 0',
+ })]
exec_documentation_example('descriptor_from_tor_control_socket.py')
self.assertEqual('found relay caerSidi (A7569A83B5706AB1B1A9CB52EFF7D2D32E4553EB)\n', stdout_mock.getvalue())
@@ -151,7 +155,9 @@ class TestTutorial(unittest.TestCase):
for desc in parse_file(open('/home/atagar/.tor/cached-consensus')):
print('found relay %s (%s)' % (desc.nickname, desc.fingerprint))
- test_file = io.BytesIO(NetworkStatusDocumentV3.content(routers = [RouterStatusEntryV3.create()]))
+ test_file = io.BytesIO(NetworkStatusDocumentV3.content(routers = [RouterStatusEntryV3.create({
+ 'r': 'caerSidi p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE 2012-08-06 11:19:31 71.35.150.29 9001 0',
+ })]))
test_file.name = '/home/atagar/.tor/cached-consensus'
open_mock.return_value = test_file
diff --git a/test/unit/tutorial_examples.py b/test/unit/tutorial_examples.py
index 50e766d..b47de51 100644
--- a/test/unit/tutorial_examples.py
+++ b/test/unit/tutorial_examples.py
@@ -18,7 +18,7 @@ import stem.prereq
from stem.control import Controller
from stem.descriptor.networkstatus import NetworkStatusDocumentV3
from stem.descriptor.remote import DIRECTORY_AUTHORITIES
-from stem.descriptor.router_status_entry import ROUTER_STATUS_ENTRY_V3_HEADER, RouterStatusEntryV3
+from stem.descriptor.router_status_entry import RouterStatusEntryV3
from stem.descriptor.server_descriptor import RelayDescriptor
from stem.response import ControlMessage
from stem.util import str_type
@@ -109,7 +109,7 @@ def _get_circ_event(id, status, hop1, hop2, hop3, purpose):
def _get_router_status(address = None, port = None, nickname = None, fingerprint_base64 = None, s_line = None):
- r_line = ROUTER_STATUS_ENTRY_V3_HEADER[0][1]
+ r_line = 'caerSidi p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE 2012-08-06 11:19:31 71.35.150.29 9001 0'
if address:
r_line = r_line.replace('71.35.150.29', address)
@@ -330,7 +330,10 @@ class TestTutorialExamples(unittest.TestCase):
for fingerprint, relay in consensus.routers.items():
print('%s: %s' % (fingerprint, relay.nickname))
- network_status = NetworkStatusDocumentV3.create(routers = (RouterStatusEntryV3.create(),))
+ network_status = NetworkStatusDocumentV3.create(routers = (RouterStatusEntryV3.create({
+ 'r': 'caerSidi p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE 2012-08-06 11:19:31 71.35.150.29 9001 0',
+ }),))
+
query_mock().run.return_value = [network_status]
parse_file_mock.return_value = itertools.cycle([network_status])
1
0

01 Jul '17
commit 5caa371952aab488ae162287d599b78259b03f9b
Author: Damian Johnson <atagar(a)torproject.org>
Date: Sat Jul 1 12:03:28 2017 -0700
Randomize network status document fields
---
stem/descriptor/networkstatus.py | 128 +++++++++------------
.../networkstatus/directory_authority.py | 41 ++++---
test/unit/descriptor/networkstatus/document_v2.py | 14 +--
test/unit/descriptor/networkstatus/document_v3.py | 30 ++---
.../descriptor/networkstatus/key_certificate.py | 26 ++---
5 files changed, 99 insertions(+), 140 deletions(-)
diff --git a/stem/descriptor/networkstatus.py b/stem/descriptor/networkstatus.py
index 2fc868a..af2e41a 100644
--- a/stem/descriptor/networkstatus.py
+++ b/stem/descriptor/networkstatus.py
@@ -63,7 +63,6 @@ import stem.util.tor_tools
import stem.version
from stem.descriptor import (
- CRYPTO_BLOB,
PGP_BLOCK_END,
Descriptor,
DocumentHandler,
@@ -77,6 +76,11 @@ from stem.descriptor import (
_parse_forty_character_hex,
_parse_protocol_line,
_parse_key_block,
+ _random_nickname,
+ _random_fingerprint,
+ _random_ipv4_address,
+ _random_date,
+ _random_crypto_blob,
)
from stem.descriptor.router_status_entry import (
@@ -216,57 +220,6 @@ PARAM_RANGE = {
'onion-key-grace-period-days': (1, 90), # max is the highest onion-key-rotation-days
}
-AUTHORITY_HEADER = (
- ('dir-source', 'turtles 27B6B5996C426270A5C95488AA5BCEB6BCC86956 no.place.com 76.73.17.194 9030 9090'),
- ('contact', 'Mike Perry <email>'),
-)
-
-KEY_CERTIFICATE_HEADER = (
- ('dir-key-certificate-version', '3'),
- ('fingerprint', '27B6B5996C426270A5C95488AA5BCEB6BCC86956'),
- ('dir-key-published', '2011-11-28 21:51:04'),
- ('dir-key-expires', '2012-11-28 21:51:04'),
- ('dir-identity-key', '\n-----BEGIN RSA PUBLIC KEY-----%s-----END RSA PUBLIC KEY-----' % CRYPTO_BLOB),
- ('dir-signing-key', '\n-----BEGIN RSA PUBLIC KEY-----%s-----END RSA PUBLIC KEY-----' % CRYPTO_BLOB),
-)
-
-KEY_CERTIFICATE_FOOTER = (
- ('dir-key-certification', '\n-----BEGIN SIGNATURE-----%s-----END SIGNATURE-----' % CRYPTO_BLOB),
-)
-
-NETWORK_STATUS_DOCUMENT_HEADER_V2 = (
- ('network-status-version', '2'),
- ('dir-source', '18.244.0.114 18.244.0.114 80'),
- ('fingerprint', '719BE45DE224B607C53707D0E2143E2D423E74CF'),
- ('contact', 'arma at mit dot edu'),
- ('published', '2005-12-16 00:13:46'),
- ('dir-signing-key', '\n-----BEGIN RSA PUBLIC KEY-----%s-----END RSA PUBLIC KEY-----' % CRYPTO_BLOB),
-)
-
-NETWORK_STATUS_DOCUMENT_FOOTER_V2 = (
- ('directory-signature', 'moria2\n-----BEGIN SIGNATURE-----%s-----END SIGNATURE-----' % CRYPTO_BLOB),
-)
-
-NETWORK_STATUS_DOCUMENT_HEADER = (
- ('network-status-version', '3'),
- ('vote-status', 'consensus'),
- ('consensus-methods', None),
- ('consensus-method', None),
- ('published', None),
- ('valid-after', '2012-09-02 22:00:00'),
- ('fresh-until', '2012-09-02 22:00:00'),
- ('valid-until', '2012-09-02 22:00:00'),
- ('voting-delay', '300 300'),
- ('client-versions', None),
- ('server-versions', None),
- ('package', None),
- ('known-flags', 'Authority BadExit Exit Fast Guard HSDir Named Running Stable Unnamed V2Dir Valid'),
- ('params', None),
-)
-
-VOTE_HEADER_DEFAULTS = {'consensus-methods': '1 9', 'published': '2012-09-02 22:00:00'}
-CONSENSUS_HEADER_DEFAULTS = {'consensus-method': '9'}
-
class PackageVersion(collections.namedtuple('PackageVersion', ['name', 'version', 'url', 'digests'])):
"""
@@ -515,7 +468,16 @@ class NetworkStatusDocumentV2(NetworkStatusDocument):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, NETWORK_STATUS_DOCUMENT_HEADER_V2, NETWORK_STATUS_DOCUMENT_FOOTER_V2)
+ return _descriptor_content(attr, exclude, sign, (
+ ('network-status-version', '2'),
+ ('dir-source', '%s %s 80' % (_random_ipv4_address(), _random_ipv4_address())),
+ ('fingerprint', _random_fingerprint()),
+ ('contact', 'arma at mit dot edu'),
+ ('published', _random_date()),
+ ('dir-signing-key', _random_crypto_blob('RSA PUBLIC KEY')),
+ ), (
+ ('directory-signature', 'moria2' + _random_crypto_blob('SIGNATURE')),
+ ))
def __init__(self, raw_content, validate = False):
super(NetworkStatusDocumentV2, self).__init__(raw_content, lazy_load = not validate)
@@ -967,9 +929,12 @@ class NetworkStatusDocumentV3(NetworkStatusDocument):
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
attr = {} if attr is None else dict(attr)
-
is_vote = attr.get('vote-status') == 'vote'
- extra_defaults = VOTE_HEADER_DEFAULTS if is_vote else CONSENSUS_HEADER_DEFAULTS
+
+ if is_vote:
+ extra_defaults = {'consensus-methods': '1 9', 'published': _random_date()}
+ else:
+ extra_defaults = {'consensus-method': '9'}
if is_vote and authorities is None:
authorities = [DirectoryAuthority.create(is_vote = is_vote)]
@@ -980,7 +945,26 @@ class NetworkStatusDocumentV3(NetworkStatusDocument):
elif k not in attr:
attr[k] = v
- desc_content = _descriptor_content(attr, exclude, sign, NETWORK_STATUS_DOCUMENT_HEADER, NETWORK_STATUS_DOCUMENT_FOOTER)
+ desc_content = _descriptor_content(attr, exclude, sign, (
+ ('network-status-version', '3'),
+ ('vote-status', 'consensus'),
+ ('consensus-methods', None),
+ ('consensus-method', None),
+ ('published', None),
+ ('valid-after', _random_date()),
+ ('fresh-until', _random_date()),
+ ('valid-until', _random_date()),
+ ('voting-delay', '300 300'),
+ ('client-versions', None),
+ ('server-versions', None),
+ ('package', None),
+ ('known-flags', 'Authority BadExit Exit Fast Guard HSDir Named Running Stable Unnamed V2Dir Valid'),
+ ('params', None),
+ ), (
+ ('directory-footer', ''),
+ ('bandwidth-weights', None),
+ ('directory-signature', '%s %s%s' % (_random_fingerprint(), _random_fingerprint(), _random_crypto_blob('SIGNATURE'))),
+ ))
# inject the authorities and/or routers between the header and footer
@@ -1438,9 +1422,12 @@ class DirectoryAuthority(Descriptor):
# include mandatory 'vote-digest' if a consensus
if not is_vote and not ('vote-digest' in attr or (exclude and 'vote-digest' in exclude)):
- attr['vote-digest'] = '0B6D1E9A300B895AA2D0B427F92917B6995C3C1C'
+ attr['vote-digest'] = _random_fingerprint()
- content = _descriptor_content(attr, exclude, sign, AUTHORITY_HEADER)
+ content = _descriptor_content(attr, exclude, sign, (
+ ('dir-source', '%s %s no.place.com %s 9030 9090' % (_random_nickname(), _random_fingerprint(), _random_ipv4_address())),
+ ('contact', 'Mike Perry <email>'),
+ ))
if is_vote:
content += b'\n' + KeyCertificate.content()
@@ -1630,7 +1617,16 @@ class KeyCertificate(Descriptor):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, KEY_CERTIFICATE_HEADER, KEY_CERTIFICATE_FOOTER)
+ return _descriptor_content(attr, exclude, sign, (
+ ('dir-key-certificate-version', '3'),
+ ('fingerprint', _random_fingerprint()),
+ ('dir-key-published', _random_date()),
+ ('dir-key-expires', _random_date()),
+ ('dir-identity-key', _random_crypto_blob('RSA PUBLIC KEY')),
+ ('dir-signing-key', _random_crypto_blob('RSA PUBLIC KEY')),
+ ), (
+ ('dir-key-certification', _random_crypto_blob('SIGNATURE')),
+ ))
def __init__(self, raw_content, validate = False):
super(KeyCertificate, self).__init__(raw_content, lazy_load = not validate)
@@ -1771,17 +1767,3 @@ class BridgeNetworkStatusDocument(NetworkStatusDocument):
)
self.routers = dict((desc.fingerprint, desc) for desc in router_iter)
-
-
-DOC_SIG = DocumentSignature(
- 'sha1',
- '14C131DFC5C6F93646BE72FA1401C02A8DF2E8B4',
- 'BF112F1C6D5543CFD0A32215ACABD4197B5279AD',
- '-----BEGIN SIGNATURE-----%s-----END SIGNATURE-----' % CRYPTO_BLOB,
-)
-
-NETWORK_STATUS_DOCUMENT_FOOTER = (
- ('directory-footer', ''),
- ('bandwidth-weights', None),
- ('directory-signature', '%s %s\n%s' % (DOC_SIG.identity, DOC_SIG.key_digest, DOC_SIG.signature)),
-)
diff --git a/test/unit/descriptor/networkstatus/directory_authority.py b/test/unit/descriptor/networkstatus/directory_authority.py
index f2c270e..8c1e64e 100644
--- a/test/unit/descriptor/networkstatus/directory_authority.py
+++ b/test/unit/descriptor/networkstatus/directory_authority.py
@@ -7,11 +7,12 @@ import unittest
import test.require
from stem.descriptor.networkstatus import (
- AUTHORITY_HEADER,
DirectoryAuthority,
KeyCertificate,
)
+DIR_SOURCE_LINE = 'turtles 27B6B5996C426270A5C95488AA5BCEB6BCC86956 no.place.com 76.73.17.194 9030 9090'
+
class TestDirectoryAuthority(unittest.TestCase):
def test_minimal_consensus_authority(self):
@@ -21,15 +22,14 @@ class TestDirectoryAuthority(unittest.TestCase):
authority = DirectoryAuthority.create()
- self.assertEqual('turtles', authority.nickname)
- self.assertEqual('27B6B5996C426270A5C95488AA5BCEB6BCC86956', authority.fingerprint)
+ self.assertTrue(authority.nickname.startswith('Unnamed'))
+ self.assertEqual(40, len(authority.fingerprint))
self.assertEqual('no.place.com', authority.hostname)
- self.assertEqual('76.73.17.194', authority.address)
self.assertEqual(9030, authority.dir_port)
self.assertEqual(9090, authority.or_port)
self.assertEqual(False, authority.is_legacy)
self.assertEqual('Mike Perry <email>', authority.contact)
- self.assertEqual('0B6D1E9A300B895AA2D0B427F92917B6995C3C1C', authority.vote_digest)
+ self.assertEqual(40, len(authority.vote_digest))
self.assertEqual(None, authority.legacy_dir_key)
self.assertEqual(None, authority.key_certificate)
self.assertEqual([], authority.get_unrecognized_lines())
@@ -41,17 +41,15 @@ class TestDirectoryAuthority(unittest.TestCase):
authority = DirectoryAuthority.create(is_vote = True)
- self.assertEqual('turtles', authority.nickname)
- self.assertEqual('27B6B5996C426270A5C95488AA5BCEB6BCC86956', authority.fingerprint)
+ self.assertTrue(authority.nickname.startswith('Unnamed'))
+ self.assertEqual(40, len(authority.fingerprint))
self.assertEqual('no.place.com', authority.hostname)
- self.assertEqual('76.73.17.194', authority.address)
self.assertEqual(9030, authority.dir_port)
self.assertEqual(9090, authority.or_port)
self.assertEqual(False, authority.is_legacy)
self.assertEqual('Mike Perry <email>', authority.contact)
self.assertEqual(None, authority.vote_digest)
self.assertEqual(None, authority.legacy_dir_key)
- self.assertEqual(KeyCertificate.create(), authority.key_certificate)
self.assertEqual([], authority.get_unrecognized_lines())
@test.require.cryptography
@@ -96,7 +94,7 @@ class TestDirectoryAuthority(unittest.TestCase):
self.assertRaises(ValueError, DirectoryAuthority, content, True)
authority = DirectoryAuthority(content, False)
- self.assertEqual('turtles', authority.nickname)
+ self.assertTrue(authority.nickname.startswith('Unnamed'))
self.assertEqual(['ho-hum 567'], authority.get_unrecognized_lines())
def test_missing_fields(self):
@@ -113,14 +111,14 @@ class TestDirectoryAuthority(unittest.TestCase):
if excluded_field == 'dir-source':
self.assertEqual('Mike Perry <email>', authority.contact)
else:
- self.assertEqual('turtles', authority.nickname)
+ self.assertTrue(authority.nickname.startswith('Unnamed'))
def test_blank_lines(self):
"""
Includes blank lines, which should be ignored.
"""
- authority = DirectoryAuthority.create({'dir-source': AUTHORITY_HEADER[0][1] + '\n\n\n'})
+ authority = DirectoryAuthority.create({'dir-source': DIR_SOURCE_LINE + '\n\n\n'})
self.assertEqual('Mike Perry <email>', authority.contact)
def test_duplicate_lines(self):
@@ -135,15 +133,15 @@ class TestDirectoryAuthority(unittest.TestCase):
self.assertRaises(ValueError, DirectoryAuthority, content, True)
authority = DirectoryAuthority(content, False)
- self.assertEqual('turtles', authority.nickname)
+ self.assertTrue(authority.nickname.startswith('Unnamed'))
def test_missing_dir_source_field(self):
"""
Excludes fields from the 'dir-source' line.
"""
- for missing_value in AUTHORITY_HEADER[0][1].split(' '):
- dir_source = AUTHORITY_HEADER[0][1].replace(missing_value, '').replace(' ', ' ')
+ for missing_value in DIR_SOURCE_LINE.split(' '):
+ dir_source = DIR_SOURCE_LINE.replace(missing_value, '').replace(' ', ' ')
content = DirectoryAuthority.content({'dir-source': dir_source})
self.assertRaises(ValueError, DirectoryAuthority, content, True)
@@ -168,7 +166,7 @@ class TestDirectoryAuthority(unittest.TestCase):
)
for value in test_values:
- dir_source = AUTHORITY_HEADER[0][1].replace('27B6B5996C426270A5C95488AA5BCEB6BCC86956', value)
+ dir_source = DIR_SOURCE_LINE.replace('27B6B5996C426270A5C95488AA5BCEB6BCC86956', value)
content = DirectoryAuthority.content({'dir-source': dir_source})
self.assertRaises(ValueError, DirectoryAuthority, content, True)
@@ -190,7 +188,7 @@ class TestDirectoryAuthority(unittest.TestCase):
)
for value in test_values:
- dir_source = AUTHORITY_HEADER[0][1].replace('76.73.17.194', value)
+ dir_source = DIR_SOURCE_LINE.replace('76.73.17.194', value)
content = DirectoryAuthority.content({'dir-source': dir_source})
self.assertRaises(ValueError, DirectoryAuthority, content, True)
@@ -215,7 +213,7 @@ class TestDirectoryAuthority(unittest.TestCase):
if not include_or_port and not include_dir_port:
continue
- dir_source = AUTHORITY_HEADER[0][1]
+ dir_source = DIR_SOURCE_LINE
if include_or_port:
dir_source = dir_source.replace('9090', value)
@@ -269,11 +267,12 @@ class TestDirectoryAuthority(unittest.TestCase):
self.assertRaises(ValueError, DirectoryAuthority, content, True)
authority = DirectoryAuthority(content, False)
- self.assertEqual('turtles', authority.nickname)
+ self.assertTrue(authority.nickname.startswith('Unnamed'))
# exclude key cert from a vote
- content = DirectoryAuthority.content(is_vote = True).replace(b'\n' + key_cert, b'')
+
+ content = '\n'.join(DirectoryAuthority.content(is_vote = True).splitlines()[:-5])
self.assertRaises(ValueError, DirectoryAuthority, content, True, True)
authority = DirectoryAuthority(content, False, True)
- self.assertEqual('turtles', authority.nickname)
+ self.assertTrue(authority.nickname.startswith('Unnamed'))
diff --git a/test/unit/descriptor/networkstatus/document_v2.py b/test/unit/descriptor/networkstatus/document_v2.py
index 2ed3177..5ff66ea 100644
--- a/test/unit/descriptor/networkstatus/document_v2.py
+++ b/test/unit/descriptor/networkstatus/document_v2.py
@@ -7,12 +7,7 @@ import unittest
import test.require
-from stem.descriptor.networkstatus import (
- NETWORK_STATUS_DOCUMENT_HEADER_V2,
- NETWORK_STATUS_DOCUMENT_FOOTER_V2,
- NetworkStatusDocumentV2,
-)
-
+from stem.descriptor.networkstatus import NetworkStatusDocumentV2
from test.unit.descriptor import get_resource
@@ -101,18 +96,13 @@ TpQQk3nNQF8z6UIvdlvP+DnJV4izWVkQEZgUZgIVM0E=
self.assertEqual({}, document.routers)
self.assertEqual(2, document.version)
- self.assertEqual('18.244.0.114', document.hostname)
- self.assertEqual('18.244.0.114', document.address)
self.assertEqual(80, document.dir_port)
- self.assertEqual('719BE45DE224B607C53707D0E2143E2D423E74CF', document.fingerprint)
+ self.assertEqual(40, len(document.fingerprint))
self.assertEqual('arma at mit dot edu', document.contact)
- self.assertEqual(NETWORK_STATUS_DOCUMENT_HEADER_V2[5][1][1:], document.signing_key)
self.assertEqual([], document.client_versions)
self.assertEqual([], document.server_versions)
- self.assertEqual(datetime.datetime(2005, 12, 16, 0, 13, 46), document.published)
self.assertEqual([], document.options)
self.assertEqual('moria2', document.signing_authority)
- self.assertEqual(NETWORK_STATUS_DOCUMENT_FOOTER_V2[0][1][7:], document.signature)
@test.require.cryptography
def test_descriptor_signing(self):
diff --git a/test/unit/descriptor/networkstatus/document_v3.py b/test/unit/descriptor/networkstatus/document_v3.py
index 832ba9c..8c662a3 100644
--- a/test/unit/descriptor/networkstatus/document_v3.py
+++ b/test/unit/descriptor/networkstatus/document_v3.py
@@ -14,11 +14,11 @@ import test.require
from stem import Flag
from stem.util import str_type
+from stem.descriptor import CRYPTO_BLOB
+
from stem.descriptor.networkstatus import (
HEADER_STATUS_DOCUMENT_FIELDS,
FOOTER_STATUS_DOCUMENT_FIELDS,
- NETWORK_STATUS_DOCUMENT_FOOTER,
- DOC_SIG,
DEFAULT_PARAMS,
PackageVersion,
DirectoryAuthority,
@@ -309,9 +309,6 @@ DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
self.assertEqual(9, document.consensus_method)
self.assertEqual([], document.consensus_methods)
self.assertEqual(None, document.published)
- self.assertEqual(datetime.datetime(2012, 9, 2, 22, 0, 0), document.valid_after)
- self.assertEqual(datetime.datetime(2012, 9, 2, 22, 0, 0), document.fresh_until)
- self.assertEqual(datetime.datetime(2012, 9, 2, 22, 0, 0), document.valid_until)
self.assertEqual(300, document.vote_delay)
self.assertEqual(300, document.dist_delay)
self.assertEqual([], document.client_versions)
@@ -332,7 +329,6 @@ DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
self.assertEqual(DEFAULT_PARAMS, document.params)
self.assertEqual((), document.directory_authorities)
self.assertEqual({}, document.bandwidth_weights)
- self.assertEqual([DOC_SIG], document.signatures)
self.assertEqual([], document.get_unrecognized_lines())
def test_minimal_vote(self):
@@ -353,10 +349,6 @@ DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
self.assertEqual(True, document.is_vote)
self.assertEqual(None, document.consensus_method)
self.assertEqual([1, 9], document.consensus_methods)
- self.assertEqual(datetime.datetime(2012, 9, 2, 22, 0, 0), document.published)
- self.assertEqual(datetime.datetime(2012, 9, 2, 22, 0, 0), document.valid_after)
- self.assertEqual(datetime.datetime(2012, 9, 2, 22, 0, 0), document.fresh_until)
- self.assertEqual(datetime.datetime(2012, 9, 2, 22, 0, 0), document.valid_until)
self.assertEqual(300, document.vote_delay)
self.assertEqual(300, document.dist_delay)
self.assertEqual([], document.client_versions)
@@ -372,7 +364,6 @@ DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
self.assertEqual(None, document.shared_randomness_current_value)
self.assertEqual(DEFAULT_PARAMS, document.params)
self.assertEqual({}, document.bandwidth_weights)
- self.assertEqual([DOC_SIG], document.signatures)
self.assertEqual([], document.get_unrecognized_lines())
@test.require.cryptography
@@ -464,14 +455,11 @@ DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
# the document that the entries refer to should actually be the minimal
# descriptor (ie, without the entries)
- expected_document = NetworkStatusDocumentV3.create()
-
descriptor_file = io.BytesIO(content)
entries = list(_parse_file(descriptor_file))
self.assertEqual(entry1, entries[0])
self.assertEqual(entry2, entries[1])
- self.assertEqual(expected_document, entries[0].document)
def test_missing_fields(self):
"""
@@ -946,7 +934,6 @@ DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
self.assertRaises(ValueError, NetworkStatusDocumentV3, content, True)
document = NetworkStatusDocumentV3(content, False)
- self.assertEqual([DOC_SIG], document.signatures)
self.assertEqual([], document.get_unrecognized_lines())
# excludes a footer from a version that shouldn't have it
@@ -969,7 +956,6 @@ DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
authorities = (DirectoryAuthority.create(is_vote = True),)
)
- self.assertEqual([DOC_SIG], document.signatures)
self.assertEqual([], document.get_unrecognized_lines())
def test_footer_with_value(self):
@@ -981,7 +967,6 @@ DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
self.assertRaises(ValueError, NetworkStatusDocumentV3, content, True)
document = NetworkStatusDocumentV3(content, False)
- self.assertEqual([DOC_SIG], document.signatures)
self.assertEqual([], document.get_unrecognized_lines())
def test_bandwidth_wights_ok(self):
@@ -1059,7 +1044,7 @@ DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
document = NetworkStatusDocumentV3.create({
'network-status-version': '3 microdesc',
- 'directory-signature': 'sha256 ' + NETWORK_STATUS_DOCUMENT_FOOTER[2][1],
+ 'directory-signature': 'sha256 14C131DFC5C6F93646BE72FA1401C02A8DF2E8B4 BF112F1C6D5543CFD0A32215ACABD4197B5279AD\n-----BEGIN SIGNATURE-----%s-----END SIGNATURE-----' % CRYPTO_BLOB,
})
self.assertEqual('sha256', document.signatures[0].method)
@@ -1085,7 +1070,12 @@ DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
for test_value in test_values:
for test_attr in range(3):
- attrs = [DOC_SIG.identity, DOC_SIG.key_digest, DOC_SIG.signature]
+ attrs = [
+ '14C131DFC5C6F93646BE72FA1401C02A8DF2E8B4',
+ 'BF112F1C6D5543CFD0A32215ACABD4197B5279AD',
+ '-----BEGIN SIGNATURE-----%s-----END SIGNATURE-----' % CRYPTO_BLOB,
+ ]
+
attrs[test_attr] = test_value
content = NetworkStatusDocumentV3.content({'directory-signature': '%s %s\n%s' % tuple(attrs)})
@@ -1279,7 +1269,7 @@ DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
# make the dir-key-published field of the certiciate be malformed
authority_content = DirectoryAuthority.content(is_vote = True)
- authority_content = authority_content.replace(b'dir-key-published 2011', b'dir-key-published 2011a')
+ authority_content = authority_content.replace(b'dir-key-published 2', b'dir-key-published b2')
authority = DirectoryAuthority(authority_content, False, True)
content = NetworkStatusDocumentV3.content({'vote-status': 'vote'}, authorities = (authority,))
diff --git a/test/unit/descriptor/networkstatus/key_certificate.py b/test/unit/descriptor/networkstatus/key_certificate.py
index d7982ae..5115227 100644
--- a/test/unit/descriptor/networkstatus/key_certificate.py
+++ b/test/unit/descriptor/networkstatus/key_certificate.py
@@ -8,12 +8,7 @@ import unittest
import stem.descriptor
import test.require
-from stem.descriptor.networkstatus import (
- KEY_CERTIFICATE_HEADER,
- KEY_CERTIFICATE_FOOTER,
- KeyCertificate,
-)
-
+from stem.descriptor.networkstatus import KeyCertificate
from test.unit.descriptor import get_resource
@@ -28,13 +23,8 @@ class TestKeyCertificate(unittest.TestCase):
self.assertEqual(3, certificate.version)
self.assertEqual(None, certificate.address)
self.assertEqual(None, certificate.dir_port)
- self.assertEqual('27B6B5996C426270A5C95488AA5BCEB6BCC86956', certificate.fingerprint)
- self.assertTrue(stem.descriptor.CRYPTO_BLOB in certificate.identity_key)
- self.assertEqual(datetime.datetime(2011, 11, 28, 21, 51, 4), certificate.published)
- self.assertEqual(datetime.datetime(2012, 11, 28, 21, 51, 4), certificate.expires)
- self.assertTrue(stem.descriptor.CRYPTO_BLOB in certificate.signing_key)
+ self.assertEqual(40, len(certificate.fingerprint))
self.assertEqual(None, certificate.crosscert)
- self.assertTrue(stem.descriptor.CRYPTO_BLOB in certificate.certification)
self.assertEqual([], certificate.get_unrecognized_lines())
def test_real_certificates(self):
@@ -182,7 +172,15 @@ GM9hAsAMRX9Ogqhq5UjDNqEsvDKuyVeyh7unSZEOip9Zr6K/+7VsVPNb8vfBRBjo
Parse a key certificate where a mandatory field is missing.
"""
- mandatory_fields = [entry[0] for entry in KEY_CERTIFICATE_HEADER + KEY_CERTIFICATE_FOOTER]
+ mandatory_fields = (
+ 'dir-key-certificate-version',
+ 'fingerprint',
+ 'dir-key-published',
+ 'dir-key-expires',
+ 'dir-identity-key',
+ 'dir-signing-key',
+ 'dir-key-certification',
+ )
for excluded_field in mandatory_fields:
content = KeyCertificate.content(exclude = (excluded_field,))
@@ -193,7 +191,7 @@ GM9hAsAMRX9Ogqhq5UjDNqEsvDKuyVeyh7unSZEOip9Zr6K/+7VsVPNb8vfBRBjo
if excluded_field == 'fingerprint':
self.assertEqual(3, certificate.version)
else:
- self.assertEqual('27B6B5996C426270A5C95488AA5BCEB6BCC86956', certificate.fingerprint)
+ self.assertEqual(40, len(certificate.fingerprint))
def test_blank_lines(self):
"""
1
0

01 Jul '17
commit a2ff99195fafde3df96c667b12818aa5d9f8baec
Author: Damian Johnson <atagar(a)torproject.org>
Date: Sat Jul 1 12:15:42 2017 -0700
Drop sign arg from _descriptor_content() helper
The _descriptor_content() didn't actually use the sign arg except to do a
dependency check, which all callers already do.
---
stem/descriptor/__init__.py | 8 +-------
stem/descriptor/extrainfo_descriptor.py | 6 +++---
stem/descriptor/hidden_service_descriptor.py | 2 +-
stem/descriptor/microdescriptor.py | 2 +-
stem/descriptor/networkstatus.py | 8 ++++----
stem/descriptor/router_status_entry.py | 6 +++---
stem/descriptor/server_descriptor.py | 6 +++---
test/unit/tutorial_examples.py | 3 +--
8 files changed, 17 insertions(+), 24 deletions(-)
diff --git a/stem/descriptor/__init__.py b/stem/descriptor/__init__.py
index f78de9a..e883c55 100644
--- a/stem/descriptor/__init__.py
+++ b/stem/descriptor/__init__.py
@@ -355,7 +355,7 @@ def _parse_metrics_file(descriptor_type, major_version, minor_version, descripto
raise TypeError("Unrecognized metrics descriptor format. type: '%s', version: '%i.%i'" % (descriptor_type, major_version, minor_version))
-def _descriptor_content(attr = None, exclude = (), sign = False, header_template = (), footer_template = ()):
+def _descriptor_content(attr = None, exclude = (), header_template = (), footer_template = ()):
"""
Constructs a minimal descriptor with the given attributes. The content we
provide back is of the form...
@@ -386,18 +386,12 @@ def _descriptor_content(attr = None, exclude = (), sign = False, header_template
:param dict attr: keyword/value mappings to be included in the descriptor
:param list exclude: mandatory keywords to exclude from the descriptor
- :param bool sign: includes cryptographic signatures and digests if True
:param tuple header_template: key/value pairs for mandatory fields before unrecognized content
:param tuple footer_template: key/value pairs for mandatory fields after unrecognized content
:returns: bytes with the requested descriptor content
-
- :raises: **ImportError** if cryptography is unavailable and sign is True
"""
- if sign and not stem.prereq.is_crypto_available():
- raise ImportError('Signing descriptors requries the cryptography module')
-
header_content, footer_content = [], []
attr = {} if attr is None else dict(attr) # shallow copy since we're destructive
diff --git a/stem/descriptor/extrainfo_descriptor.py b/stem/descriptor/extrainfo_descriptor.py
index 08a07ab..bfea309 100644
--- a/stem/descriptor/extrainfo_descriptor.py
+++ b/stem/descriptor/extrainfo_descriptor.py
@@ -975,10 +975,10 @@ class RelayExtraInfoDescriptor(ExtraInfoDescriptor):
if signing_key is None:
signing_key = create_signing_key()
- content = _descriptor_content(attr, exclude, sign, base_header) + b'\nrouter-signature\n'
+ content = _descriptor_content(attr, exclude, base_header) + b'\nrouter-signature\n'
return _append_router_signature(content, signing_key.private)
else:
- return _descriptor_content(attr, exclude, sign, base_header, (
+ return _descriptor_content(attr, exclude, base_header, (
('router-signature', _random_crypto_blob('SIGNATURE')),
))
@@ -1023,7 +1023,7 @@ class BridgeExtraInfoDescriptor(ExtraInfoDescriptor):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, (
+ return _descriptor_content(attr, exclude, (
('extra-info', 'ec2bridgereaac65a3 %s' % _random_fingerprint()),
('published', _random_date()),
), (
diff --git a/stem/descriptor/hidden_service_descriptor.py b/stem/descriptor/hidden_service_descriptor.py
index c78c9f0..2e08b78 100644
--- a/stem/descriptor/hidden_service_descriptor.py
+++ b/stem/descriptor/hidden_service_descriptor.py
@@ -242,7 +242,7 @@ class HiddenServiceDescriptor(Descriptor):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, (
+ return _descriptor_content(attr, exclude, (
('rendezvous-service-descriptor', 'y3olqqblqw2gbh6phimfuiroechjjafa'),
('version', '2'),
('permanent-key', _random_crypto_blob('RSA PUBLIC KEY')),
diff --git a/stem/descriptor/microdescriptor.py b/stem/descriptor/microdescriptor.py
index 1cd1ce6..c99e371 100644
--- a/stem/descriptor/microdescriptor.py
+++ b/stem/descriptor/microdescriptor.py
@@ -263,7 +263,7 @@ class Microdescriptor(Descriptor):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, (
+ return _descriptor_content(attr, exclude, (
('onion-key', _random_crypto_blob('RSA PUBLIC KEY')),
))
diff --git a/stem/descriptor/networkstatus.py b/stem/descriptor/networkstatus.py
index af2e41a..1c0acab 100644
--- a/stem/descriptor/networkstatus.py
+++ b/stem/descriptor/networkstatus.py
@@ -468,7 +468,7 @@ class NetworkStatusDocumentV2(NetworkStatusDocument):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, (
+ return _descriptor_content(attr, exclude, (
('network-status-version', '2'),
('dir-source', '%s %s 80' % (_random_ipv4_address(), _random_ipv4_address())),
('fingerprint', _random_fingerprint()),
@@ -945,7 +945,7 @@ class NetworkStatusDocumentV3(NetworkStatusDocument):
elif k not in attr:
attr[k] = v
- desc_content = _descriptor_content(attr, exclude, sign, (
+ desc_content = _descriptor_content(attr, exclude, (
('network-status-version', '3'),
('vote-status', 'consensus'),
('consensus-methods', None),
@@ -1424,7 +1424,7 @@ class DirectoryAuthority(Descriptor):
if not is_vote and not ('vote-digest' in attr or (exclude and 'vote-digest' in exclude)):
attr['vote-digest'] = _random_fingerprint()
- content = _descriptor_content(attr, exclude, sign, (
+ content = _descriptor_content(attr, exclude, (
('dir-source', '%s %s no.place.com %s 9030 9090' % (_random_nickname(), _random_fingerprint(), _random_ipv4_address())),
('contact', 'Mike Perry <email>'),
))
@@ -1617,7 +1617,7 @@ class KeyCertificate(Descriptor):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, (
+ return _descriptor_content(attr, exclude, (
('dir-key-certificate-version', '3'),
('fingerprint', _random_fingerprint()),
('dir-key-published', _random_date()),
diff --git a/stem/descriptor/router_status_entry.py b/stem/descriptor/router_status_entry.py
index 34e9a6a..81bc63d 100644
--- a/stem/descriptor/router_status_entry.py
+++ b/stem/descriptor/router_status_entry.py
@@ -520,7 +520,7 @@ class RouterStatusEntryV2(RouterStatusEntry):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, (
+ return _descriptor_content(attr, exclude, (
('r', '%s p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE %s %s 9001 0' % (_random_nickname(), _random_date(), _random_ipv4_address())),
))
@@ -622,7 +622,7 @@ class RouterStatusEntryV3(RouterStatusEntry):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, (
+ return _descriptor_content(attr, exclude, (
('r', '%s p1aag7VwarGxqctS7/fS0y5FU+s oQZFLYe9e4A7bOkWKR7TaNxb0JE %s %s 9001 0' % (_random_nickname(), _random_date(), _random_ipv4_address())),
('s', 'Fast Named Running Stable Valid'),
))
@@ -701,7 +701,7 @@ class RouterStatusEntryMicroV3(RouterStatusEntry):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, (
+ return _descriptor_content(attr, exclude, (
('r', '%s ARIJF2zbqirB9IwsW0mQznccWww %s %s 9001 9030' % (_random_nickname(), _random_date(), _random_ipv4_address())),
('m', 'aiUklwBrua82obG5AsTX+iEpkjQA2+AQHxZ7GwMfY70'),
('s', 'Fast Guard HSDir Named Running Stable V2Dir Valid'),
diff --git a/stem/descriptor/server_descriptor.py b/stem/descriptor/server_descriptor.py
index 793cb8d..351a7ff 100644
--- a/stem/descriptor/server_descriptor.py
+++ b/stem/descriptor/server_descriptor.py
@@ -834,10 +834,10 @@ class RelayDescriptor(ServerDescriptor):
attr['signing-key'] = signing_key.public_digest
- content = _descriptor_content(attr, exclude, sign, base_header) + b'\nrouter-signature\n'
+ content = _descriptor_content(attr, exclude, base_header) + b'\nrouter-signature\n'
return _append_router_signature(content, signing_key.private)
else:
- return _descriptor_content(attr, exclude, sign, base_header, (
+ return _descriptor_content(attr, exclude, base_header, (
('router-signature', _random_crypto_blob('SIGNATURE')),
))
@@ -961,7 +961,7 @@ class BridgeDescriptor(ServerDescriptor):
if sign:
raise NotImplementedError('Signing of %s not implemented' % cls.__name__)
- return _descriptor_content(attr, exclude, sign, (
+ return _descriptor_content(attr, exclude, (
('router', '%s %s 9001 0 0' % (_random_nickname(), _random_ipv4_address())),
('router-digest', '006FD96BA35E7785A6A3B8B75FE2E2435A13BDB4'),
('published', _random_date()),
diff --git a/test/unit/tutorial_examples.py b/test/unit/tutorial_examples.py
index b47de51..ecc9b5c 100644
--- a/test/unit/tutorial_examples.py
+++ b/test/unit/tutorial_examples.py
@@ -315,9 +315,8 @@ class TestTutorialExamples(unittest.TestCase):
@patch('sys.stdout', new_callable = StringIO)
@patch('stem.descriptor.parse_file')
- @patch('%s.open' % __name__, create = True)
@patch('stem.descriptor.remote.Query')
- def test_persisting_a_consensus(self, query_mock, open_mock, parse_file_mock, stdout_mock):
+ def test_persisting_a_consensus(self, query_mock, parse_file_mock, stdout_mock):
def tutorial_example_2():
from stem.descriptor import DocumentHandler, parse_file
1
0

[translation/liveusb-creator_completed] Update translations for liveusb-creator_completed
by translation@torproject.org 01 Jul '17
by translation@torproject.org 01 Jul '17
01 Jul '17
commit f23a537d2d130d157e5b1c5c548a9b07cc7af449
Author: Translation commit bot <translation(a)torproject.org>
Date: Sat Jul 1 18:15:37 2017 +0000
Update translations for liveusb-creator_completed
---
lv/lv.po | 846 ++++++++++++++++++++++++++++++---------------------------------
1 file changed, 407 insertions(+), 439 deletions(-)
diff --git a/lv/lv.po b/lv/lv.po
index 5aeb593..ef02bec 100644
--- a/lv/lv.po
+++ b/lv/lv.po
@@ -4,15 +4,15 @@
#
# Translators:
# Jānis-Marks Gailis <jm-gailis(a)fai-vianet.fr>, 2013
-# Ojārs Balcers <ojars.balcers(a)gmail.com>, 2012
-# Ojārs Balcers <ojars.balcers(a)gmail.com>, 2013-2015
+# Ojars Balcers <ojars.balcers(a)gmail.com>, 2012,2017
+# Ojars Balcers <ojars.balcers(a)gmail.com>, 2013-2015
msgid ""
msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-11-02 21:23+0100\n"
-"PO-Revision-Date: 2016-03-21 16:31+0000\n"
-"Last-Translator: Ojārs Balcers <ojars.balcers(a)gmail.com>\n"
+"POT-Creation-Date: 2017-06-30 13:14+0200\n"
+"PO-Revision-Date: 2017-07-01 17:57+0000\n"
+"Last-Translator: Ojars Balcers <ojars.balcers(a)gmail.com>\n"
"Language-Team: Latvian (http://www.transifex.com/otf/torproject/language/lv/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -20,591 +20,559 @@ msgstr ""
"Language: lv\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);\n"
-#: ../liveusb/gui.py:451
-msgid "\"Clone & Install\""
-msgstr "\"Klonēt & instalēt\""
+#: ../tails_installer/creator.py:100
+msgid "You must run this application as root"
+msgstr "Šī lietotne jāizpilda saknes režīmā"
-#: ../liveusb/gui.py:453
-msgid "\"Install from ISO\""
-msgstr "\"Instalēt no ISO\""
+#: ../tails_installer/creator.py:146
+msgid "Extracting live image to the target device..."
+msgstr "Uz mērķa ierīces izvērš tiešo attēlu jeb live image..."
-#: ../liveusb/dialog.py:157 ../liveusb/launcher_ui.py:153
+#: ../tails_installer/creator.py:153
#, python-format
-msgid "%(distribution)s Installer"
-msgstr "%(distribution)s instalēšanas programma"
+msgid "Wrote to device at %(speed)d MB/sec"
+msgstr "Ieraksts ierīcē tika veikts ar ātrumu %(speed)d MB/sec"
-#: ../liveusb/gui.py:804
-#, python-format
-msgid "%(filename)s selected"
-msgstr "%(filename)s izvēlēts"
+#: ../tails_installer/creator.py:183
+msgid "Setting up OLPC boot file..."
+msgstr "Iestata OLPC sāknēšanas datni..."
-#: ../liveusb/gui.py:424
+#: ../tails_installer/creator.py:302
#, python-format
-msgid "%(size)s %(label)s"
-msgstr "%(size)s %(label)s"
+msgid ""
+"There was a problem executing the following command: `%(command)s`.\n"
+"A more detailed error log has been written to '%(filename)s'."
+msgstr "Radās problēmsituācija izpildot komandu: `%(command)s`.\nDetalizētāks kļūdas žurnāls tika ierakstīts '%(filename)s'."
-#: ../liveusb/gui.py:430
-#, python-format
-msgid "%(vendor)s %(model)s (%(details)s) - %(device)s"
-msgstr "%(vendor)s %(model)s (%(details)s) - %(device)s"
+#: ../tails_installer/creator.py:321
+msgid "Verifying SHA1 checksum of LiveCD image..."
+msgstr "Verificē LiveCD attēla kontrolsummu SHA1..."
-#: ../liveusb/creator.py:1097
-#, python-format
-msgid "%s already bootable"
-msgstr "%s jau ir sāknējams"
+#: ../tails_installer/creator.py:325
+msgid "Verifying SHA256 checksum of LiveCD image..."
+msgstr "Verificē LiveCD attēla kontrolsummu SHA256..."
-#: ../liveusb/launcher_ui.py:160
-msgid ""
-"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
-"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
-"p, li { white-space: pre-wrap; }\n"
-"</style></head><body style=\" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;\">\n"
-"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Need help? Read the <a href=\"file:///usr/share/doc/tails/website/doc/first_steps/installation.en.html\"><span style=\" text-decoration: underline; color:#0000ff;\">documentation</span></a>.</p></body></html>"
-msgstr "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;\">\n<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Nepieciešama palīdzība? Lasiet <a href=\"file:///usr/share/doc/tails/website/doc/first_steps/installation.en.html\"><span style=\" text-decoration: underline; color:#0000ff;\">dokumentāciju</span></a>.</p></body></html>"
-
-#: ../liveusb/launcher_ui.py:155
+#: ../tails_installer/creator.py:341
msgid ""
-"<ul>\n"
-"<li>Install Tails on another USB stick by copying the Tails system that you are currently using..</li>\n"
-"\n"
-"<li>The USB stick that you install on is formatted and all data is lost.</li>\n"
-"\n"
-"<li>The encrypted persistent storage of the Tails USB stick that you are currently using is not copied.</li>\n"
-"\n"
-"</ul>"
-msgstr "<ul>\n<li>Instalē Tails uz cita USB zibja, kopējot pašlaik lietoto Tails sistēmu.</li>\n\n<li>USB zibis, uz kura instalēs, tiks formatēts un visi dati būs izdzēsti.</li>\n\n<li>Šobrīd lietotā Tails USB zibja šifrētā, pastavīgā glabātuve netiek kopēta.</li>\n\n</ul>"
-
-#: ../liveusb/launcher_ui.py:157
-msgid ""
-"<ul>\n"
-"<li>Upgrade another Tails USB stick to the same version of Tails that you are currently using.</li>\n"
-"\n"
-"<li>The encrypted persistent storage of the Tails USB stick that you upgrade is preserved.</li>\n"
-"\n"
-"<li>The encrypted persistent storage of the Tails USB stick that you are currently using is not copied.</li>\n"
-"\n"
-"\n"
-"</ul>"
-msgstr "<ul>\n<li>Atjauniniet citu Tails USB zibi uz to pašu Tails versiju, kuru šobrīd lietojat.</li>\n\n<li>Atjaunojamā Tails USB zibja šifrētā, pastavīgā glabātuve tiek saglabāta.</li>\n\n<li>Šobrīd lietotā Tails USB zibja šifrētā, pastavīgā glabātuve netiek kopēta.</li>\n\n</ul>"
-
-#: ../liveusb/launcher_ui.py:159
-msgid ""
-"<ul>\n"
-"<li>Upgrade another Tails USB stick to the version of an ISO image.</li>\n"
-"\n"
-"<li>The encrypted persistent storage of the Tails USB stick that you upgrade is preserved.</li>\n"
-"\n"
-"<li>The encrypted persistent storage of the Tails USB stick that you are currently using is not copied.</li>\n"
-"\n"
-"</ul>"
-msgstr "<ul>\n<li>Atjauniniet citu Tails USB zibi uz ISO attēla versiju.</li>\n\n<li>Atjaunojamā Tails USB zibja šifrētā, pastavīgā glabātuve tiek saglabāta.</li>\n\n<li>Šobrīd lietotā Tails USB zibja šifrētā, pastavīgā glabātuve netiek kopēta.</li>\n\n</ul>"
-
-#: ../liveusb/dialog.py:161
-msgid "Alt+B"
-msgstr "Alt+B"
-
-#: ../liveusb/dialog.py:160
-msgid "Browse"
-msgstr "Pārlūkot"
-
-#: ../liveusb/dialog.py:167
-msgid ""
-"By allocating extra space on your USB stick for a persistent overlay, you "
-"will be able to store data and make permanent modifications to your live "
-"operating system. Without it, you will not be able to save data that will "
-"persist after a reboot."
-msgstr "Piešķirot pastāvīgam pārklājumam papildu vietu savā USB zibatmiņā, Jums būs iespēja glabāt datus un paliekoši modificēt dzīvu sistēmu, kura darbojas. To nedarot, pēc pārlādes nebūs iespējams saglabāt datus."
-
-#: ../liveusb/creator.py:1196 ../liveusb/creator.py:1459
-#, python-format
-msgid "Calculating the SHA1 of %s"
-msgstr "Aprēķina %s SHA1"
+"Error: The SHA1 of your Live CD is invalid. You can run this program with "
+"the --noverify argument to bypass this verification check."
+msgstr "Kļūda: Live CD SHA1 nav derīgs. Lai apietu šo verifikācijas pārbaudi, programmu var izpildīt ar argumentu --noverify ."
-#: ../liveusb/creator.py:1407
-msgid "Cannot find"
-msgstr "Nav iespējams atrast"
+#: ../tails_installer/creator.py:347
+msgid "Unknown ISO, skipping checksum verification"
+msgstr "Nezināms ISO, tiek izlaista kontrolsummas verifikācija"
-#: ../liveusb/creator.py:560
+#: ../tails_installer/creator.py:358
#, python-format
-msgid "Cannot find device %s"
-msgstr "Nav iespējams atrast ierīci %s"
+msgid ""
+"Not enough free space on device.\n"
+"%dMB ISO + %dMB overlay > %dMB free space"
+msgstr "Uz ierīces nav pietiekami daudz brīvas vietas.\n%dMB ISO + %dMB pārklājums > %dMB brīvas vietas"
-#: ../liveusb/creator.py:417
+#: ../tails_installer/creator.py:365
#, python-format
msgid "Creating %sMB persistent overlay"
msgstr "Rada %sMB lielu pastāvīgo pārklājumu"
-#: ../liveusb/gui.py:582
-msgid ""
-"Device is not yet mounted, so we cannot determine the amount of free space."
-msgstr "Ierīce vēl nav uzmontēta, tāpēc nav iespējams noteikt brīvas vietas daudzumu."
-
-#: ../liveusb/dialog.py:164
+#: ../tails_installer/creator.py:426
#, python-format
-msgid "Download %(distribution)s"
-msgstr "Lejuplādēt %(distribution)s"
-
-#: ../liveusb/gui.py:778
-msgid "Download complete!"
-msgstr "Lejupielāde pabeigta!"
+msgid "Unable to copy %(infile)s to %(outfile)s: %(message)s"
+msgstr "Nespēj kopēt %(infile)s uz %(outfile)s: %(message)s"
-#: ../liveusb/gui.py:782
-msgid "Download failed: "
-msgstr "Lejupielāde neizdevās: "
+#: ../tails_installer/creator.py:440
+msgid "Removing existing Live OS"
+msgstr "Noņem esošo Live OS"
-#: ../liveusb/gui.py:89
+#: ../tails_installer/creator.py:449 ../tails_installer/creator.py:460
#, python-format
-msgid "Downloading %s..."
-msgstr "Lejuplādē %s..."
-
-#: ../liveusb/creator.py:1192
-msgid "Drive is a loopback, skipping MBR reset"
-msgstr "Disks ir cilptestā, tiek izlaista MBR atiestatīšana"
+msgid "Unable to chmod %(file)s: %(message)s"
+msgstr "Nespēj chmod %(file)s: %(message)s"
-#: ../liveusb/creator.py:837
+#: ../tails_installer/creator.py:453
#, python-format
-msgid "Entering unmount_device for '%(device)s'"
-msgstr "Ievada unmount_device objektam '%(device)s'"
-
-#: ../liveusb/creator.py:1272
-msgid "Error probing device"
-msgstr "Kļūda pētot ierīci"
-
-#: ../liveusb/gui.py:213
-msgid ""
-"Error: Cannot set the label or obtain the UUID of your device. Unable to "
-"continue."
-msgstr "Kļūda: Nav iespējams iegūt ierīces UUID vai piešķirt iezīmi. Nespēj turpināt."
-
-#: ../liveusb/creator.py:393
-msgid ""
-"Error: The SHA1 of your Live CD is invalid. You can run this program with "
-"the --noverify argument to bypass this verification check."
-msgstr "Kļūda: Live CD SHA1 nav derīgs. Lai apietu šo verifikācijas pārbaudi, programmu var izpildīt ar argumentu --noverify ."
-
-#: ../liveusb/creator.py:155
-msgid "Extracting live image to the target device..."
-msgstr "Uz mērķa ierīces izvērš tiešo attēlu jeb live image..."
+msgid "Unable to remove file from previous LiveOS: %(message)s"
+msgstr "Nespēj noņemt datni no iepriekšējās LiveOS: %(message)s"
-#: ../liveusb/creator.py:1140
+#: ../tails_installer/creator.py:465
#, python-format
-msgid "Formatting %(device)s as FAT32"
-msgstr "Formatē %(device)s kā FAT32"
-
-#: ../liveusb/creator.py:150
-msgid "ISO MD5 checksum passed"
-msgstr "ISO MD5 kontrolsumma bija sekmīga"
+msgid "Unable to remove directory from previous LiveOS: %(message)s"
+msgstr "Nespēj noņemt direktoriju no iepriekšējās LiveOS: %(message)s"
-#: ../liveusb/creator.py:148
-msgid "ISO MD5 checksum verification failed"
-msgstr "ISO MD5 kontrolsummas verifikācija bija nesekmīga"
+#: ../tails_installer/creator.py:513
+#, python-format
+msgid "Cannot find device %s"
+msgstr "Nav iespējams atrast ierīci %s"
-#: ../liveusb/dialog.py:163
-msgid ""
-"If you do not select an existing Live ISO, the selected release will be "
-"downloaded for you."
-msgstr "Ja neizvēlēsities esošu Dzīvu ISO, tiks lejuplādēts atlasītais izlaidums."
+#: ../tails_installer/creator.py:678
+#, python-format
+msgid "Unable to write on %(device)s, skipping."
+msgstr "Nespēj rakstīt %(device)s, šis solis tiek izlaists."
-#: ../liveusb/launcher_ui.py:154
+#: ../tails_installer/creator.py:697
+#, python-format
msgid ""
-"Install\n"
-"by cloning"
-msgstr "Instalēt\nklonējot"
+"Some partitions of the target device %(device)s are mounted. They will be "
+"unmounted before starting the installation process."
+msgstr "Uz mērķa ierīces %(device)s ir uzmontēti daži nodalījumi. Tie tiks nomontēti pirms instalēšanas procesa sākšanas."
-#: ../liveusb/dialog.py:172
-msgid "Install Tails"
-msgstr "Instalēt Tails"
+#: ../tails_installer/creator.py:740 ../tails_installer/creator.py:964
+msgid "Unknown filesystem. Your device may need to be reformatted."
+msgstr "Nezināma datņu sistēma. Iespējams, ierīci nepieciešams pārformatēt."
-#: ../liveusb/gui.py:645
-msgid "Installation complete!"
-msgstr "Instalēšana ir pabeigta!"
+#: ../tails_installer/creator.py:743 ../tails_installer/creator.py:967
+#, python-format
+msgid "Unsupported filesystem: %s"
+msgstr "Datņu sistēma, kura netiek atbalstīta: %s"
-#: ../liveusb/gui.py:265
+#: ../tails_installer/creator.py:760
#, python-format
-msgid "Installation complete! (%s)"
-msgstr "Instalēšana pabeigta! (%s)"
+msgid "Unknown GLib exception while trying to mount device: %(message)s"
+msgstr "Nezināms GLib izņēmums, montējot ierīci: %(message)s"
-#: ../liveusb/gui.py:646
-msgid "Installation was completed. Press OK to close this program."
-msgstr "Instalēšana ir pabeigta. Nospiediet Labi, lai aizvērtu programmu."
+#: ../tails_installer/creator.py:764
+#, python-format
+msgid "Unable to mount device: %(message)s"
+msgstr "Nespēj montēt iekārtu: %(message)s"
-#: ../liveusb/creator.py:990 ../liveusb/creator.py:1313
-msgid "Installing bootloader..."
-msgstr "Instalē sāknēšanas lādētāju..."
+#: ../tails_installer/creator.py:769
+msgid "No mount points found"
+msgstr "Montēšanas punkti netika atrasti"
-#: ../liveusb/gui.py:454
+#: ../tails_installer/creator.py:780
#, python-format
-msgid ""
-"It is impossible to upgrade the device %(pretty_name)s because it was not "
-"created using Tails Installer. You should instead use %(action)s to upgrade "
-"Tails on this device."
-msgstr "Ierīci %(pretty_name)s nav iespējams atjaunināt, jo tā nav izveidota ar Tails instalēšanas programmu. Jums drīzāk vajadzētu veikt %(action)s , lai uz šīs ierīces atjauninātu Tails."
-
-#: ../liveusb/gui.py:270
-msgid "LiveUSB creation failed!"
-msgstr "LiveUSB izveide neizdevās!"
+msgid "Entering unmount_device for '%(device)s'"
+msgstr "Ievada unmount_device objektam '%(device)s'"
-#: ../liveusb/creator.py:1408
-msgid ""
-"Make sure to extract the entire liveusb-creator zip file before running this"
-" program."
-msgstr "Pirms sākat šo programmu, pārliecinieties, ka tiek izvērsta visa tilpdatne jeb zipfails liveusb-creator."
+#: ../tails_installer/creator.py:790
+#, python-format
+msgid "Unmounting mounted filesystems on '%(device)s'"
+msgstr "Nomontē uz '%(device)s' uzmontētās datņu sistēmas"
-#: ../liveusb/creator.py:1284
-msgid ""
-"Make sure your USB key is plugged in and formatted with the FAT filesystem"
-msgstr "Pārliecinieties, ka USB atslēga ir iesprausta un formatēta kā FAT datņu sistēma"
+#: ../tails_installer/creator.py:794
+#, python-format
+msgid "Unmounting '%(udi)s' on '%(device)s'"
+msgstr "Nomontē '%(udi)s' , kurš atrodas uz '%(device)s'"
-#: ../liveusb/creator.py:859
+#: ../tails_installer/creator.py:804
#, python-format
msgid "Mount %s exists after unmounting"
msgstr "Pēc nomontēšanas pastāv montējums %s"
-#: ../liveusb/gui.py:588
+#: ../tails_installer/creator.py:817
#, python-format
-msgid "No free space on device %(device)s"
-msgstr "Uz ierīces %(device)s nav brīvas vietas"
+msgid "Partitioning device %(device)s"
+msgstr "Nodalīšanas ierīce %(device)s"
-#: ../liveusb/creator.py:826
-msgid "No mount points found"
-msgstr "Montēšanas punkti netika atrasti"
+#: ../tails_installer/creator.py:895
+#, python-format
+msgid "Updating properties of system partition %(system_partition)s"
+msgstr "Jaunina sistēmas nodalījuma īpašības %(system_partition)s"
-#: ../liveusb/creator.py:410
+#: ../tails_installer/creator.py:949
#, python-format
-msgid ""
-"Not enough free space on device.\n"
-"%dMB ISO + %dMB overlay > %dMB free space"
-msgstr "Uz ierīces nav pietiekami daudz brīvas vietas.\n%dMB ISO + %dMB pārklājums > %dMB brīvas vietas"
+msgid "Unsupported device '%(device)s', please report a bug."
+msgstr "Neatbalstīta ierīce '%(device)s', lūdzu ziņojiet par šo kļūdi."
-#: ../liveusb/gui.py:569
-msgid "Partition is FAT16; Restricting overlay size to 2G"
-msgstr "Nodalījums ir FAT16; Pārklājuma izmērs tiek ierobežots līdz 2G"
+#: ../tails_installer/creator.py:952
+msgid "Trying to continue anyway."
+msgstr "Lai vai kas, cenšas turpināt."
-#: ../liveusb/gui.py:565
-msgid "Partition is FAT32; Restricting overlay size to 4G"
-msgstr "Nodalījums ir FAT32. Pārklājuma izmērs tiek ierobežots līdz 4G."
+#: ../tails_installer/creator.py:961 ../tails_installer/creator.py:1354
+msgid "Verifying filesystem..."
+msgstr "Verificē datņu sistēmu..."
-#: ../liveusb/creator.py:236 ../liveusb/creator.py:866
+#: ../tails_installer/creator.py:985
#, python-format
-msgid "Partitioning device %(device)s"
-msgstr "Nodalīšanas ierīce %(device)s"
+msgid "Unable to change volume label: %(message)s"
+msgstr "Nespēj mainīt sējuma iezīmi: %(message)s"
-#: ../liveusb/gui.py:636
-msgid "Persistent Storage"
-msgstr "Pastāvīgā krātuve"
+#: ../tails_installer/creator.py:990 ../tails_installer/creator.py:1387
+msgid "Installing bootloader..."
+msgstr "Instalē sāknēšanas lādētāju..."
-#: ../liveusb/dialog.py:168
-msgid "Persistent Storage (0 MB)"
-msgstr "Pastāvīga glabātuve (0 MB)"
+#: ../tails_installer/creator.py:1016
+#, python-format
+msgid "Could not find the '%s' COM32 module"
+msgstr "Neizdevās atrast '%s' COM32 moduli"
-#: ../liveusb/gui.py:698 ../liveusb/gui.py:727
-msgid "Please confirm your device selection"
-msgstr "Lūdzu, apstipriniet savu ierīces izvēli"
+#: ../tails_installer/creator.py:1024 ../tails_installer/creator.py:1405
+#, python-format
+msgid "Removing %(file)s"
+msgstr "Noņem %(file)s"
-#: ../liveusb/gui.py:481
-msgid "Refreshing releases..."
-msgstr "Atsvaidzinoši izlaidumi..."
+#: ../tails_installer/creator.py:1136
+#, python-format
+msgid "%s already bootable"
+msgstr "%s jau ir sāknējams"
-#: ../liveusb/gui.py:486
-msgid "Releases updated!"
-msgstr "Laidieni atjaunināti!"
+#: ../tails_installer/creator.py:1156
+msgid "Unable to find partition"
+msgstr "Nespēj atrast nodalījumu"
-#: ../liveusb/creator.py:997 ../liveusb/creator.py:1331
+#: ../tails_installer/creator.py:1179
#, python-format
-msgid "Removing %(file)s"
-msgstr "Noņem %(file)s"
+msgid "Formatting %(device)s as FAT32"
+msgstr "Formatē %(device)s kā FAT32"
-#: ../liveusb/creator.py:492
-msgid "Removing existing Live OS"
-msgstr "Noņem esošo Live OS"
+#: ../tails_installer/creator.py:1239
+msgid "Could not find syslinux' gptmbr.bin"
+msgstr "Neizdevās atrast syslinux' gptmbr.bin"
+
+#: ../tails_installer/creator.py:1252
+#, python-format
+msgid "Reading extracted MBR from %s"
+msgstr "Lasa no %s izgūto MBR "
+
+#: ../tails_installer/creator.py:1256
+#, python-format
+msgid "Could not read the extracted MBR from %(path)s"
+msgstr "Neidzevās nolasīt no %(path)s izgūto MBR"
-#: ../liveusb/creator.py:1186
+#: ../tails_installer/creator.py:1269 ../tails_installer/creator.py:1270
#, python-format
msgid "Resetting Master Boot Record of %s"
msgstr "Atiestata %s pamatsāknēšanas ierakstu jeb MBR"
-#: ../liveusb/gui.py:789
-msgid "Select Live ISO"
-msgstr "Izvēlēties Live ISO"
-
-#: ../liveusb/creator.py:192
-msgid "Setting up OLPC boot file..."
-msgstr "Iestata OLPC sāknēšanas datni..."
+#: ../tails_installer/creator.py:1275
+msgid "Drive is a loopback, skipping MBR reset"
+msgstr "Disks ir cilptestā, tiek izlaista MBR atiestatīšana"
-#: ../liveusb/creator.py:742
+#: ../tails_installer/creator.py:1279 ../tails_installer/creator.py:1533
#, python-format
-msgid ""
-"Some partitions of the target device %(device)s are mounted. They will be "
-"unmounted before starting the installation process."
-msgstr "Uz mērķa ierīces %(device)s ir uzmontēti daži nodalījumi. Tie tiks nomontēti pirms instalēšanas procesa sākšanas."
-
-#: ../liveusb/creator.py:141
-msgid ""
-"Source type does not support verification of ISO MD5 checksum, skipping"
-msgstr "Avota veids neatbalsta ISO kontrolsummas MD5 verifikāciju, šis solis tiek izlaists"
+msgid "Calculating the SHA1 of %s"
+msgstr "Aprēķina %s SHA1"
-#: ../liveusb/creator.py:1220
+#: ../tails_installer/creator.py:1304
msgid "Synchronizing data on disk..."
msgstr "Sinhronizē datus uz diska..."
-#: ../liveusb/dialog.py:166
-msgid "Target Device"
-msgstr "Mērķierīce"
+#: ../tails_installer/creator.py:1346
+msgid "Error probing device"
+msgstr "Kļūda pētot ierīci"
-#: ../liveusb/gui.py:438
-#, python-format
-msgid ""
-"The device \"%(pretty_name)s\" is too small to install Tails (at least "
-"%(size)s GB is required)."
-msgstr "Ierīce \"%(pretty_name)s\" ir pārāk maza, lai instalētu Tails (ir nepieciešams vismaz %(size)s GB)."
+#: ../tails_installer/creator.py:1348
+msgid "Unable to find any supported device"
+msgstr "Nevarēja atrast jebkādu atbalstītu ierīci"
-#: ../liveusb/gui.py:792
+#: ../tails_installer/creator.py:1358
msgid ""
-"The selected file is unreadable. Please fix its permissions or select "
-"another file."
-msgstr "Atlasīto datni nav iespējams lasīt. Lūdzu sakārtojiet atļaujas vai izvēlieties citu datni. "
+"Make sure your USB key is plugged in and formatted with the FAT filesystem"
+msgstr "Pārliecinieties, ka USB atslēga ir iesprausta un formatēta kā FAT datņu sistēma"
-#: ../liveusb/creator.py:354
+#: ../tails_installer/creator.py:1361
#, python-format
msgid ""
-"There was a problem executing the following command: `%(command)s`.\n"
-"A more detailed error log has been written to '%(filename)s'."
-msgstr "Radās problēmsituācija izpildot komandu: `%(command)s`.\nDetalizētāks kļūdas žurnāls tika ierakstīts '%(filename)s'."
+"Unsupported filesystem: %s\n"
+"Please backup and format your USB key with the FAT filesystem."
+msgstr "Neatbalstīta datņu sistēma: %s\nLūdzu veiciet datu rezerves kopēšanu un formatējiet savu USB atslēgu kā FAT datņu sistēmu."
-#: ../liveusb/dialog.py:158
+#: ../tails_installer/creator.py:1428
msgid ""
-"This button allows you to browse for an existing Live system ISO that you "
-"have previously downloaded. If you do not select one, a release will be "
-"downloaded for you automatically."
-msgstr "Šī poga ļauj meklēt esošu, iepriekš lejuplādētu Dzīvu sistēmu ISO. Neatzīmējot nevienu, automātiski tiks lejuplādēts laidiens."
+"Unable to get Win32_LogicalDisk; win32com query did not return any results"
+msgstr "Nespēj sasniegt Win32_LogicalDisk; win32com vaicājums nesniedza atbildes"
+
+#: ../tails_installer/creator.py:1481
+msgid "Cannot find"
+msgstr "Nav iespējams atrast"
-#: ../liveusb/dialog.py:171
+#: ../tails_installer/creator.py:1482
msgid ""
-"This button will begin the LiveUSB creation process. This entails "
-"optionally downloading a release (if an existing one wasn't selected), "
-"extracting the ISO to the USB device, creating the persistent overlay, and "
-"installing the bootloader."
-msgstr "Šī poga aizsāk LiveUSB izveides procesu. Tas nozīmē laidiena lejuplādi (pēc izvēles, un, ja nav atlasīts esošs laidiens), ISO izvēršanu uz USB zibatmiņas ierīces, pastāvīga pārklājuma izveidošanu un sāknēšanas ielādētāja instalāciju."
+"Make sure to extract the entire tails-installer zip file before running this"
+" program."
+msgstr "Pirms izpildat šo programmu, pārliecinieties, ka izgūta visa tails-instalētāja zip datne."
-#: ../liveusb/dialog.py:165
+#: ../tails_installer/gui.py:69
+#, python-format
+msgid "Unknown release: %s"
+msgstr "Nezināms laidiens: %s"
+
+#: ../tails_installer/gui.py:73
+#, python-format
+msgid "Downloading %s..."
+msgstr "Lejuplādē %s..."
+
+#: ../tails_installer/gui.py:204
msgid ""
-"This is the USB stick that you want to install your Live system on. This "
-"device must be formatted with the FAT filesystem."
-msgstr "Uz šīs USB zibatmiņas vēlaties instalēt savu Dzīvo sistēmu. Šī ierīce jāformatē ar datņu sistēmu FAT."
+"Error: Cannot set the label or obtain the UUID of your device. Unable to "
+"continue."
+msgstr "Kļūda: Nav iespējams iegūt ierīces UUID vai piešķirt iezīmi. Nespēj turpināt."
+
+#: ../tails_installer/gui.py:253
+#, python-format
+msgid "Installation complete! (%s)"
+msgstr "Instalēšana pabeigta! (%s)"
-#: ../liveusb/dialog.py:170
+#: ../tails_installer/gui.py:258
+msgid "Tails installation failed!"
+msgstr "Tails instalācija neizdevās!"
+
+#: ../tails_installer/gui.py:353
msgid ""
-"This is the progress bar that will indicate how far along in the LiveUSB "
-"creation process you are"
-msgstr "Norises josla rāda cik tālu aizritējis LiveUSB izveidošanas process"
+"Warning: This tool needs to be run as an Administrator. To do this, right "
+"click on the icon and open the Properties. Under the Compatibility tab, "
+"check the \"Run this program as an administrator\" box."
+msgstr "Brīdinājums: Šis rīks jālieto administratora režīmā. Lai to izdarītu, ar labo peles taustiņu noklikšķiniet uz ikonas un atveriet Rekvizītus. Verot cilni Savietojamība, atzīmējiet lodziņu \"Izpildīt programmu administratora režīmā\"."
-#: ../liveusb/dialog.py:169
-msgid "This is the status console, where all messages get written to."
-msgstr "Šis ir statusa žurnāls, kurā tiek ierakstīti visi ziņojumi."
+#: ../tails_installer/gui.py:365 ../tails_installer/launcher.py:31
+msgid "Tails Installer"
+msgstr "Tails instalētājs"
-#: ../liveusb/creator.py:952
-msgid "Trying to continue anyway."
-msgstr "Lai vai kas, cenšas turpināt."
+#: ../tails_installer/gui.py:440
+msgid "No device suitable to install Tails could be found"
+msgstr "Neizdevās atrast nevienu ierīci, kas spēj instalēt Tails"
-#: ../liveusb/gui.py:464
-msgid "USB drive found"
-msgstr "Atrasts USB disks"
+#: ../tails_installer/gui.py:442
+#, python-format
+msgid "Please plug a USB flash drive or SD card of at least %0.1f GB."
+msgstr "Lūdzu pievienojiet USB zibatmiņu vai SD karti, kuru ietilpība ir vismaz %0.1f GB."
-#: ../liveusb/creator.py:985
+#: ../tails_installer/gui.py:474
#, python-format
-msgid "Unable to change volume label: %(message)s"
-msgstr "Nespēj mainīt sējuma iezīmi: %(message)s"
+msgid "%(size)s %(label)s"
+msgstr "%(size)s %(label)s"
-#: ../liveusb/creator.py:501 ../liveusb/creator.py:512
+#: ../tails_installer/gui.py:480
#, python-format
-msgid "Unable to chmod %(file)s: %(message)s"
-msgstr "Nespēj chmod %(file)s: %(message)s"
+msgid "%(vendor)s %(model)s (%(details)s) - %(device)s"
+msgstr "%(vendor)s %(model)s (%(details)s) - %(device)s"
-#: ../liveusb/creator.py:478
+#: ../tails_installer/gui.py:488
#, python-format
-msgid "Unable to copy %(infile)s to %(outfile)s: %(message)s"
-msgstr "Nespēj kopēt %(infile)s uz %(outfile)s: %(message)s"
+msgid ""
+"The USB stick \"%(pretty_name)s\" is configured as non-removable by its "
+"manufacturer and Tails will fail to start on it. Please try installing on a "
+"different model."
+msgstr "USB disku \"%(pretty_name)s\" tā ražotājs ir nokonfigurējis kā nenoņemamu, un Tails neizdosies no tā startēt. Lūdzu mēģiniet instalēt uz cita modeļa."
-#: ../liveusb/gui.py:403
-msgid "Unable to find any USB drive"
-msgstr "Nespēj atrast vismaz vienu USB disku"
+#: ../tails_installer/gui.py:498
+#, python-format
+msgid ""
+"The device \"%(pretty_name)s\" is too small to install Tails (at least "
+"%(size)s GB is required)."
+msgstr "Ierīce \"%(pretty_name)s\" ir pārāk maza, lai instalētu Tails (ir nepieciešams vismaz %(size)s GB)."
-#: ../liveusb/creator.py:1274
-msgid "Unable to find any supported device"
-msgstr "Nevarēja atrast jebkādu atbalstītu ierīci"
+#: ../tails_installer/gui.py:511
+msgid "\"Install by cloning\""
+msgstr "\"Instalēt klonējot\""
-#: ../liveusb/creator.py:1117
-msgid "Unable to find partition"
-msgstr "Nespēj atrast nodalījumu"
+#: ../tails_installer/gui.py:513
+msgid "\"Install from ISO\""
+msgstr "\"Instalēt no ISO\""
-#: ../liveusb/creator.py:1354
+#: ../tails_installer/gui.py:514
+#, python-format
msgid ""
-"Unable to get Win32_LogicalDisk; win32com query did not return any results"
-msgstr "Nespēj sasniegt Win32_LogicalDisk; win32com vaicājums nesniedza atbildes"
+"It is impossible to upgrade the device %(pretty_name)s because it was not "
+"created using Tails Installer. You should instead use %(action)s to upgrade "
+"Tails on this device."
+msgstr "Ierīci %(pretty_name)s nav iespējams atjaunināt, jo tā nav izveidota ar Tails instalēšanas programmu. Jums drīzāk vajadzētu veikt %(action)s , lai uz šīs ierīces atjauninātu Tails."
+
+#: ../tails_installer/gui.py:533
+msgid "An error happened while installing Tails"
+msgstr "Instalējot Tails radās kļūda"
+
+#: ../tails_installer/gui.py:545
+msgid "Refreshing releases..."
+msgstr "Atsvaidzinoši izlaidumi..."
+
+#: ../tails_installer/gui.py:550
+msgid "Releases updated!"
+msgstr "Laidieni atjaunināti!"
-#: ../liveusb/gui.py:691
+#: ../tails_installer/gui.py:589
+msgid "Installation complete!"
+msgstr "Instalēšana ir pabeigta!"
+
+#: ../tails_installer/gui.py:590
+msgid "Installation was completed."
+msgstr "Instalācija ir pabeigta."
+
+#: ../tails_installer/gui.py:635
msgid "Unable to mount device"
msgstr "Nespēj uzmontēt ierīci"
-#: ../liveusb/creator.py:814
-#, python-format
-msgid "Unable to mount device: %(message)s"
-msgstr "Nespēj montēt iekārtu: %(message)s"
+#: ../tails_installer/gui.py:642 ../tails_installer/gui.py:670
+msgid "Please confirm your device selection"
+msgstr "Lūdzu, apstipriniet savu ierīces izvēli"
-#: ../liveusb/creator.py:517
+#: ../tails_installer/gui.py:643
#, python-format
-msgid "Unable to remove directory from previous LiveOS: %(message)s"
-msgstr "Nespēj noņemt direktoriju no iepriekšējās LiveOS: %(message)s"
+msgid ""
+"You are going to install Tails on the %(size)s %(vendor)s %(model)s device "
+"(%(device)s). All data on the selected device will be lost. Continue?"
+msgstr "Tūliņ Jūs instalēsit Tails uz %(size)s %(vendor)s %(model)s ierīces (%(device)s). Uz izvēlētās ierīces pazudīs visi dati. Vai turpināt?"
-#: ../liveusb/creator.py:505
+#: ../tails_installer/gui.py:660
#, python-format
-msgid "Unable to remove file from previous LiveOS: %(message)s"
-msgstr "Nespēj noņemt datni no iepriekšējās LiveOS: %(message)s"
+msgid ""
+"You are going to upgrade Tails on the %(parent_size)s %(vendor)s %(model)s "
+"device (%(device)s). Any persistent volume on this device will remain "
+"unchanged. Continue?"
+msgstr "Tūliņ Jūs jaunināsiet Tails uz %(parent_size)s %(vendor)s %(model)s ierīces (%(device)s). Uz šīs ierīces ikviens pastāvīgs sējums paliks nemainīts. Vai turpināt?"
+
+#: ../tails_installer/gui.py:716
+msgid "Download complete!"
+msgstr "Lejupielāde pabeigta!"
-#: ../liveusb/creator.py:1189
+#: ../tails_installer/gui.py:720
+msgid "Download failed: "
+msgstr "Lejupielāde neizdevās: "
+
+#: ../tails_installer/gui.py:721
+msgid "You can try again to resume your download"
+msgstr "Variet vēlreiz mēģināt atjaunot lejupielādi"
+
+#: ../tails_installer/gui.py:729
msgid ""
-"Unable to reset MBR. You may not have the `syslinux` package installed."
-msgstr "Nespēj atiestatīt MBR. Iespējams, ka nav instalēta pakotne `syslinux`."
+"The selected file is unreadable. Please fix its permissions or select "
+"another file."
+msgstr "Atlasīto datni nav iespējams lasīt. Lūdzu sakārtojiet atļaujas vai izvēlieties citu datni. "
-#: ../liveusb/gui.py:798
+#: ../tails_installer/gui.py:735
msgid ""
"Unable to use the selected file. You may have better luck if you move your "
"ISO to the root of your drive (ie: C:\\)"
msgstr "Nespēj lietot atlasīto datni. Iespējams, veiktos labāk, ja ISO tiktu pārvietots uz diska sakni (proti, C:\\)"
-#: ../liveusb/creator.py:723
-#, python-format
-msgid "Unable to write on %(device)s, skipping."
-msgstr "Nespēj rakstīt %(device)s, šis solis tiek izlaists."
-
-#: ../liveusb/creator.py:399
-msgid "Unknown ISO, skipping checksum verification"
-msgstr "Nezināms ISO, tiek izlaista kontrolsummas verifikācija"
-
-#: ../liveusb/creator.py:810
+#: ../tails_installer/gui.py:741
#, python-format
-msgid "Unknown dbus exception while trying to mount device: %(message)s"
-msgstr "Nezināms dbus izņēmums cenšoties montēt iekārtu: %(message)s"
+msgid "%(filename)s selected"
+msgstr "%(filename)s izvēlēts"
-#: ../liveusb/creator.py:791 ../liveusb/creator.py:964
-msgid "Unknown filesystem. Your device may need to be reformatted."
-msgstr "Nezināma datņu sistēma. Iespējams, ierīci nepieciešams pārformatēt."
+#: ../tails_installer/source.py:28
+msgid "Unable to find LiveOS on ISO"
+msgstr "Uz ISO neizdevās atrast LiveOS"
-#: ../liveusb/gui.py:85
+#: ../tails_installer/source.py:34
#, python-format
-msgid "Unknown release: %s"
-msgstr "Nezināms laidiens: %s"
+msgid "Could not guess underlying block device: %s"
+msgstr "Neizdevās uzminēt pamata blokierīci: %s"
-#: ../liveusb/creator.py:851
+#: ../tails_installer/source.py:49
#, python-format
-msgid "Unmounting '%(udi)s' on '%(device)s'"
-msgstr "Nomontē '%(udi)s' , kurš atrodas uz '%(device)s'"
+msgid ""
+"There was a problem executing `%s`.\n"
+"%s\n"
+"%s"
+msgstr "Radās problēma izpildot `%s`.\n%s\n%s"
-#: ../liveusb/creator.py:847
+#: ../tails_installer/source.py:63
#, python-format
-msgid "Unmounting mounted filesystems on '%(device)s'"
-msgstr "Nomontē uz '%(device)s' uzmontētās datņu sistēmas"
+msgid "'%s' does not exist"
+msgstr "'%s' nepastāv"
-#: ../liveusb/creator.py:949
+#: ../tails_installer/source.py:65
#, python-format
-msgid "Unsupported device '%(device)s', please report a bug."
-msgstr "Neatbalstīta ierīce '%(device)s', lūdzu ziņojiet par šo kļūdi."
+msgid "'%s' is not a directory"
+msgstr "'%s' nav direktorijs"
-#: ../liveusb/creator.py:794 ../liveusb/creator.py:967
+#: ../tails_installer/source.py:75
#, python-format
-msgid "Unsupported filesystem: %s"
-msgstr "Datņu sistēma, kura netiek atbalstīta: %s"
+msgid "Skipping '%(filename)s'"
+msgstr "Izlaiž '%(filename)s'"
-#: ../liveusb/creator.py:1287
+#: ../tails_installer/utils.py:44
#, python-format
msgid ""
-"Unsupported filesystem: %s\n"
-"Please backup and format your USB key with the FAT filesystem."
-msgstr "Neatbalstīta datņu sistēma: %s\nLūdzu veiciet datu rezerves kopēšanu un formatējiet savu USB atslēgu kā FAT datņu sistēmu."
+"There was a problem executing `%s`.%s\n"
+"%s"
+msgstr "Radās problēma izpildot `%s`.%s\n%s"
-#: ../liveusb/creator.py:892
-#, python-format
-msgid "Updating properties of system partition %(system_partition)s"
-msgstr "Jaunina sistēmas nodalījuma īpašības %(system_partition)s"
+#: ../tails_installer/utils.py:119
+msgid "Could not open device for writing."
+msgstr "Ierīci neizdevās atvērt rakstīšanai."
-#: ../liveusb/launcher_ui.py:156
-msgid ""
-"Upgrade\n"
-"by cloning"
-msgstr "Jaunināt\nklonējot"
+#: ../data/tails-installer.ui.h:1
+msgid "Use existing Live system ISO:"
+msgstr "Izmanto esošo sistēmas Live ISO:"
+
+#: ../data/tails-installer.ui.h:2
+msgid "Select a distribution to download:"
+msgstr "Atlasiet sadali lejuplādei:"
+
+#: ../data/tails-installer.ui.h:3
+msgid "Target Device:"
+msgstr "Mērķa ierīce:"
+
+#: ../data/tails-installer.ui.h:4
+msgid "Install Tails"
+msgstr "Instalēt Tails"
-#: ../liveusb/launcher_ui.py:158
+#: ../data/tails-installer-launcher.ui.h:1
msgid ""
-"Upgrade\n"
-"from ISO"
-msgstr "Jaunināt\nno ISO"
+"To run Tails Installer you need an ISO image which can be downloaded from "
+"the Tails website: <a "
+"href=\"https://tails.boum.org/download/\">https://tails.boum.org/download/</a>"
+msgstr "Lai izpildītu Tails Instalētāju, Jums nepieciešams ISO attēls, kuru var lejuplādēt no Tails mājaslapas: <a href=\"https://tails.boum.org/download/\">https://tails.boum.org/download/</a>"
-#: ../liveusb/dialog.py:159
-msgid "Use existing Live system ISO"
-msgstr "Lietot esošo Dzīvas sistēmas ISO"
+#: ../data/tails-installer-launcher.ui.h:2
+msgid "Install"
+msgstr "Instalēt"
-#: ../liveusb/creator.py:143
-msgid "Verifying ISO MD5 checksum"
-msgstr "Verificē ISO MD5 kontrolsummu"
+#: ../data/tails-installer-launcher.ui.h:3
+msgid "• Install Tails on a new USB stick."
+msgstr "Instalēt Tails uz jauna USB diska."
-#: ../liveusb/creator.py:373
-msgid "Verifying SHA1 checksum of LiveCD image..."
-msgstr "Verificē LiveCD attēla kontrolsummu SHA1..."
+#: ../data/tails-installer-launcher.ui.h:4
+msgid "• The USB stick that you install on is formatted and all data is lost."
+msgstr "USB disks, uz kura instalējat, ir formatēts, un visi dati tiks izdzēsti."
-#: ../liveusb/creator.py:377
-msgid "Verifying SHA256 checksum of LiveCD image..."
-msgstr "Verificē LiveCD attēla kontrolsummu SHA256..."
+#: ../data/tails-installer-launcher.ui.h:5
+msgid "Upgrade"
+msgstr "Jaunināt"
-#: ../liveusb/creator.py:961 ../liveusb/creator.py:1280
-msgid "Verifying filesystem..."
-msgstr "Verificē datņu sistēmu..."
+#: ../data/tails-installer-launcher.ui.h:6
+msgid "• Upgrade a Tails USB stick to the version of an ISO image."
+msgstr "Jaunināt Tails USB disku uz ISO atēla versiju."
-#: ../liveusb/gui.py:725
+#: ../data/tails-installer-launcher.ui.h:7
msgid ""
-"Warning: Creating a new persistent overlay will delete your existing one."
-msgstr "Brīdinājums: Jauna pastāvīga pārklājuma izveide, dzēsīs esošo."
+"• The encrypted persistent storage of the Tails USB stick that you upgrade "
+"is preserved."
+msgstr "Tiks saglabāta tā Tails USB diska, kuru jaunināt, šifrētā pastāvīgā krātuve. "
-#: ../liveusb/gui.py:377
+#: ../data/tails-installer-launcher.ui.h:8
msgid ""
-"Warning: This tool needs to be run as an Administrator. To do this, right "
-"click on the icon and open the Properties. Under the Compatibility tab, "
-"check the \"Run this program as an administrator\" box."
-msgstr "Brīdinājums: Šis rīks jālieto administratora režīmā. Lai to izdarītu, ar labo peles taustiņu noklikšķiniet uz ikonas un atveriet Rekvizītus. Verot cilni Savietojamība, atzīmējiet lodziņu \"Izpildīt programmu administratora režīmā\"."
+"Need help? Read the <a "
+"href=\"https://tails.boum.org/doc/first_steps/installation/\">documentation</a>"
+msgstr "Nepieciešama palīdzība? Lasiet <a href=\"https://tails.boum.org/doc/first_steps/installation/\">dokumentāciju</a>"
-#: ../liveusb/creator.py:162
-#, python-format
-msgid "Wrote to device at %(speed)d MB/sec"
-msgstr "Ieraksts ierīcē tika veikts ar ātrumu %(speed)d MB/sec"
+#: ../data/tails-installer-launcher.ui.h:9
+msgid "Install by cloning"
+msgstr "Instalēt klonējot"
-#: ../liveusb/gui.py:699
-#, python-format
+#: ../data/tails-installer-launcher.ui.h:10
msgid ""
-"You are going to install Tails on the %(size)s %(vendor)s %(model)s device "
-"(%(device)s). All data on the selected device will be lost. Continue?"
-msgstr "Tūliņ Jūs instalēsit Tails uz %(size)s %(vendor)s %(model)s ierīces (%(device)s). Uz izvēlētās ierīces pazudīs visi dati. Vai turpināt?"
+"• Install Tails on another USB stick by copying the Tails system that you "
+"are currently using."
+msgstr "Kopējot Jūsu šobrīd izmantoto Tails sistēmu, instalēt Tails uz cita USB diska."
-#: ../liveusb/gui.py:715
-#, python-format
+#: ../data/tails-installer-launcher.ui.h:11
msgid ""
-"You are going to upgrade Tails on the %(parent_size)s %(vendor)s %(model)s "
-"device (%(device)s). Any persistent volume on this device will remain "
-"unchanged. Continue?"
-msgstr "Tūliņ Jūs jaunināsiet Tails uz %(parent_size)s %(vendor)s %(model)s ierīces (%(device)s). Uz šīs ierīces ikviens pastāvīgs sējums paliks nemainīts. Vai turpināt?"
+"• The encrypted persistent storage of the Tails USB stick that you are "
+"currently using is not copied."
+msgstr "Nav nokopēta šifrētā pastāvīgā krātuve Jūsu šobrīd izmantotajam Tails USB diskam. "
+
+#: ../data/tails-installer-launcher.ui.h:12
+msgid "Upgrade by cloning"
+msgstr "Jaunināt klonējot"
-#: ../liveusb/creator.py:622
+#: ../data/tails-installer-launcher.ui.h:13
msgid ""
-"You are using an old version of syslinux-extlinux that does not support the "
-"ext4 filesystem"
-msgstr "Tiek lietota veca syslinux-extlinux versija, kura neatbalsta datņu sistēmu ext4 "
+"• Upgrade another Tails USB stick to the same version of Tails that you are "
+"currently using."
+msgstr "Jaunināt citu Tails USB disku uz Jūsu šobrīd izmantoto Tails versiju."
-#: ../liveusb/gui.py:783
-msgid "You can try again to resume your download"
-msgstr "Variet vēlreiz mēģināt atjaunot lejupielādi"
+#: ../data/tails-installer-launcher.ui.h:14
+msgid "Upgrade from ISO"
+msgstr "Jaunināt no ISO"
-#: ../liveusb/creator.py:95
-msgid "You must run this application as root"
-msgstr "Šī lietotne jāizpilda saknes režīmā"
+#: ../data/tails-installer-launcher.ui.h:15
+msgid "• Upgrade another Tails USB stick to the version of an ISO image."
+msgstr "Jaunināt citu Tails USB disku uz ISO atēla versiju."
-#: ../liveusb/dialog.py:162
-msgid "or"
-msgstr "vai"
+#: ../data/tails-installer-launcher.ui.h:16
+msgid ""
+"Need help? Read the <a "
+"href=\"file:///usr/share/doc/tails/website/doc/first_steps/installation.en.html\">documentation</a>"
+msgstr "Nepieciešama palīdzība? Lasiet <a href=\"file:///usr/share/doc/tails/website/doc/first_steps/installation.en.html\">dokumentāciju</a>"
1
0

[translation/liveusb-creator] Update translations for liveusb-creator
by translation@torproject.org 01 Jul '17
by translation@torproject.org 01 Jul '17
01 Jul '17
commit 07d316165f52ebca4fe0cadda9f83edbab62f198
Author: Translation commit bot <translation(a)torproject.org>
Date: Sat Jul 1 18:15:30 2017 +0000
Update translations for liveusb-creator
---
lv/lv.po | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/lv/lv.po b/lv/lv.po
index c1a2b35..ef02bec 100644
--- a/lv/lv.po
+++ b/lv/lv.po
@@ -11,7 +11,7 @@ msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-30 13:14+0200\n"
-"PO-Revision-Date: 2017-07-01 17:45+0000\n"
+"PO-Revision-Date: 2017-07-01 17:57+0000\n"
"Last-Translator: Ojars Balcers <ojars.balcers(a)gmail.com>\n"
"Language-Team: Latvian (http://www.transifex.com/otf/torproject/language/lv/)\n"
"MIME-Version: 1.0\n"
@@ -515,64 +515,64 @@ msgstr "Instalēt Tails uz jauna USB diska."
#: ../data/tails-installer-launcher.ui.h:4
msgid "• The USB stick that you install on is formatted and all data is lost."
-msgstr ""
+msgstr "USB disks, uz kura instalējat, ir formatēts, un visi dati tiks izdzēsti."
#: ../data/tails-installer-launcher.ui.h:5
msgid "Upgrade"
-msgstr ""
+msgstr "Jaunināt"
#: ../data/tails-installer-launcher.ui.h:6
msgid "• Upgrade a Tails USB stick to the version of an ISO image."
-msgstr ""
+msgstr "Jaunināt Tails USB disku uz ISO atēla versiju."
#: ../data/tails-installer-launcher.ui.h:7
msgid ""
"• The encrypted persistent storage of the Tails USB stick that you upgrade "
"is preserved."
-msgstr ""
+msgstr "Tiks saglabāta tā Tails USB diska, kuru jaunināt, šifrētā pastāvīgā krātuve. "
#: ../data/tails-installer-launcher.ui.h:8
msgid ""
"Need help? Read the <a "
"href=\"https://tails.boum.org/doc/first_steps/installation/\">documentation</a>"
-msgstr ""
+msgstr "Nepieciešama palīdzība? Lasiet <a href=\"https://tails.boum.org/doc/first_steps/installation/\">dokumentāciju</a>"
#: ../data/tails-installer-launcher.ui.h:9
msgid "Install by cloning"
-msgstr ""
+msgstr "Instalēt klonējot"
#: ../data/tails-installer-launcher.ui.h:10
msgid ""
"• Install Tails on another USB stick by copying the Tails system that you "
"are currently using."
-msgstr ""
+msgstr "Kopējot Jūsu šobrīd izmantoto Tails sistēmu, instalēt Tails uz cita USB diska."
#: ../data/tails-installer-launcher.ui.h:11
msgid ""
"• The encrypted persistent storage of the Tails USB stick that you are "
"currently using is not copied."
-msgstr ""
+msgstr "Nav nokopēta šifrētā pastāvīgā krātuve Jūsu šobrīd izmantotajam Tails USB diskam. "
#: ../data/tails-installer-launcher.ui.h:12
msgid "Upgrade by cloning"
-msgstr ""
+msgstr "Jaunināt klonējot"
#: ../data/tails-installer-launcher.ui.h:13
msgid ""
"• Upgrade another Tails USB stick to the same version of Tails that you are "
"currently using."
-msgstr ""
+msgstr "Jaunināt citu Tails USB disku uz Jūsu šobrīd izmantoto Tails versiju."
#: ../data/tails-installer-launcher.ui.h:14
msgid "Upgrade from ISO"
-msgstr ""
+msgstr "Jaunināt no ISO"
#: ../data/tails-installer-launcher.ui.h:15
msgid "• Upgrade another Tails USB stick to the version of an ISO image."
-msgstr ""
+msgstr "Jaunināt citu Tails USB disku uz ISO atēla versiju."
#: ../data/tails-installer-launcher.ui.h:16
msgid ""
"Need help? Read the <a "
"href=\"file:///usr/share/doc/tails/website/doc/first_steps/installation.en.html\">documentation</a>"
-msgstr ""
+msgstr "Nepieciešama palīdzība? Lasiet <a href=\"file:///usr/share/doc/tails/website/doc/first_steps/installation.en.html\">dokumentāciju</a>"
1
0

[translation/liveusb-creator] Update translations for liveusb-creator
by translation@torproject.org 01 Jul '17
by translation@torproject.org 01 Jul '17
01 Jul '17
commit 3d9bd497adc1b8539630c8b51f235fbde93065bf
Author: Translation commit bot <translation(a)torproject.org>
Date: Sat Jul 1 17:45:29 2017 +0000
Update translations for liveusb-creator
---
lv/lv.po | 50 +++++++++++++++++++++++++-------------------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/lv/lv.po b/lv/lv.po
index b660c47..c1a2b35 100644
--- a/lv/lv.po
+++ b/lv/lv.po
@@ -11,7 +11,7 @@ msgstr ""
"Project-Id-Version: The Tor Project\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-30 13:14+0200\n"
-"PO-Revision-Date: 2017-07-01 17:07+0000\n"
+"PO-Revision-Date: 2017-07-01 17:45+0000\n"
"Last-Translator: Ojars Balcers <ojars.balcers(a)gmail.com>\n"
"Language-Team: Latvian (http://www.transifex.com/otf/torproject/language/lv/)\n"
"MIME-Version: 1.0\n"
@@ -226,7 +226,7 @@ msgstr "Lasa no %s izgūto MBR "
#: ../tails_installer/creator.py:1256
#, python-format
msgid "Could not read the extracted MBR from %(path)s"
-msgstr ""
+msgstr "Neidzevās nolasīt no %(path)s izgūto MBR"
#: ../tails_installer/creator.py:1269 ../tails_installer/creator.py:1270
#, python-format
@@ -279,7 +279,7 @@ msgstr "Nav iespējams atrast"
msgid ""
"Make sure to extract the entire tails-installer zip file before running this"
" program."
-msgstr ""
+msgstr "Pirms izpildat šo programmu, pārliecinieties, ka izgūta visa tails-instalētāja zip datne."
#: ../tails_installer/gui.py:69
#, python-format
@@ -304,7 +304,7 @@ msgstr "Instalēšana pabeigta! (%s)"
#: ../tails_installer/gui.py:258
msgid "Tails installation failed!"
-msgstr ""
+msgstr "Tails instalācija neizdevās!"
#: ../tails_installer/gui.py:353
msgid ""
@@ -315,16 +315,16 @@ msgstr "Brīdinājums: Šis rīks jālieto administratora režīmā. Lai to izda
#: ../tails_installer/gui.py:365 ../tails_installer/launcher.py:31
msgid "Tails Installer"
-msgstr ""
+msgstr "Tails instalētājs"
#: ../tails_installer/gui.py:440
msgid "No device suitable to install Tails could be found"
-msgstr ""
+msgstr "Neizdevās atrast nevienu ierīci, kas spēj instalēt Tails"
#: ../tails_installer/gui.py:442
#, python-format
msgid "Please plug a USB flash drive or SD card of at least %0.1f GB."
-msgstr ""
+msgstr "Lūdzu pievienojiet USB zibatmiņu vai SD karti, kuru ietilpība ir vismaz %0.1f GB."
#: ../tails_installer/gui.py:474
#, python-format
@@ -342,7 +342,7 @@ msgid ""
"The USB stick \"%(pretty_name)s\" is configured as non-removable by its "
"manufacturer and Tails will fail to start on it. Please try installing on a "
"different model."
-msgstr ""
+msgstr "USB disku \"%(pretty_name)s\" tā ražotājs ir nokonfigurējis kā nenoņemamu, un Tails neizdosies no tā startēt. Lūdzu mēģiniet instalēt uz cita modeļa."
#: ../tails_installer/gui.py:498
#, python-format
@@ -353,7 +353,7 @@ msgstr "Ierīce \"%(pretty_name)s\" ir pārāk maza, lai instalētu Tails (ir ne
#: ../tails_installer/gui.py:511
msgid "\"Install by cloning\""
-msgstr ""
+msgstr "\"Instalēt klonējot\""
#: ../tails_installer/gui.py:513
msgid "\"Install from ISO\""
@@ -369,7 +369,7 @@ msgstr "Ierīci %(pretty_name)s nav iespējams atjaunināt, jo tā nav izveidota
#: ../tails_installer/gui.py:533
msgid "An error happened while installing Tails"
-msgstr ""
+msgstr "Instalējot Tails radās kļūda"
#: ../tails_installer/gui.py:545
msgid "Refreshing releases..."
@@ -385,7 +385,7 @@ msgstr "Instalēšana ir pabeigta!"
#: ../tails_installer/gui.py:590
msgid "Installation was completed."
-msgstr ""
+msgstr "Instalācija ir pabeigta."
#: ../tails_installer/gui.py:635
msgid "Unable to mount device"
@@ -441,12 +441,12 @@ msgstr "%(filename)s izvēlēts"
#: ../tails_installer/source.py:28
msgid "Unable to find LiveOS on ISO"
-msgstr ""
+msgstr "Uz ISO neizdevās atrast LiveOS"
#: ../tails_installer/source.py:34
#, python-format
msgid "Could not guess underlying block device: %s"
-msgstr ""
+msgstr "Neizdevās uzminēt pamata blokierīci: %s"
#: ../tails_installer/source.py:49
#, python-format
@@ -454,45 +454,45 @@ msgid ""
"There was a problem executing `%s`.\n"
"%s\n"
"%s"
-msgstr ""
+msgstr "Radās problēma izpildot `%s`.\n%s\n%s"
#: ../tails_installer/source.py:63
#, python-format
msgid "'%s' does not exist"
-msgstr ""
+msgstr "'%s' nepastāv"
#: ../tails_installer/source.py:65
#, python-format
msgid "'%s' is not a directory"
-msgstr ""
+msgstr "'%s' nav direktorijs"
#: ../tails_installer/source.py:75
#, python-format
msgid "Skipping '%(filename)s'"
-msgstr ""
+msgstr "Izlaiž '%(filename)s'"
#: ../tails_installer/utils.py:44
#, python-format
msgid ""
"There was a problem executing `%s`.%s\n"
"%s"
-msgstr ""
+msgstr "Radās problēma izpildot `%s`.%s\n%s"
#: ../tails_installer/utils.py:119
msgid "Could not open device for writing."
-msgstr ""
+msgstr "Ierīci neizdevās atvērt rakstīšanai."
#: ../data/tails-installer.ui.h:1
msgid "Use existing Live system ISO:"
-msgstr ""
+msgstr "Izmanto esošo sistēmas Live ISO:"
#: ../data/tails-installer.ui.h:2
msgid "Select a distribution to download:"
-msgstr ""
+msgstr "Atlasiet sadali lejuplādei:"
#: ../data/tails-installer.ui.h:3
msgid "Target Device:"
-msgstr ""
+msgstr "Mērķa ierīce:"
#: ../data/tails-installer.ui.h:4
msgid "Install Tails"
@@ -503,15 +503,15 @@ msgid ""
"To run Tails Installer you need an ISO image which can be downloaded from "
"the Tails website: <a "
"href=\"https://tails.boum.org/download/\">https://tails.boum.org/download/</a>"
-msgstr ""
+msgstr "Lai izpildītu Tails Instalētāju, Jums nepieciešams ISO attēls, kuru var lejuplādēt no Tails mājaslapas: <a href=\"https://tails.boum.org/download/\">https://tails.boum.org/download/</a>"
#: ../data/tails-installer-launcher.ui.h:2
msgid "Install"
-msgstr ""
+msgstr "Instalēt"
#: ../data/tails-installer-launcher.ui.h:3
msgid "• Install Tails on a new USB stick."
-msgstr ""
+msgstr "Instalēt Tails uz jauna USB diska."
#: ../data/tails-installer-launcher.ui.h:4
msgid "• The USB stick that you install on is formatted and all data is lost."
1
0