From 7a02404f7ba1b5b399d22f096cfb2a33a03c275f Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Thu, 6 May 2021 12:32:25 -0400 Subject: [PATCH] Update SQLCipher to v4.4.3 --- app/build.gradle | 11 ++++------- .../securesms/database/SqlCipherDatabaseHook.java | 2 ++ app/witness-verifications.gradle | 9 ++++++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index d913adf9c..5b644f680 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -25,12 +25,6 @@ repositories { includeGroupByRegex "com\\.github\\.dmytrodanylyk\\.circular-progress-button\\.*" } } - maven { - url "https://raw.github.com/signalapp/maven/master/sqlcipher/release/" - content { - includeGroupByRegex "org\\.signal.*" - } - } maven { // textdrawable url 'https://dl.bintray.com/amulyakhare/maven' content { @@ -432,7 +426,10 @@ dependencies { implementation 'com.codewaves.stickyheadergrid:stickyheadergrid:0.9.4' implementation 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3-S2' - implementation 'org.signal:android-database-sqlcipher:3.5.9-S3' + + implementation "net.zetetic:android-database-sqlcipher:4.4.3" + implementation "androidx.sqlite:sqlite:2.1.0" + implementation ('com.googlecode.ez-vcard:ez-vcard:0.9.11') { exclude group: 'com.fasterxml.jackson.core' exclude group: 'org.freemarker' diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/SqlCipherDatabaseHook.java b/app/src/main/java/org/thoughtcrime/securesms/database/SqlCipherDatabaseHook.java index 88e5c7351..6329c8807 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/SqlCipherDatabaseHook.java +++ b/app/src/main/java/org/thoughtcrime/securesms/database/SqlCipherDatabaseHook.java @@ -16,6 +16,8 @@ public final class SqlCipherDatabaseHook implements SQLiteDatabaseHook { @Override public void postKey(SQLiteDatabase db) { + db.rawExecSQL("PRAGMA cipher_compatibility = 3;"); + db.rawExecSQL("PRAGMA cipher_memory_security = OFF;"); db.rawExecSQL("PRAGMA kdf_iter = '1';"); db.rawExecSQL("PRAGMA cipher_page_size = 4096;"); } diff --git a/app/witness-verifications.gradle b/app/witness-verifications.gradle index 8c01eaa3f..915fcc24b 100644 --- a/app/witness-verifications.gradle +++ b/app/witness-verifications.gradle @@ -174,6 +174,9 @@ dependencyVerification { ['androidx.slidingpanelayout:slidingpanelayout:1.0.0', '76bffb7cefbf780794d8817002dad1562f3e27c0a9f746d62401c8edb30aeede'], + ['androidx.sqlite:sqlite:2.1.0', + '8341ff092d6060d62a07227f29237155fff36fb16f96c95fbd9a884e375db912'], + ['androidx.swiperefreshlayout:swiperefreshlayout:1.0.0', '9761b3a809c9b093fd06a3c4bbc645756dec0e95b5c9da419bc9f2a3f3026e8d'], @@ -450,6 +453,9 @@ dependencyVerification { ['mobi.upod:time-duration-picker:1.1.3', 'db469ce0f48dd96b892eac424ed76870e54bf00fe0a28cdcddfbe5f2a226a0e1'], + ['net.zetetic:android-database-sqlcipher:4.4.3', + '64cf472e3f6c3300fd7307aebb74dfff4eeb3805f138045c83362c7687e4af61'], + ['org.apache.httpcomponents:httpclient-android:4.3.5', '6f56466a9bd0d42934b90bfbfe9977a8b654c058bf44a12bdc2877c4e1f033f1'], @@ -495,9 +501,6 @@ dependencyVerification { ['org.signal:aesgcmprovider:0.0.3', '6eb4422e8a618b3b76cb2096a3619d251f9e27989dc68307a1e5414c3710f2d1'], - ['org.signal:android-database-sqlcipher:3.5.9-S3', - '33d4063336893af00b9d68b418e7b290cace74c20ce8aacffddc0911010d3d73'], - ['org.signal:argon2:13.1', '0f686ccff0d4842bfcc74d92e8dc780a5f159b9376e37a1189fabbcdac458bef'],