diff options
author | Bruno Wagner <bwagner@riseup.net> | 2016-08-23 18:13:48 -0300 |
---|---|---|
committer | Thais Siqueira <thais.siqueira@gmail.com> | 2016-08-23 18:13:48 -0300 |
commit | 9b6c6f7e84790a3da8470b94cc8c029d9ad67777 (patch) | |
tree | 19ffeae01fd639c4a1d75ceafe96ee9cfcdca224 /service | |
parent | 45e923eefa10af0f0a3c4ee693699ba9d75df17e (diff) |
Changes soledad json download order
Soledad json must only be downloaded after we
fetch the api provider certificate, we can't
make the request for it before having this cert
Diffstat (limited to 'service')
-rw-r--r-- | service/pixelated/bitmask_libraries/provider.py | 4 | ||||
-rw-r--r-- | service/pixelated/config/leap.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/service/pixelated/bitmask_libraries/provider.py b/service/pixelated/bitmask_libraries/provider.py index 07791624..cd4af7e2 100644 --- a/service/pixelated/bitmask_libraries/provider.py +++ b/service/pixelated/bitmask_libraries/provider.py @@ -30,7 +30,6 @@ class LeapProvider(object): self.server_name = server_name self.local_ca_crt = '%s/ca.crt' % leap_config.leap_home self.provider_json = self.fetch_provider_json() - self.soledad_json = self.fetch_soledad_json() @property def api_uri(self): @@ -66,6 +65,9 @@ class LeapProvider(object): if 'mx' not in self.services: raise Exception + def download_soledad_json(self): + self.soledad_json = self.fetch_soledad_json() + def download_certificate(self, filename=None): """ Downloads the server certificate, validates it against the provided fingerprint and stores it to file diff --git a/service/pixelated/config/leap.py b/service/pixelated/config/leap.py index b14aacc7..52e84386 100644 --- a/service/pixelated/config/leap.py +++ b/service/pixelated/config/leap.py @@ -21,7 +21,7 @@ def initialize_leap_provider(provider_hostname, provider_cert, provider_fingerpr provider = LeapProvider(provider_hostname) provider.download_certificate() LeapCertificate(provider).setup_ca_bundle() - + provider.download_soledad_json() return provider |