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

[tor-commits] [flashproxy/master] Use similar variable names as in flashproxy-reg-email.



commit e51cad74f49e54c82cd327732c09c7b9384e6ac2
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Wed Mar 13 01:40:26 2013 -0700

    Use similar variable names as in flashproxy-reg-email.
---
 flashproxy-reg-url |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/flashproxy-reg-url b/flashproxy-reg-url
index b29d8d1..1070889 100755
--- a/flashproxy-reg-url
+++ b/flashproxy-reg-url
@@ -106,12 +106,10 @@ if len(args) != 1:
     usage(f=sys.stderr)
     sys.exit(1)
 
-addr = parse_addr_spec(args[0], defport=DEFAULT_REMOTE_PORT)
-spec = u"client=" + format_addr(addr)
-spec = spec.encode('UTF-8')
-
+remote_addr = parse_addr_spec(args[0], defport=DEFAULT_REMOTE_PORT)
+reg_plain = (u"client=%s" % format_addr(remote_addr)).encode("utf-8")
 rsa = RSA.load_pub_key_bio(BIO.MemoryBuffer(FACILITATOR_PUBKEY_PEM))
-ciphertext = rsa.public_encrypt(spec, RSA.pkcs1_oaep_padding)
-reg = base64.urlsafe_b64encode(ciphertext)
+reg_crypt = rsa.public_encrypt(reg_plain, RSA.pkcs1_oaep_padding)
+reg = base64.urlsafe_b64encode(reg_crypt)
 
 print "/".join([options.facilitator_url.strip("/"), "reg", reg])



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