diff options
author | drebs <drebs@leap.se> | 2013-04-23 10:22:05 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-04-23 10:22:05 -0300 |
commit | b48f000e311daf543a8b8f776c5438725485bffd (patch) | |
tree | 6872e00de2e9ae749cec285569d497c0739e32cb /src/leap/soledad/tests/__init__.py | |
parent | 23e1a6404d31070364654b8138cfe21f07239974 (diff) |
Separate crypto-related stuff from Soledad class.
This creates a SoledadCrypto object that should encapsulate everything related
to crypto in Soledad.
Also, replace hmac for sha256 when creating hashes.
Diffstat (limited to 'src/leap/soledad/tests/__init__.py')
-rw-r--r-- | src/leap/soledad/tests/__init__.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/leap/soledad/tests/__init__.py b/src/leap/soledad/tests/__init__.py index 7f1e9f28..396b2775 100644 --- a/src/leap/soledad/tests/__init__.py +++ b/src/leap/soledad/tests/__init__.py @@ -4,7 +4,7 @@ Tests to make sure Soledad provides U1DB functionality and more. import u1db from leap.soledad import Soledad -from leap.soledad.util import GPGWrapper +from leap.soledad.crypto import SoledadCrypto from leap.soledad.backends.leap_backend import LeapDocument from leap.common.testing.basetest import BaseLeapTest @@ -33,8 +33,8 @@ class BaseSoledadTest(BaseLeapTest): # initialize soledad by hand so we can control keys self._soledad = self._soledad_instance(user=self.email) self._soledad._init_dirs() - self._soledad._gpg = GPGWrapper(gnupghome=self.gnupg_home) #self._soledad._gpg.import_keys(PUBLIC_KEY) + self._soledad._crypto = SoledadCrypto(self.gnupg_home) if not self._soledad._has_symkey(): self._soledad._gen_symkey() self._soledad._load_symkey() @@ -57,9 +57,6 @@ class BaseSoledadTest(BaseLeapTest): local_db_path=self.tempdir+prefix+local_db_path, bootstrap=bootstrap) - def _gpgwrapper_instance(self): - return GPGWrapper(gnupghome="%s/gnupg" % self.tempdir) - # Key material for testing KEY_FINGERPRINT = "E36E738D69173C13D709E44F2F455E2824D18DDF" |