diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-04-20 16:24:21 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-04-20 16:24:21 +0100 |
commit | db8d4e8dd686300adee10ab7bf23b0af7ab3bad5 (patch) | |
tree | cfb96f8d15d411ac702208a320b0777456532186 /register_new_matrix_user | |
parent | Implement v2 key lookup (diff) | |
parent | Merge branch 'master' of github.com:matrix-org/synapse into develop (diff) | |
download | synapse-db8d4e8dd686300adee10ab7bf23b0af7ab3bad5.tar.xz |
Merge branch 'develop' into key_distribution
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 daddadc302..4a520bdb5d 100755 --- a/register_new_matrix_user +++ b/register_new_matrix_user @@ -49,7 +49,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." |