[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/master] Return the OR server ID public RSA key from makeOnionKeys().



commit 2d407a35b314c3ebad52ead0b95630d15cccb106
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Thu Nov 7 15:04:10 2013 +0000

    Return the OR server ID public RSA key from makeOnionKeys().
    
    The public key should be used in identity key hash digest creation, so we need
    to return `SIDPCert` from the makeOnionKeys() function in
    gen_bridge_descriptors, so that we can use it in makeDescriptors().
---
 scripts/gen_bridge_descriptors |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/scripts/gen_bridge_descriptors b/scripts/gen_bridge_descriptors
index 8a51529..ae37a6a 100644
--- a/scripts/gen_bridge_descriptors
+++ b/scripts/gen_bridge_descriptors
@@ -592,8 +592,7 @@ def makeOnionKeys(bridge=True, digest='sha1'):
     onionKeyString   = 'onion-key\n%s' % getPEMPublicKey(onionPCert)
     signingKeyString = 'signing-key\n%s' % getPEMPublicKey(signPCert)
 
-    # XXX we don't need anything elseâ?¦ right?
-    return SIDSKey, (fingerprint, onionKeyString, signingKeyString)
+    return SIDSKey, SIDPCert, (fingerprint, onionKeyString, signingKeyString)
 
 def generateExtraInfo(fingerprint, ts, ipv4, port):
     """Create an OR extra-info document.
@@ -757,8 +756,8 @@ def generateDescriptors():
     timestamp = makeTimeStamp(variation=True, period=36)
     protocols = makeProtocolsLine(vers)
 
-    idkey, (fingerprint, onionkey, signingkey) = makeOnionKeys()
-    idkey_private = getPEMPrivateKey(idkey)
+    SIDSKey, SIDPCert, (fingerprint, onionkey, signingkey) = makeOnionKeys()
+    idkey_private = getPEMPrivateKey(SIDSKey)
     idkey_digest = hashlib.sha1(idkey_private).digest()
 
     fpr = convertToSpaceyFingerprint(fingerprint)



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