[tor-commits] [flashproxy/master] Rearrange.
dcf at torproject.org
dcf at torproject.org
Sun May 19 05:30:46 UTC 2013
commit 8455c29b121f852584777fedb559fb9f5eebac47
Author: David Fifield <david at bamsoftware.com>
Date: Sat May 18 22:30:31 2013 -0700
Rearrange.
---
flashproxy-reg-email | 12 ++++++------
flashproxy-reg-url | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/flashproxy-reg-email b/flashproxy-reg-email
index 20381cc..5bbf6fa 100755
--- a/flashproxy-reg-email
+++ b/flashproxy-reg-email
@@ -78,12 +78,6 @@ gwIDAQAB
-----END PUBLIC KEY-----
"""
-def get_facilitator_pubkey():
- if options.facilitator_pubkey_filename is not None:
- return RSA.load_pub_key(options.facilitator_pubkey_filename)
- else:
- return RSA.load_pub_key_bio(BIO.MemoryBuffer(DEFAULT_FACILITATOR_PUBKEY_PEM))
-
class options(object):
remote_addr = None
email_addr = None
@@ -185,6 +179,12 @@ def get_state_dir():
raise
return pt_dir
+def get_facilitator_pubkey():
+ if options.facilitator_pubkey_filename is not None:
+ return RSA.load_pub_key(options.facilitator_pubkey_filename)
+ else:
+ return RSA.load_pub_key_bio(BIO.MemoryBuffer(DEFAULT_FACILITATOR_PUBKEY_PEM))
+
options.remote_addr = (DEFAULT_REMOTE_ADDRESS, DEFAULT_REMOTE_PORT)
options.email_addr = DEFAULT_EMAIL_ADDRESS
options.smtp_addr = (DEFAULT_SMTP_HOST, DEFAULT_SMTP_PORT)
diff --git a/flashproxy-reg-url b/flashproxy-reg-url
index e8aa61a..bdd8cc6 100755
--- a/flashproxy-reg-url
+++ b/flashproxy-reg-url
@@ -23,12 +23,6 @@ gwIDAQAB
-----END PUBLIC KEY-----
"""
-def get_facilitator_pubkey():
- if options.facilitator_pubkey_filename is not None:
- return RSA.load_pub_key(options.facilitator_pubkey_filename)
- else:
- return RSA.load_pub_key_bio(BIO.MemoryBuffer(DEFAULT_FACILITATOR_PUBKEY_PEM))
-
class options(object):
facilitator_url = None
facilitator_pubkey_filename = None
@@ -102,6 +96,12 @@ def format_addr(addr):
result += u":%d" % port
return result
+def get_facilitator_pubkey():
+ if options.facilitator_pubkey_filename is not None:
+ return RSA.load_pub_key(options.facilitator_pubkey_filename)
+ else:
+ return RSA.load_pub_key_bio(BIO.MemoryBuffer(DEFAULT_FACILITATOR_PUBKEY_PEM))
+
options.facilitator_url = DEFAULT_FACILITATOR_URL
opt, args = getopt.gnu_getopt(sys.argv[1:], "f:h", ["facilitator=", "facilitator-pubkey=", "help"])
More information about the tor-commits
mailing list