Create mutually exclusive group for add-server-certs-to-client-chain and verify-upstream-cert command line options. These are not meaningful together.

This commit is contained in:
ikoz 2016-03-16 19:15:44 +00:00
parent d26c7f4ca5
commit 02e378486b

View File

@ -434,13 +434,14 @@ def proxy_ssl_options(parser):
action="store_true", dest="no_upstream_cert", action="store_true", dest="no_upstream_cert",
help="Don't connect to upstream server to look up certificate details." 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, "--add-server-certs-to-client-chain", default=False,
action="store_true", dest="add_server_certs_to_client_chain", action="store_true", dest="add_server_certs_to_client_chain",
help="Add all the certificates of the server to the certificate chain " help="Add all the certificates of the server to the certificate chain "
"that will be served to the client, as extras." "that will be served to the client, as extras."
) )
group.add_argument( subgroup.add_argument(
"--verify-upstream-cert", default=False, "--verify-upstream-cert", default=False,
action="store_true", dest="ssl_verify_upstream_cert", action="store_true", dest="ssl_verify_upstream_cert",
help="Verify upstream server SSL/TLS certificates and fail if invalid " help="Verify upstream server SSL/TLS certificates and fail if invalid "