aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--netlib/tcp.py3
-rw-r--r--netlib/test.py2
-rw-r--r--setup.py2
-rw-r--r--test/test_http_auth.py2
4 files changed, 5 insertions, 4 deletions
diff --git a/netlib/tcp.py b/netlib/tcp.py
index 2de647ae..f4a713f9 100644
--- a/netlib/tcp.py
+++ b/netlib/tcp.py
@@ -303,7 +303,8 @@ class BaseHandler:
if request_client_cert:
def ver(*args):
self.clientcert = certutils.SSLCert(args[1])
- return True
+ # err 20 = X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY
+ #return True
ctx.set_verify(SSL.VERIFY_PEER, ver)
self.connection = SSL.Connection(ctx, self.connection)
self.ssl_established = True
diff --git a/netlib/test.py b/netlib/test.py
index 661395c5..87802bd5 100644
--- a/netlib/test.py
+++ b/netlib/test.py
@@ -52,7 +52,7 @@ class TServer(tcp.TCPServer):
self.last_handler = h
if self.ssl:
cert = certutils.SSLCert.from_pem(
- file(self.ssl["cert"], "r").read()
+ file(self.ssl["cert"], "rb").read()
)
if self.ssl["v3_only"]:
method = tcp.SSLv3_METHOD
diff --git a/setup.py b/setup.py
index e0dff0ff..1b2a14f9 100644
--- a/setup.py
+++ b/setup.py
@@ -65,7 +65,7 @@ def findPackages(path, dataExclude=[]):
return packages, package_data
-long_description = file("README").read()
+long_description = file("README","rb").read()
packages, package_data = findPackages("netlib")
setup(
name = "netlib",
diff --git a/test/test_http_auth.py b/test/test_http_auth.py
index cae69f5e..83de0fa1 100644
--- a/test/test_http_auth.py
+++ b/test/test_http_auth.py
@@ -17,7 +17,7 @@ class TestPassManHtpasswd:
tutils.raises("invalid htpasswd", http_auth.PassManHtpasswd, s)
def test_simple(self):
- f = open(tutils.test_data.path("data/htpasswd"))
+ f = open(tutils.test_data.path("data/htpasswd"),"rb")
pm = http_auth.PassManHtpasswd(f)
vals = ("basic", "test", "test")