mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-02-01 07:49:10 +00:00
ensure binary read on windows
This commit is contained in:
parent
2be19a5620
commit
f0e96be142
@ -302,7 +302,8 @@ class ProxyHandler(tcp.BaseHandler):
|
|||||||
|
|
||||||
def find_cert(self, cc, host, port, sni):
|
def find_cert(self, cc, host, port, sni):
|
||||||
if self.config.certfile:
|
if self.config.certfile:
|
||||||
return certutils.SSLCert.from_pem(file(self.config.certfile, "r").read())
|
with open(self.config.certfile, "rb") as f:
|
||||||
|
return certutils.SSLCert.from_pem(f.read())
|
||||||
else:
|
else:
|
||||||
sans = []
|
sans = []
|
||||||
if not self.config.no_upstream_cert:
|
if not self.config.no_upstream_cert:
|
||||||
|
Loading…
Reference in New Issue
Block a user