summaryrefslogtreecommitdiff
path: root/src/leap/bitmask
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r--src/leap/bitmask/keymanager/__init__.py17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/leap/bitmask/keymanager/__init__.py b/src/leap/bitmask/keymanager/__init__.py
index c3ece057..146bcd2f 100644
--- a/src/leap/bitmask/keymanager/__init__.py
+++ b/src/leap/bitmask/keymanager/__init__.py
@@ -65,7 +65,7 @@ class KeyManager(object):
def __init__(self, address, nickserver_uri, soledad, token=None,
ca_cert_path=None, api_uri=None, api_version=None, uid=None,
- gpgbinary=None):
+ gpgbinary=None, combined_ca_bundle=None):
"""
Initialize a Key Manager for user's C{address} with provider's
nickserver reachable in C{nickserver_uri}.
@@ -98,24 +98,11 @@ class KeyManager(object):
self.api_version = api_version
self.uid = uid
self._openpgp = OpenPGPScheme(soledad, gpgbinary=gpgbinary)
- self._combined_ca_bundle = self._create_combined_bundle_file()
+ self._combined_ca_bundle = combined_ca_bundle or self._create_combined_bundle_file()
self._async_client = HTTPClient(self._combined_ca_bundle)
self._async_client_pinned = HTTPClient(self._ca_cert_path)
#
- # destructor
- #
-
- def __del__(self):
- try:
- created_tmp_combined_ca_bundle = self._combined_ca_bundle not in \
- [ca_bundle.where(), self._ca_cert_path]
- if created_tmp_combined_ca_bundle:
- os.remove(self._combined_ca_bundle)
- except OSError:
- pass
-
- #
# utilities
#