[tor-commits] [stem/master] Adjust certificate validate() TODO comment

atagar at torproject.org atagar at torproject.org
Sun Oct 6 02:07:34 UTC 2019


commit 22724cec45e0a2819be66a0c0def6da43d304d3b
Author: Damian Johnson <atagar at torproject.org>
Date:   Sun Sep 22 13:42:59 2019 -0700

    Adjust certificate validate() TODO comment
    
    George is absolutely right that this method is too specific to server
    descriptors, but I cannot find the generic "validate()" method he's
    referring to. Just reached out to him on irc to discuss this.
    
    If we have a generic method that applies to both server and hidden
    service descriptors I'd be delighted to deprecate this, but for the
    moment at least I'm unsure how to proceed with this.
---
 stem/descriptor/certificate.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/stem/descriptor/certificate.py b/stem/descriptor/certificate.py
index f1f7483e..2293a7a3 100644
--- a/stem/descriptor/certificate.py
+++ b/stem/descriptor/certificate.py
@@ -241,9 +241,10 @@ class Ed25519CertificateV1(Ed25519Certificate):
 
     return datetime.datetime.now() > self.expiration
 
-  # ATAGAR XXX certificates are generic and not just for descriptor, however
-  # this function assumes they are. this needs to be moved to the descriptor
-  # module. the new verify() function is more generic and should be used.
+  # TODO: This method is too specific to server descriptors. We should
+  # deprecate this if possible in favor of a more generic method that covers
+  # hidden service v3 descriptors as well.
+
   def validate(self, server_descriptor):
     """
     Validates our signing key and that the given descriptor content matches its





More information about the tor-commits mailing list