From 02e378486b9daa7159503a4bdcd7bed9d85e119e Mon Sep 17 00:00:00 2001 From: ikoz Date: Wed, 16 Mar 2016 19:15:44 +0000 Subject: [PATCH] Create mutually exclusive group for add-server-certs-to-client-chain and verify-upstream-cert command line options. These are not meaningful together. --- mitmproxy/cmdline.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mitmproxy/cmdline.py b/mitmproxy/cmdline.py index a04a36ba7..2184ce948 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 "