aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorikoz <john@kozyrakis.gr>2016-03-16 19:15:44 +0000
committerikoz <john@kozyrakis.gr>2016-03-16 19:15:44 +0000
commit02e378486b9daa7159503a4bdcd7bed9d85e119e (patch)
tree8d4e16c2e884cf37993257c8439998994942716e
parentd26c7f4ca58165377f60d68babd47cf7e9377b3e (diff)
downloadmitmproxy-02e378486b9daa7159503a4bdcd7bed9d85e119e.tar.gz
mitmproxy-02e378486b9daa7159503a4bdcd7bed9d85e119e.tar.bz2
mitmproxy-02e378486b9daa7159503a4bdcd7bed9d85e119e.zip
Create mutually exclusive group for add-server-certs-to-client-chain and verify-upstream-cert command line options. These are not meaningful together.
-rw-r--r--mitmproxy/cmdline.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mitmproxy/cmdline.py b/mitmproxy/cmdline.py
index a04a36ba..2184ce94 100644
--- a/mitmproxy/cmdline.py
+++ b/mitmproxy/cmdline.py
@@ -434,13 +434,14 @@ def proxy_ssl_options(parser):
action="store_true", dest="no_upstream_cert",
help="Don't connect to upstream server to look up certificate details."
)
- group.add_argument(
+ subgroup = group.add_mutually_exclusive_group()
+ subgroup.add_argument(
"--add-server-certs-to-client-chain", default=False,
action="store_true", dest="add_server_certs_to_client_chain",
help="Add all the certificates of the server to the certificate chain "
"that will be served to the client, as extras."
)
- group.add_argument(
+ subgroup.add_argument(
"--verify-upstream-cert", default=False,
action="store_true", dest="ssl_verify_upstream_cert",
help="Verify upstream server SSL/TLS certificates and fail if invalid "