aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/database.vala
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 /libdino/src/service/database.vala
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 'libdino/src/service/database.vala')
-rw-r--r--libdino/src/service/database.vala3
1 files changed, 3 insertions, 0 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala
index 8b32c107..39dcf234 100644
--- a/libdino/src/service/database.vala
+++ b/libdino/src/service/database.vala
@@ -246,6 +246,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) {