mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-24 04:14:57 +08:00
remove default_ca
This commit is contained in:
@@ -189,7 +189,7 @@ def common_options(parser):
|
||||
parser.add_argument(
|
||||
"--confdir",
|
||||
action="store", type=str, dest="confdir", default='~/.mitmproxy',
|
||||
help="Configuration directory. (~/.mitmproxy)"
|
||||
help="Configuration directory, contains default CA file. (~/.mitmproxy)"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--host",
|
||||
|
||||
@@ -16,7 +16,7 @@ def parse_host_pattern(patterns):
|
||||
|
||||
class ProxyConfig:
|
||||
def __init__(self, host='', port=8080, server_version=version.NAMEVERSION,
|
||||
confdir=CONF_DIR, default_ca=None, clientcerts=None,
|
||||
confdir=CONF_DIR, clientcerts=None,
|
||||
no_upstream_cert=False, body_size_limit=None,
|
||||
mode=None, upstream_server=None, http_form_in=None, http_form_out=None,
|
||||
authenticator=None, ignore=[],
|
||||
@@ -47,7 +47,6 @@ class ProxyConfig:
|
||||
self.ignore = parse_host_pattern(ignore)
|
||||
self.authenticator = authenticator
|
||||
self.confdir = os.path.expanduser(confdir)
|
||||
self.default_ca = default_ca or os.path.join(self.confdir, CONF_BASENAME + "-ca.pem")
|
||||
self.certstore = certutils.CertStore.from_store(self.confdir, CONF_BASENAME)
|
||||
for spec, cert in certs:
|
||||
self.certstore.add_cert_file(spec, cert)
|
||||
|
||||
Reference in New Issue
Block a user