mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-02-04 09:15:31 +00:00
Merge pull request #1590 from rofreg/chain_file_conflict
Fix SSL error on OS X
This commit is contained in:
commit
73c95efacc
@ -817,7 +817,7 @@ class BaseHandler(_Connection):
|
|||||||
until then we're conservative.
|
until then we're conservative.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
context = self._create_ssl_context(**sslctx_kwargs)
|
context = self._create_ssl_context(ca_pemfile=chain_file, **sslctx_kwargs)
|
||||||
|
|
||||||
context.use_privatekey(key)
|
context.use_privatekey(key)
|
||||||
if isinstance(cert, certutils.SSLCert):
|
if isinstance(cert, certutils.SSLCert):
|
||||||
@ -840,10 +840,6 @@ class BaseHandler(_Connection):
|
|||||||
return True
|
return True
|
||||||
context.set_verify(SSL.VERIFY_PEER, save_cert)
|
context.set_verify(SSL.VERIFY_PEER, save_cert)
|
||||||
|
|
||||||
# Cert Verify
|
|
||||||
if chain_file:
|
|
||||||
context.load_verify_locations(chain_file)
|
|
||||||
|
|
||||||
if dhparams:
|
if dhparams:
|
||||||
SSL._lib.SSL_CTX_set_tmp_dh(context._context, dhparams)
|
SSL._lib.SSL_CTX_set_tmp_dh(context._context, dhparams)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user