aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-07-19 11:23:37 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-07-19 16:25:09 +1200
commitf81c53f9bb9ed074f1eae26e1c89c545df9ae3a7 (patch)
tree0292a36019729509b459e1e04e2ef29129996ceb
parent78e8159007051122de1a1be1467d9261266b288e (diff)
downloadmitmproxy-f81c53f9bb9ed074f1eae26e1c89c545df9ae3a7.tar.gz
mitmproxy-f81c53f9bb9ed074f1eae26e1c89c545df9ae3a7.tar.bz2
mitmproxy-f81c53f9bb9ed074f1eae26e1c89c545df9ae3a7.zip
Fix ca directory creation
-rw-r--r--mitmproxy/proxy/config.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mitmproxy/proxy/config.py b/mitmproxy/proxy/config.py
index 7a5a6863..7f155528 100644
--- a/mitmproxy/proxy/config.py
+++ b/mitmproxy/proxy/config.py
@@ -134,13 +134,13 @@ class ProxyConfig:
def configure(self, options):
certstore_path = os.path.expanduser(options.cadir)
- if not os.path.exists(certstore_path):
+ if not os.path.exists(os.path.dirname(certstore_path)):
raise exceptions.OptionsError(
- "Certificate Authority directory does not exist: %s" %
- options.cadir
+ "Certificate Authority parent directory does not exist: %s" %
+ os.path.dirname(options.cadir)
)
self.certstore = certutils.CertStore.from_store(
- os.path.expanduser(options.cadir),
+ certstore_path,
CONF_BASENAME
)