commit f858f69c569ea5581e1c662b8486be542d785146
parent 87a8bfda47e3d6d4271292cef0425bcb631db6af
Author: ThomasV <thomasv@gitorious>
Date: Tue, 8 Oct 2013 13:08:13 +0200
workaround android bug with ssl certificates
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/interface.py b/lib/interface.py
@@ -326,6 +326,8 @@ class Interface(threading.Thread):
dercert = s.getpeercert(True)
s.close()
cert = ssl.DER_cert_to_PEM_cert(dercert)
+ # workaround android bug
+ cert = cert.replace("==-----END CERTIFICATE-----", "==\n-----END CERTIFICATE-----")
temporary_path = cert_path + '.temp'
with open(temporary_path,"w") as f:
f.write(cert)