From f858f69c569ea5581e1c662b8486be542d785146 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Tue, 8 Oct 2013 13:08:13 +0200 Subject: [PATCH] workaround android bug with ssl certificates --- lib/interface.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/interface.py b/lib/interface.py index b82cfaef..d7887004 100644 --- 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)