aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2011-02-20 13:29:41 +1300
committerAldo Cortesi <aldo@nullcube.com>2011-02-20 13:29:41 +1300
commit7ddba22f515aa8997da0b5ee36c8ebc9961493dd (patch)
treedef335c030b962ed5926b1b96d444a20408ed024 /mitmproxy
parentc2ae8285f4bc092a449d92f4bbdb150d586c2c51 (diff)
downloadmitmproxy-7ddba22f515aa8997da0b5ee36c8ebc9961493dd.tar.gz
mitmproxy-7ddba22f515aa8997da0b5ee36c8ebc9961493dd.tar.bz2
mitmproxy-7ddba22f515aa8997da0b5ee36c8ebc9961493dd.zip
Certificates are now generated in a temporary per-session directory.
This means that certificates don't accumulate in the conf directory, users don't have to clear certificates if the CA is regenerated, and the user can specify a custom CA without invalid certificates being loaded inadvertently.
Diffstat (limited to 'mitmproxy')
-rwxr-xr-xmitmproxy10
1 files changed, 2 insertions, 8 deletions
diff --git a/mitmproxy b/mitmproxy
index 0a9e81c0..7c70fb44 100755
--- a/mitmproxy
+++ b/mitmproxy
@@ -85,22 +85,16 @@ if __name__ == '__main__':
options, args = parser.parse_args()
- proxy.process_certificate_option_group(parser, options)
if options.cache is not None:
options.cache = os.path.expanduser(options.cache)
-
- config = proxy.Config(
- certfile = options.cert,
- certpath = options.certpath,
- cacert = options.cacert,
- ciphers = options.ciphers
- )
if options.cache is not None:
utils.mkdir_p(options.cache)
if os.path.exists(options.cache + "/index.txt"):
print >> sys.stderr, "ERROR: data already recorded in %s"%options.cache
sys.exit(1)
+
+ config = proxy.process_certificate_option_group(parser, options)
server = proxy.ProxyServer(config, options.port, options.addr)
m = console.ConsoleMaster(server, options)