summaryrefslogtreecommitdiff
path: root/service/pixelated/bitmask_libraries/certs.py
diff options
context:
space:
mode:
authorTulio Casagrande <tcasagra@thoughtworks.com>2016-08-29 18:23:14 -0300
committerTulio Casagrande <tcasagra@thoughtworks.com>2016-08-29 18:59:53 -0300
commitc1a35317fe4ebb82bf7d24dc5d8c171d29c9c501 (patch)
tree74878eaccf9ddce91b33284cd8ed5c67910a219a /service/pixelated/bitmask_libraries/certs.py
parent840ade44e23add85fbe97b79ee249fc7c1e6adf2 (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/bitmask_libraries/certs.py')
-rw-r--r--service/pixelated/bitmask_libraries/certs.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/service/pixelated/bitmask_libraries/certs.py b/service/pixelated/bitmask_libraries/certs.py
index e3466d05..9a76a01d 100644
--- a/service/pixelated/bitmask_libraries/certs.py
+++ b/service/pixelated/bitmask_libraries/certs.py
@@ -14,6 +14,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
import os
+
from pixelated.config import leap_config
@@ -38,18 +39,3 @@ class LeapCertificate(object):
@property
def provider_web_cert(self):
return self.LEAP_CERT
-
- @property
- def provider_api_cert(self):
- return str(os.path.join(leap_config.leap_home, 'providers', self._server_name, 'keys', 'client', 'api.pem'))
-
- def setup_ca_bundle(self):
- path = os.path.join(leap_config.leap_home, 'providers', self._server_name, 'keys', 'client')
- if not os.path.isdir(path):
- os.makedirs(path, 0700)
- self._download_cert(self.provider_api_cert)
-
- def _download_cert(self, cert_file_name):
- cert = self._provider.fetch_valid_certificate()
- with open(cert_file_name, 'w') as file:
- file.write(cert)