summaryrefslogtreecommitdiff
path: root/src/leap/services
diff options
context:
space:
mode:
authorkali <kali@leap.se>2013-05-01 01:48:57 +0900
committerkali <kali@leap.se>2013-05-01 01:48:57 +0900
commit2cb4987d2da49542c2e1d89632953298415bafe4 (patch)
treeee50f1e6e02ad6220963261858b2d5f848180213 /src/leap/services
parent90cac3e4a992a513db96b6c126fdd5259e881d0f (diff)
add debug to config and cert uris
Diffstat (limited to 'src/leap/services')
-rw-r--r--src/leap/services/eip/eipbootstrapper.py23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/leap/services/eip/eipbootstrapper.py b/src/leap/services/eip/eipbootstrapper.py
index 19b74856..83f0a0c2 100644
--- a/src/leap/services/eip/eipbootstrapper.py
+++ b/src/leap/services/eip/eipbootstrapper.py
@@ -102,11 +102,14 @@ class EIPBootstrapper(QtCore.QObject):
if self._download_if_needed and mtime:
headers['if-modified-since'] = mtime
- res = self._session.get("%s/%s/%s/%s" %
- (self._provider_config.get_api_uri(),
- self._provider_config.get_api_version(),
- "config",
- "eip-service.json"),
+ # there is some confusion with this uri,
+ # it's in 1/config/eip, config/eip and config/1/eip...
+ config_uri = "%s/%s/config/eip-service.json" % (
+ self._provider_config.get_api_uri(),
+ self._provider_config.get_api_version())
+ logger.debug('Downloading eip config from: %s' % config_uri)
+
+ res = self._session.get(config_uri,
verify=self._provider_config
.get_ca_cert_path(),
headers=headers)
@@ -176,15 +179,15 @@ class EIPBootstrapper(QtCore.QObject):
cookies = None
if session_id:
cookies = {"_session_id": session_id}
- res = self._session.get("%s/%s/%s/" %
- (self._provider_config.get_api_uri(),
- self._provider_config.get_api_version(),
- "cert"),
+ cert_uri = "%s/%s/cert" % (
+ self._provider_config.get_api_uri(),
+ self._provider_config.get_api_version())
+ logger.debug('getting cert from uri: %s' % cert_uri)
+ res = self._session.get(cert_uri,
verify=self._provider_config
.get_ca_cert_path(),
cookies=cookies)
res.raise_for_status()
-
client_cert = res.content
# TODO: check certificate validity