summaryrefslogtreecommitdiff
path: root/service/pixelated/bitmask_libraries/provider.py
diff options
context:
space:
mode:
authorFolker Bernitt and Victor Shyba <pixelated-team+fbernitt+vshyba@thoughtworks.com>2015-03-31 11:58:23 -0300
committerPatrick Maia <pmaia@thoughtworks.com>2015-03-31 12:01:29 -0300
commit46ea4c16a78b0dcb18ccdd301c164963150204a4 (patch)
treeb124257c2c584c6c4a1f1758d4431a39c3f85380 /service/pixelated/bitmask_libraries/provider.py
parentb998b240868ee4d6d30c86397793c9d194d4501b (diff)
Better naming for which_bundle functions
-- Issues #93 and #333
Diffstat (limited to 'service/pixelated/bitmask_libraries/provider.py')
-rw-r--r--service/pixelated/bitmask_libraries/provider.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/service/pixelated/bitmask_libraries/provider.py b/service/pixelated/bitmask_libraries/provider.py
index 34e426d7..a0bf4843 100644
--- a/service/pixelated/bitmask_libraries/provider.py
+++ b/service/pixelated/bitmask_libraries/provider.py
@@ -17,7 +17,7 @@ import json
from leap.common.certs import get_digest
import requests
-from .certs import which_bootstrap_bundle, which_bundle, which_bootstrap_fingerprint
+from .certs import which_bootstrap_CA_bundle, which_api_CA_bundle, which_bootstrap_cert_fingerprint
from pixelated.support.tls_adapter import EnforceTLSv1Adapter
@@ -97,8 +97,8 @@ class LeapProvider(object):
def _validated_get(self, url):
session = requests.session()
try:
- session.mount('https://', EnforceTLSv1Adapter(assert_fingerprint=which_bootstrap_fingerprint(self)))
- response = session.get(url, verify=which_bootstrap_bundle(self), timeout=self.config.timeout_in_s)
+ session.mount('https://', EnforceTLSv1Adapter(assert_fingerprint=which_bootstrap_cert_fingerprint()))
+ response = session.get(url, verify=which_bootstrap_CA_bundle(self), timeout=self.config.timeout_in_s)
response.raise_for_status()
return response
finally:
@@ -113,14 +113,14 @@ class LeapProvider(object):
def fetch_soledad_json(self):
service_url = "%s/%s/config/soledad-service.json" % (
self.api_uri, self.api_version)
- response = requests.get(service_url, verify=which_bundle(self), timeout=self.config.timeout_in_s)
+ response = requests.get(service_url, verify=which_api_CA_bundle(self), timeout=self.config.timeout_in_s)
response.raise_for_status()
return json.loads(response.content)
def fetch_smtp_json(self):
service_url = '%s/%s/config/smtp-service.json' % (
self.api_uri, self.api_version)
- response = requests.get(service_url, verify=which_bundle(self), timeout=self.config.timeout_in_s)
+ response = requests.get(service_url, verify=which_api_CA_bundle(self), timeout=self.config.timeout_in_s)
response.raise_for_status()
return json.loads(response.content)