aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-06-07 16:36:54 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-06-07 16:36:54 +1200
commit81fc990314e1f251f12e22b029cb20a64947f150 (patch)
tree7238334ed02798da7f1b20ac455798e298231992
parent9ae53aecd0b517c2e6149b9a70da2157bced7743 (diff)
downloadmitmproxy-81fc990314e1f251f12e22b029cb20a64947f150.tar.gz
mitmproxy-81fc990314e1f251f12e22b029cb20a64947f150.tar.bz2
mitmproxy-81fc990314e1f251f12e22b029cb20a64947f150.zip
Fail if only one of certfile or keyfile is specified.
-rwxr-xr-xpathod4
1 files changed, 4 insertions, 0 deletions
diff --git a/pathod b/pathod
index 946da92d..f49baa34 100755
--- a/pathod
+++ b/pathod
@@ -37,6 +37,10 @@ if __name__ == "__main__":
except utils.AnchorError, v:
parser.error(str(v))
+ sl = [args.ssl_keyfile, args.ssl_certfile]
+ if any(sl) and not all(sl):
+ parser.error("Both --certfile and --keyfile must be specified.")
+
if args.ssl:
ssl = dict(
keyfile = args.ssl_keyfile or utils.data.path("resources/server.key"),