[tor-commits] [stem/master] Mark onion_key_crosscert_digest() as private

atagar at torproject.org atagar at torproject.org
Sun Jul 2 21:54:56 UTC 2017


commit b66f02a30569705c0630881d14be0d404f1c8fe1
Author: Damian Johnson <atagar at torproject.org>
Date:   Sun Jul 2 09:18:51 2017 -0700

    Mark onion_key_crosscert_digest() as private
    
    Oops, this method clearly is intended to just help support digest
    verification.
---
 stem/descriptor/server_descriptor.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/stem/descriptor/server_descriptor.py b/stem/descriptor/server_descriptor.py
index 351a7ff..8c11b6c 100644
--- a/stem/descriptor/server_descriptor.py
+++ b/stem/descriptor/server_descriptor.py
@@ -796,8 +796,8 @@ class RelayDescriptor(ServerDescriptor):
         if self.onion_key_crosscert:
           onion_key_crosscert_digest = self._digest_for_signature(self.onion_key, self.onion_key_crosscert)
 
-          if onion_key_crosscert_digest != self.onion_key_crosscert_digest():
-            raise ValueError('Decrypted onion-key-crosscert digest does not match local digest (calculated: %s, local: %s)' % (onion_key_crosscert_digest, self.onion_key_crosscert_digest()))
+          if onion_key_crosscert_digest != self._onion_key_crosscert_digest():
+            raise ValueError('Decrypted onion-key-crosscert digest does not match local digest (calculated: %s, local: %s)' % (onion_key_crosscert_digest, self._onion_key_crosscert_digest()))
 
       if stem.prereq._is_pynacl_available() and self.certificate:
         self.certificate.validate(self)
@@ -885,7 +885,7 @@ class RelayDescriptor(ServerDescriptor):
     return RouterStatusEntryV3.create(attr)
 
   @lru_cache()
-  def onion_key_crosscert_digest(self):
+  def _onion_key_crosscert_digest(self):
     """
     Provides the digest of the onion-key-crosscert data. This consists of the
     RSA identity key sha1 and ed25519 identity key.





More information about the tor-commits mailing list