diff options
author | David Baker <dave@matrix.org> | 2015-04-24 09:37:54 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-04-24 09:37:54 +0100 |
commit | 6532b6e60776f2c732b06e5535af068e9a049d6d (patch) | |
tree | 4bbfeddf91f35c0f3744b346f30d6e3813c22196 /register_new_matrix_user | |
parent | Dedicated error code for failed 3pid auth verification (diff) | |
parent | No commas here, otherwise our error string constants become tuples. (diff) | |
download | synapse-6532b6e60776f2c732b06e5535af068e9a049d6d.tar.xz |
Merge branch 'develop' into csauth
Conflicts: synapse/http/server.py
Diffstat (limited to 'register_new_matrix_user')
-rwxr-xr-x | register_new_matrix_user | 7 |
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." |