From f81c53f9bb9ed074f1eae26e1c89c545df9ae3a7 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 19 Jul 2016 11:23:37 +1200 Subject: Fix ca directory creation --- mitmproxy/proxy/config.py | 8 ++++---- 1 file 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 ) -- cgit v1.2.3