mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-03 11:17:24 +00:00
ensure binary read on windows
This commit is contained in:
parent
2be19a5620
commit
f0e96be142
1 changed files with 2 additions and 1 deletions
|
|
@ -302,7 +302,8 @@ class ProxyHandler(tcp.BaseHandler):
|
|||
|
||||
def find_cert(self, cc, host, port, sni):
|
||||
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:
|
||||
sans = []
|
||||
if not self.config.no_upstream_cert:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue