diff options
author | Tulio Casagrande <tcasagra@thoughtworks.com> | 2016-08-29 18:23:14 -0300 |
---|---|---|
committer | Tulio Casagrande <tcasagra@thoughtworks.com> | 2016-08-29 18:59:53 -0300 |
commit | c1a35317fe4ebb82bf7d24dc5d8c171d29c9c501 (patch) | |
tree | 74878eaccf9ddce91b33284cd8ed5c67910a219a /service/pixelated/config | |
parent | 840ade44e23add85fbe97b79ee249fc7c1e6adf2 (diff) |
[#765] Move combined_ca_bundle to UA initialization
With this change we don't have to create the combined_ca_bundle
for every user at every login.
To support this change, we started migrating away from the
LeapCertificate class that was making the LeapProvider setup
more brittle
Diffstat (limited to 'service/pixelated/config')
-rw-r--r-- | service/pixelated/config/leap.py | 6 | ||||
-rw-r--r-- | service/pixelated/config/sessions.py | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/service/pixelated/config/leap.py b/service/pixelated/config/leap.py index 371c0dc8..42eb495d 100644 --- a/service/pixelated/config/leap.py +++ b/service/pixelated/config/leap.py @@ -19,10 +19,8 @@ def initialize_leap_provider(provider_hostname, provider_cert, provider_fingerpr provider_fingerprint) leap_config.set_leap_home(leap_home) provider = LeapProvider(provider_hostname) - provider.download_certificate() - LeapCertificate(provider).setup_ca_bundle() - provider.download_soledad_json() - provider.download_smtp_json() + provider.setup_ca() + provider.download_settings() return provider diff --git a/service/pixelated/config/sessions.py b/service/pixelated/config/sessions.py index ed492ea9..9ce0a212 100644 --- a/service/pixelated/config/sessions.py +++ b/service/pixelated/config/sessions.py @@ -43,7 +43,7 @@ class LeapSessionFactory(object): self._create_database_dir(auth.uuid) - api_cert = LeapCertificate(self._provider).provider_api_cert + api_cert = self._provider.provider_api_cert soledad = yield self.setup_soledad(auth.token, auth.uuid, password, api_cert) @@ -283,7 +283,7 @@ class SmtpClientCertificate(object): cert_url, params=params, data=params, - verify=LeapCertificate(self._provider).provider_api_cert, + verify=self._provider.provider_api_cert, timeout=15, headers=headers) response.raise_for_status() |