From 46ea4c16a78b0dcb18ccdd301c164963150204a4 Mon Sep 17 00:00:00 2001 From: Folker Bernitt and Victor Shyba Date: Tue, 31 Mar 2015 11:58:23 -0300 Subject: Better naming for which_bundle functions -- Issues #93 and #333 --- service/pixelated/bitmask_libraries/provider.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'service/pixelated/bitmask_libraries/provider.py') 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) -- cgit v1.2.3