commit 27cf44b8825d0148ef98a60c2282619065e369ca
Author: Damian Johnson <atagar(a)torproject.org>
Date: Sat Feb 8 13:24:54 2020 -0800
Drop hidden service introduction_points_auth
This attribute was never implemented within tor.
---
stem/descriptor/hidden_service.py | 5 -----
test/unit/descriptor/hidden_service_v2.py | 7 -------
2 files changed, 12 deletions(-)
diff --git a/stem/descriptor/hidden_service.py b/stem/descriptor/hidden_service.py
index 6fa43521..ed455fd1 100644
--- a/stem/descriptor/hidden_service.py
+++ b/stem/descriptor/hidden_service.py
@@ -551,7 +551,6 @@ def _parse_introduction_points_line(descriptor, entries):
raise ValueError("'introduction-points' should be followed by a MESSAGE block, but was a %s" % block_type)
descriptor.introduction_points_encoded = block_contents
- descriptor.introduction_points_auth = [] # field was never implemented in tor (#15190)
try:
descriptor.introduction_points_content = _bytes_for_block(block_contents)
@@ -646,9 +645,6 @@ class HiddenServiceDescriptorV2(BaseHiddenServiceDescriptor):
:var datetime published: **\\*** time in UTC when this descriptor was made
:var list protocol_versions: **\\*** list of **int** versions that are supported when establishing a connection
:var str introduction_points_encoded: raw introduction points blob
- :var list introduction_points_auth: **\\*** tuples of the form
- (auth_method, auth_data) for our introduction_points_content
- (**deprecated**, always **[]**)
:var bytes introduction_points_content: decoded introduction-points content
without authentication data, if using cookie authentication this is
encrypted
@@ -676,7 +672,6 @@ class HiddenServiceDescriptorV2(BaseHiddenServiceDescriptor):
'published': (None, _parse_publication_time_line),
'protocol_versions': ([], _parse_protocol_versions_line),
'introduction_points_encoded': (None, _parse_introduction_points_line),
- 'introduction_points_auth': ([], _parse_introduction_points_line),
'introduction_points_content': (None, _parse_introduction_points_line),
'signature': (None, _parse_v2_signature_line),
}
diff --git a/test/unit/descriptor/hidden_service_v2.py b/test/unit/descriptor/hidden_service_v2.py
index 5191775e..fd90f693 100644
--- a/test/unit/descriptor/hidden_service_v2.py
+++ b/test/unit/descriptor/hidden_service_v2.py
@@ -296,7 +296,6 @@ class TestHiddenServiceDescriptorV2(unittest.TestCase):
self.assertEqual(datetime.datetime(2015, 2, 24, 20, 0, 0), desc.published)
self.assertEqual([2, 3], desc.protocol_versions)
self.assertEqual(EXPECTED_BASIC_AUTH_INTRODUCTION_POINTS_ENCODED, desc.introduction_points_encoded)
- self.assertEqual([], desc.introduction_points_auth)
self.assertRaises(DecryptionFailure, desc.introduction_points)
self.assertRaises(DecryptionFailure, desc.introduction_points, 'aCmx3qIvArbil8A0KM4KgQ==')
@@ -342,7 +341,6 @@ class TestHiddenServiceDescriptorV2(unittest.TestCase):
self.assertEqual('jczvydhzetbpdiylj3d5nsnjvaigs7xm', desc.secret_id_part)
self.assertEqual(datetime.datetime(2015, 2, 24, 20, 0, 0), desc.published)
self.assertEqual([2, 3], desc.protocol_versions)
- self.assertEqual([], desc.introduction_points_auth)
self.assertRaises(DecryptionFailure, desc.introduction_points)
self.assertRaises(DecryptionFailure, desc.introduction_points, 'aCmx3qIvArbil8A0KM4KgQ==')
@@ -382,7 +380,6 @@ class TestHiddenServiceDescriptorV2(unittest.TestCase):
self.assertEqual(datetime.datetime(2015, 2, 23, 20, 0, 0), desc.published)
self.assertEqual([2, 3], desc.protocol_versions)
self.assertEqual(EXPECTED_DDG_INTRODUCTION_POINTS_ENCODED, desc.introduction_points_encoded)
- self.assertEqual([], desc.introduction_points_auth)
self.assertEqual(EXPECTED_DDG_INTRODUCTION_POINTS_CONTENT, desc.introduction_points_content)
self.assertEqual(EXPECTED_DDG_SIGNATURE, desc.signature)
@@ -425,7 +422,6 @@ class TestHiddenServiceDescriptorV2(unittest.TestCase):
self.assertEqual('e24kgecavwsznj7gpbktqsiwgvngsf4e', desc.secret_id_part)
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.assertEqual([], desc.introduction_points())
self.assertEqual('@type hidden-service-descriptor 1.0', str(desc.type_annotation()))
@@ -517,14 +513,12 @@ class TestHiddenServiceDescriptorV2(unittest.TestCase):
missing_field_desc = HiddenServiceDescriptorV2.create(exclude = ('introduction-points',))
self.assertEqual(None, missing_field_desc.introduction_points_encoded)
- self.assertEqual([], missing_field_desc.introduction_points_auth)
self.assertEqual(None, missing_field_desc.introduction_points_content)
self.assertEqual([], missing_field_desc.introduction_points())
empty_field_desc = HiddenServiceDescriptorV2.create({'introduction-points': MESSAGE_BLOCK % ''})
self.assertEqual((MESSAGE_BLOCK % '').strip(), empty_field_desc.introduction_points_encoded)
- self.assertEqual([], empty_field_desc.introduction_points_auth)
self.assertEqual(b'', empty_field_desc.introduction_points_content)
self.assertEqual([], empty_field_desc.introduction_points())
@@ -540,6 +534,5 @@ class TestHiddenServiceDescriptorV2(unittest.TestCase):
for test_value in test_values:
desc = expect_invalid_attr(self, {'introduction-points': test_value}, 'introduction_points_encoded', test_value.strip())
- self.assertEqual([], desc.introduction_points_auth)
self.assertEqual(None, desc.introduction_points_content)
self.assertEqual([], desc.introduction_points())