summaryrefslogtreecommitdiff
path: root/client/src/leap/soledad
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2015-04-30 11:24:21 -0300
committerdrebs <drebs@leap.se>2015-05-20 10:16:46 -0300
commit3a3f2d8ca5b0ae2adb5007577f2d828677ff64e0 (patch)
treeb038e8f2f55b85b4ceda70b46e80269d7d96b01b /client/src/leap/soledad
parent340b0dcfbc0a819738a28f9c803fdbf848754897 (diff)
[bug] always initialize sync db
Both deferred encryption and decryption rely on a special sync db. Previous to this fix, the sync db was only initialized if a syncer was configured with deferred encryption capabilities. This was a problem when the syncer was not configured like so, but the actual sync method was initiated configured to do deferred decryption. This commit fixes this by always initializing the sync db, so we have the option of doing all combinations of deferred encryption and decryption.
Diffstat (limited to 'client/src/leap/soledad')
-rw-r--r--client/src/leap/soledad/client/sqlcipher.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/src/leap/soledad/client/sqlcipher.py b/client/src/leap/soledad/client/sqlcipher.py
index db3cb5cb..ec7946b7 100644
--- a/client/src/leap/soledad/client/sqlcipher.py
+++ b/client/src/leap/soledad/client/sqlcipher.py
@@ -503,8 +503,12 @@ class SQLCipherU1DBSync(SQLCipherDatabase):
self._db_handle = None
self._initialize_main_db()
+ # the sync_db is used both for deferred encryption and decryption, so
+ # we want to initialize it anyway to allow for all combinations of
+ # deferred encryption and decryption configurations.
+ self._initialize_sync_db(opts)
+
if defer_encryption:
- self._initialize_sync_db(opts)
# initialize syncing queue encryption pool
self._sync_enc_pool = crypto.SyncEncrypterPool(