diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-09-18 17:03:14 +0200 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-09-18 17:26:04 +0200 |
commit | 9546348c3603f390fdd6d5a119414142e9bd02ea (patch) | |
tree | a1b5223033795c9d659f86e96e1c0f51ad536eb5 /src/leap/keymanager/tests/__init__.py | |
parent | 0b9f64faef0ba9c5cf2a9efe485794ef9b999fab (diff) |
[feature] Use ca_bundle when fetching keys by url
This is necessary as a fetch by url will talk to remote
sites or, for providers with a commercial cert, with
a cert that had not been signed with the provider CA.
- support lookup of local keys by url for providers
with a commercial cert
- combine ca_bundle with ca_cert_path if specified
- close soledad after each test
Diffstat (limited to 'src/leap/keymanager/tests/__init__.py')
-rw-r--r-- | src/leap/keymanager/tests/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/leap/keymanager/tests/__init__.py b/src/leap/keymanager/tests/__init__.py index 7128d20..6b647a4 100644 --- a/src/leap/keymanager/tests/__init__.py +++ b/src/leap/keymanager/tests/__init__.py @@ -73,11 +73,12 @@ class KeyManagerWithSoledadTestCase(unittest.TestCase, BaseLeapTest): d = km._wrapper_map[OpenPGPKey].deferred_indexes d.addCallback(get_and_delete_keys) d.addCallback(lambda _: self.tearDownEnv()) + d.addCallback(lambda _: self._soledad.close()) return d - def _key_manager(self, user=ADDRESS, url='', token=None): + def _key_manager(self, user=ADDRESS, url='', token=None, ca_cert_path=None): return KeyManager(user, url, self._soledad, token=token, - gpgbinary=self.gpg_binary_path) + gpgbinary=self.gpg_binary_path, ca_cert_path=ca_cert_path) def _find_gpg(self): gpg_path = distutils.spawn.find_executable('gpg') |