diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-06-27 12:47:57 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-06-27 12:47:57 -0300 |
commit | 7858d83af4a09ab00f6ba33dd8dbcf07ade101ce (patch) | |
tree | 334e519a4d341c402b5fa81d339b9b1d2b5ead35 /src/leap/bitmask/provider/providerbootstrapper.py | |
parent | c621fa7322b4f8151eb37b27f8aeae563cf6bd63 (diff) | |
parent | 7de085576dd6141a5303aa1e1460c2a208d7b5d4 (diff) |
Merge branch 'release-0.5.3'0.5.3
Diffstat (limited to 'src/leap/bitmask/provider/providerbootstrapper.py')
-rw-r--r-- | src/leap/bitmask/provider/providerbootstrapper.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/leap/bitmask/provider/providerbootstrapper.py b/src/leap/bitmask/provider/providerbootstrapper.py index 6cdfe4f4..8c96a8b5 100644 --- a/src/leap/bitmask/provider/providerbootstrapper.py +++ b/src/leap/bitmask/provider/providerbootstrapper.py @@ -29,6 +29,7 @@ from leap.bitmask import util from leap.bitmask.config import flags from leap.bitmask.config.providerconfig import ProviderConfig, MissingCACert from leap.bitmask.provider import get_provider_path +from leap.bitmask.provider.pinned import PinnedProviders from leap.bitmask.services.abstractbootstrapper import AbstractBootstrapper from leap.bitmask.util.constants import REQUEST_TIMEOUT from leap.bitmask.util.request_helpers import get_content @@ -176,6 +177,14 @@ class ProviderBootstrapper(AbstractBootstrapper): provider_json = os.path.join(util.get_path_prefix(), get_provider_path(domain)) + if domain in PinnedProviders.domains() and \ + not os.path.exists(provider_json): + mkdir_p(os.path.join(os.path.dirname(provider_json), + "keys", "ca")) + cacert = os.path.join(os.path.dirname(provider_json), + "keys", "ca", "cacert.pem") + PinnedProviders.save_hardcoded(domain, provider_json, cacert) + mtime = get_mtime(provider_json) if self._download_if_needed and mtime: |