From b48f000e311daf543a8b8f776c5438725485bffd Mon Sep 17 00:00:00 2001 From: drebs Date: Tue, 23 Apr 2013 10:22:05 -0300 Subject: 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. --- src/leap/soledad/tests/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/leap/soledad/tests/__init__.py') 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" -- cgit v1.2.3