diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-08-01 16:03:45 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-08-01 16:03:45 -0300 |
commit | 1b9f4c824406f26e135a0d96cad04064b8864615 (patch) | |
tree | d5d763ccf705c38a6075f971dbe71acf28d30d08 /src/leap/services | |
parent | 8f3e7332e3fa0b7245eba878456f93a2e11ecbbf (diff) | |
parent | 06818a143817b583f1fb1860a8fd6631677cc2ef (diff) |
Merge remote-tracking branch 'ivan/bug/3362_check-if-cacert-exists' into develop
Diffstat (limited to 'src/leap/services')
-rw-r--r-- | src/leap/services/eip/providerbootstrapper.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/leap/services/eip/providerbootstrapper.py b/src/leap/services/eip/providerbootstrapper.py index 723475b8..bf5938dc 100644 --- a/src/leap/services/eip/providerbootstrapper.py +++ b/src/leap/services/eip/providerbootstrapper.py @@ -29,7 +29,7 @@ from PySide import QtCore from leap.common.certs import get_digest from leap.common.files import check_and_fix_urw_only, get_mtime, mkdir_p from leap.common.check import leap_assert, leap_assert_type, leap_check -from leap.config.providerconfig import ProviderConfig +from leap.config.providerconfig import ProviderConfig, MissingCACert from leap.util.request_helpers import get_content from leap.util.constants import REQUEST_TIMEOUT from leap.services.abstractbootstrapper import AbstractBootstrapper @@ -147,8 +147,12 @@ class ProviderBootstrapper(AbstractBootstrapper): if mtime: # the provider.json exists provider_config = ProviderConfig() provider_config.load(provider_json) - uri = provider_config.get_api_uri() + '/provider.json' - verify = provider_config.get_ca_cert_path() + try: + verify = provider_config.get_ca_cert_path() + uri = provider_config.get_api_uri() + '/provider.json' + except MissingCACert: + # get_ca_cert_path fails if the certificate does not exists. + pass logger.debug("Requesting for provider.json... " "uri: {0}, verify: {1}, headers: {2}".format( |