From 16dcdedc8a74967d5cafb466cc2f1af04b617458 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 17 Apr 2015 13:24:55 +0100 Subject: As of version 2.7.9, urllib2 now checks SSL certs --- register_new_matrix_user | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/register_new_matrix_user b/register_new_matrix_user index daddadc302..974dfd3981 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, ctx=ssl.SSLContext(ssl.PROTOCOL_SSLv23)) + else: + f = urllib2.urlopen(req) f.read() f.close() print "Success." -- cgit 1.4.1 From ced39d019f124792a9dd38d6dfb558bdfdebd560 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 17 Apr 2015 13:25:16 +0100 Subject: Bump version --- synapse/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/__init__.py b/synapse/__init__.py index fd87c7e2d0..56c10a84e9 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -16,4 +16,4 @@ """ This is a reference implementation of a Matrix home server. """ -__version__ = "0.8.1-r3" +__version__ = "0.8.1-r4" -- cgit 1.4.1 From fd4fa9097f4ea593a0896377ff5179397ffa94d7 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Fri, 17 Apr 2015 14:44:31 +0100 Subject: The new parameter to urlopen is "context" not "ctx" --- register_new_matrix_user | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/register_new_matrix_user b/register_new_matrix_user index 974dfd3981..4a520bdb5d 100755 --- a/register_new_matrix_user +++ b/register_new_matrix_user @@ -52,7 +52,7 @@ def request_registration(user, password, server_location, shared_secret): 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, ctx=ssl.SSLContext(ssl.PROTOCOL_SSLv23)) + f = urllib2.urlopen(req, context=ssl.SSLContext(ssl.PROTOCOL_SSLv23)) else: f = urllib2.urlopen(req) f.read() -- cgit 1.4.1