aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/logic
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2020-02-21 20:48:57 +0100
committerfiaxh <git@lightrise.org>2020-02-21 20:49:36 +0100
commitb9125b7e3e080caa2c5f233a22f62136322eb077 (patch)
tree2bed12171e956bb4de66d79c1b5bb47af7a853f4 /plugins/omemo/src/logic
parent65039b4c23a0aa9a06805daeeb1c2c66d3e8e20d (diff)
downloaddino-b9125b7e3e080caa2c5f233a22f62136322eb077.tar.gz
dino-b9125b7e3e080caa2c5f233a22f62136322eb077.zip
Enable secure_delete PRAGMA on SQLite databases (#370)
It is especially important for OMEMO database, as it stores *ephemeral* keys
Diffstat (limited to 'plugins/omemo/src/logic')
-rw-r--r--plugins/omemo/src/logic/database.vala3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/omemo/src/logic/database.vala b/plugins/omemo/src/logic/database.vala
index 6243569f..7a320696 100644
--- a/plugins/omemo/src/logic/database.vala
+++ b/plugins/omemo/src/logic/database.vala
@@ -233,6 +233,9 @@ public class Database : Qlite.Database {
try {
exec("PRAGMA synchronous=0");
} catch (Error e) { }
+ try {
+ exec("PRAGMA secure_delete=1");
+ } catch (Error e) { }
}
public override void migrate(long oldVersion) {