summary refs log tree commit diff
path: root/register_new_matrix_user
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-04-24 09:37:54 +0100
committerDavid Baker <dave@matrix.org>2015-04-24 09:37:54 +0100
commit6532b6e60776f2c732b06e5535af068e9a049d6d (patch)
tree4bbfeddf91f35c0f3744b346f30d6e3813c22196 /register_new_matrix_user
parentDedicated error code for failed 3pid auth verification (diff)
parentNo commas here, otherwise our error string constants become tuples. (diff)
downloadsynapse-6532b6e60776f2c732b06e5535af068e9a049d6d.tar.xz
Merge branch 'develop' into csauth
Conflicts:
	synapse/http/server.py
Diffstat (limited to 'register_new_matrix_user')
-rwxr-xr-xregister_new_matrix_user7
1 files changed, 6 insertions, 1 deletions
diff --git a/register_new_matrix_user b/register_new_matrix_user
index f833d2a4db..0ca83795a3 100755
--- a/register_new_matrix_user
+++ b/register_new_matrix_user
@@ -48,7 +48,12 @@ def request_registration(user, password, server_location, shared_secret):
         headers={'Content-Type': 'application/json'}
     )
     try:
-        f = urllib2.urlopen(req)
+        if sys.version_info[:3] >= (2, 7, 9):
+            # As of version 2.7.9, urllib2 now checks SSL certs
+            import ssl
+            f = urllib2.urlopen(req, context=ssl.SSLContext(ssl.PROTOCOL_SSLv23))
+        else:
+            f = urllib2.urlopen(req)
         f.read()
         f.close()
         print "Success."