diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2015-05-31 16:54:52 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2015-05-31 16:54:52 +1200 |
commit | e7c255a3bb2e935345b471752e38e2ec2a5b132c (patch) | |
tree | 4b3bad8e82f196111194560a6dc18d0fdefb54ef /libpathod/cmdline.py | |
parent | 88ab54fab06e108465bfe7acc21bd2576e4af45f (diff) | |
download | mitmproxy-e7c255a3bb2e935345b471752e38e2ec2a5b132c.tar.gz mitmproxy-e7c255a3bb2e935345b471752e38e2ec2a5b132c.tar.bz2 mitmproxy-e7c255a3bb2e935345b471752e38e2ec2a5b132c.zip |
Refactor, fix a crashing bug by changing the way we specify SANs to pathod
Diffstat (limited to 'libpathod/cmdline.py')
-rw-r--r-- | libpathod/cmdline.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libpathod/cmdline.py b/libpathod/cmdline.py index d75e4330..67d5646a 100644 --- a/libpathod/cmdline.py +++ b/libpathod/cmdline.py @@ -322,9 +322,12 @@ def args_pathod(argv, stdout=sys.stdout, stderr=sys.stderr): help="SSL cipher specification" ) group.add_argument( - "--sans", dest="sans", type=str, default="", - help="""Comma-separated list of subject Altnernate Names to add to - the server certificate.""" + "--san", dest="sans", type=str, default=[], action="append", + metavar="SAN", + help=""" + Subject Altnernate Name to add to the server certificate. + May be passed multiple times. + """ ) group.add_argument( "--sslversion", dest="sslversion", type=int, default=4, @@ -362,8 +365,6 @@ def args_pathod(argv, stdout=sys.stdout, stderr=sys.stderr): ) args = parser.parse_args(argv[1:]) - args.sans = args.sans.split(",") - certs = [] for i in args.ssl_certs: parts = i.split("=", 1) |