commit 3cfddb08ee8ee334038d725fd26a8d5e24c55acc Author: Isis Lovecruft isis@torproject.org Date: Thu Nov 7 15:31:11 2013 +0000
Create the OR public ID key hash digest in gen_bridge_descriptors. --- scripts/gen_bridge_descriptors | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/scripts/gen_bridge_descriptors b/scripts/gen_bridge_descriptors index ae37a6a..282e1bd 100644 --- a/scripts/gen_bridge_descriptors +++ b/scripts/gen_bridge_descriptors @@ -762,6 +762,14 @@ def generateDescriptors():
fpr = convertToSpaceyFingerprint(fingerprint)
+ idkey_public = OpenSSL.crypto.dump_privatekey(PEM, + SIDPCert.get_pubkey()) + idkey_public = re.sub(OPENSSL_BEGIN_KEY, '', idkey_public) + idkey_public = re.sub(OPENSSL_END_KEY, '', idkey_public) + idkey_public = idkey_public.strip() + identity = binascii.b2a_base64( + hashlib.sha1(idkey_public).digest()).strip().strip('=======') + extrainfo_document = generateExtraInfo(fpr, timestamp, ipv4, port) extrainfo_digest = hashlib.sha1(extrainfo_document).digest() extrainfo_hexdigest = hashlib.sha1(extrainfo_document).hexdigest().upper()