diff options
author | drebs <drebs@leap.se> | 2013-05-12 19:16:16 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-05-13 15:49:33 -0300 |
commit | 3cefb8291c69ff4354f5b4cfde1d92117aac3d26 (patch) | |
tree | 24541105fd58f15a7977bdac5583d99ef8248315 /src/leap/soledad/tests/__init__.py | |
parent | 028cf283c1dae800b2ea70a05201cb9c696be973 (diff) |
Encrypt storage secret using scrypt KDF.
* Change format of storage.
* Refactor and modify export/import recovery documents logic.
* Change storage secret length to 512.
* Encrypt the storage document with derived function.
* Refactor property name inside crypto submodule.
* Add docstrings for new methods.
* Fix wrong method call import_recovery_document.
* Fix base64 encoding and secret/kdf length info.
* Add missing header.
* Add missing fields to comment.
Closes 2475 and 2423.
Diffstat (limited to 'src/leap/soledad/tests/__init__.py')
-rw-r--r-- | src/leap/soledad/tests/__init__.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/leap/soledad/tests/__init__.py b/src/leap/soledad/tests/__init__.py index d947f5b3..5cd23e45 100644 --- a/src/leap/soledad/tests/__init__.py +++ b/src/leap/soledad/tests/__init__.py @@ -40,9 +40,9 @@ class BaseSoledadTest(BaseLeapTest): self._soledad._init_dirs() #self._soledad._gpg.import_keys(PUBLIC_KEY) self._soledad._crypto = SoledadCrypto(self._soledad) - if not self._soledad._has_symkey(): - self._soledad._gen_symkey() - self._soledad._load_symkey() + if not self._soledad._has_secret(): + self._soledad._gen_secret() + self._soledad._load_secret() self._soledad._init_db() def tearDown(self): @@ -51,12 +51,13 @@ class BaseSoledadTest(BaseLeapTest): self._soledad.close() def _soledad_instance(self, user='leap@leap.se', prefix='', - bootstrap=False, secret_path='/secret.gpg', + bootstrap=False, + secrets_path=Soledad.STORAGE_SECRETS_FILE_NAME, local_db_path='/soledad.u1db'): return Soledad( user, '123', - secret_path=self.tempdir+prefix+secret_path, + secrets_path=self.tempdir+prefix+secrets_path, local_db_path=self.tempdir+prefix+local_db_path, server_url='', # Soledad will fail if not given an url. cert_file=None, |