aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmproxy/cmdline.py6
-rw-r--r--libmproxy/proxy.py8
2 files changed, 7 insertions, 7 deletions
diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py
index 42c02449..ffd1826a 100644
--- a/libmproxy/cmdline.py
+++ b/libmproxy/cmdline.py
@@ -147,9 +147,9 @@ def common_options(parser):
help="Wait for specified number of seconds after a new cert is generated. This can smooth over small discrepancies between the client and server times."
)
parser.add_option(
- "--upstream-cn-lookup", default=False,
- action="store_true", dest="upstream_cn_lookup",
- help="Connect to upstream server to look up certificate Common Name."
+ "--upstream-cert", default=False,
+ action="store_true", dest="upstream_cert",
+ help="Connect to upstream server to look up certificate details."
)
group = optparse.OptionGroup(parser, "Client Replay")
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py
index ec7c52e4..b626e943 100644
--- a/libmproxy/proxy.py
+++ b/libmproxy/proxy.py
@@ -35,13 +35,13 @@ class ProxyError(Exception):
class ProxyConfig:
- def __init__(self, certfile = None, ciphers = None, cacert = None, cert_wait_time=0, upstream_cn_lookup=False, body_size_limit = None, reverse_proxy=None):
+ def __init__(self, certfile = None, ciphers = None, cacert = None, cert_wait_time=0, upstream_cert=False, body_size_limit = None, reverse_proxy=None):
self.certfile = certfile
self.ciphers = ciphers
self.cacert = cacert
self.certdir = None
self.cert_wait_time = cert_wait_time
- self.upstream_cn_lookup = upstream_cn_lookup
+ self.upstream_cert = upstream_cert
self.body_size_limit = body_size_limit
self.reverse_proxy = reverse_proxy
@@ -349,7 +349,7 @@ class ProxyHandler(SocketServer.StreamRequestHandler):
return self.config.certfile
else:
sans = []
- if self.config.upstream_cn_lookup:
+ if self.config.upstream_cert:
host, sans = utils.get_remote_cn(host, port)
ret = utils.dummy_cert(self.config.certdir, self.config.cacert, host, sans)
time.sleep(self.config.cert_wait_time)
@@ -542,6 +542,6 @@ def process_proxy_options(parser, options):
ciphers = options.ciphers,
cert_wait_time = options.cert_wait_time,
body_size_limit = body_size_limit,
- upstream_cn_lookup = options.upstream_cn_lookup,
+ upstream_cert = options.upstream_cert,
reverse_proxy = rp
)