summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/changes/bug_always-initialize-the-sync-db2
-rw-r--r--client/src/leap/soledad/client/sqlcipher.py6
2 files changed, 7 insertions, 1 deletions
diff --git a/client/changes/bug_always-initialize-the-sync-db b/client/changes/bug_always-initialize-the-sync-db
new file mode 100644
index 00000000..2b12989a
--- /dev/null
+++ b/client/changes/bug_always-initialize-the-sync-db
@@ -0,0 +1,2 @@
+ o Always initialize the sync db to allow for both asynchronous encryption
+ and asynchronous decryption when syncing.
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(