diff --git a/CHANGES.md b/CHANGES.md index 2912c034..6e662a1a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,8 @@ # Changes -## cordova-sqlcipher-adapter 0.1.12-pre2 +## cordova-sqlcipher-adapter 0.1.12-rc1 +- SQLCipher for Android 3.5.9 Gradle reference - SQLCipher 3.4.2 for iOS/macOS - Windows platform build disabled (no longer tested in this plugin version; CRYPTO no longer enabled in Windows SQLite3 library build; unwanted libTomCrypt provider completely removed) diff --git a/README.md b/README.md index 9506eccd..98fac937 100644 --- a/README.md +++ b/README.md @@ -120,35 +120,42 @@ See the [Sample section](#sample) for a sample with a more detailed explanation - _Windows platform support is now disabled in this plugin version, with CRYPTO provider (libTomCrypt) completely removed (ref: [litehelpers / Cordova-sqlcipher-adapter#63](https://github.com/litehelpers/Cordova-sqlcipher-adapter/issues/63)). For future consideration: enable Windows build again with encryption using a recent build of the OpenSSL crypto library ref: [litehelpers/Cordova-sqlcipher-adapter#30](https://github.com/litehelpers/Cordova-sqlcipher-adapter/issues/30)_ - __Alpha version:__ - SQLCipher `3.4.2` for iOS/macOS~~/Windows~~ - - SQLCipher `3.5.6` for Android built from [brodybits / android-database-sqlcipher-build-fix](https://github.com/brodybits/android-database-sqlcipher-build-fix), now with 64-bit CPU support + - SQLCipher `3.5.9` for Android (Gradle reference) - `SQLITE_DEFAULT_PAGE_SIZE=1024` and `SQLITE_DEFAULT_CACHE_SIZE=2000` to avoid "potentially distruptive change(s)" from SQLite 3.12.0 in unencrypted databases ref: - with OpenSSL libcrypto for Android - using CommonCrypto framework for iOS/macOS - _NO ENCRYPTION ENABLED (completely removed)_ for Windows - for future consideration: embed OpenSSL libcrypto for all target platforms - This plugin is NOT supported by PhoneGap Developer App or PhoneGap Desktop App. -- This plugin will NOT work on `cordova-android@7` due to issue with JAR and NDK library files as discussed in [litehelpers / Cordova-sqlcipher-adapter/issues/64](https://github.com/litehelpers/Cordova-sqlcipher-adapter/issues/64) and [litehelpers/Cordova-sqlite-storage#729](https://github.com/litehelpers/Cordova-sqlite-storage/issues/729). -- A recent version of the Cordova CLI (such as `6.5.0` / `7.1.0`) is recommended. (Cordova CLI 8.x includes `cordova-android@7`, NOT supported by this plugin due to [litehelpers / Cordova-sqlcipher-adapter/issues/64](https://github.com/litehelpers/Cordova-sqlcipher-adapter/issues/64) / [litehelpers/Cordova-sqlite-storage#729](https://github.com/litehelpers/Cordova-sqlite-storage/issues/729).) Cordova versions older than `6.0.0` are missing the `cordova-ios@4.0.0` security fixes. In addition it is *required* to use `cordova prepare` in case of cordova-ios older than `4.3.0` (Cordova CLI `6.4.0`). -- _This plugin version will NOT work on `cordova-android@7` due to [litehelpers / Cordova-sqlcipher-adapter/issues/64](https://github.com/litehelpers/Cordova-sqlcipher-adapter/issues/64) / [litehelpers/Cordova-sqlite-storage#729](https://github.com/litehelpers/Cordova-sqlite-storage/issues/729)._ +- A recent version of the Cordova CLI (such as `6.5.0` / `7.1.0` / `8.0.0`) is recommended. Cordova versions older than `6.0.0` are missing the `cordova-ios@4.0.0` security fixes. In addition it is *required* to use `cordova prepare` in case of cordova-ios older than `4.3.0` (Cordova CLI `6.4.0`). - SQLCipher build settings used: - `SQLITE_HAS_CODEC` _(no longer enabled in Windows SQLite3 library build)_ + - `SQLITE_SOUNDEX` (Android only) + - `SQLITE_MAX_VARIABLE_NUMBER=99999` (Android only) - `SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576` (Android only) - `HAVE_USLEEP=1` - `SQLITE_TEMP_STORE=3` - `SQLCIPHER_CRYPTO_CC` (iOS/macOS only) - `SQLITE_LOCKING_STYLE=1` (iOS/macOS only) + - `DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576` (Android only) - `NDEBUG` (`NDEBUG=1` on Android) - `SQLITE_THREADSAFE=1` (`SQLITE_THREADSAFE=2` on iOS/macOS) - - `SQLITE_DEFAULT_MEMSTATUS=0` - - `SQLITE_OMIT_DECLTYPE` + - `DSQLITE_ENABLE_MEMORY_MANAGEMENT=1` (Android only) + - `SQLITE_DEFAULT_MEMSTATUS=0` (iOS/macOS/...) + - `SQLITE_OMIT_DECLTYPE` (iOS/macOS/...) - _~~`SQLITE_OMIT_DEPRECATED`~~ (FUTURE TODO)_ - - `SQLITE_OMIT_PROGRESS_CALLBACK` - - `SQLITE_OMIT_SHARED_CACHE` - - `SQLITE_OMIT_LOAD_EXTENSION` + - `SQLITE_OMIT_PROGRESS_CALLBACK` (iOS/macOS/...) + - `SQLITE_OMIT_SHARED_CACHE` (iOS/macOS/...) + - `SQLITE_ENABLE_LOAD_EXTENSION` (Android only) + - `SQLITE_OMIT_LOAD_EXTENSION` (iOS/macOS/...) + - `SQLITE_ENABLE_COLUMN_METADATA` (Android only) + - `SQLITE_ENABLE_UNLOCK_NOTIFY` (Android only) - `SQLITE_ENABLE_FTS3` (iOS/macOS/Windows) - `SQLITE_ENABLE_FTS3_PARENTHESIS` - `SQLITE_ENABLE_FTS4` - `SQLITE_ENABLE_RTREE` + - `SQLITE_ENABLE_STAT3` (Android only) + - `SQLITE_ENABLE_STAT4` (Android only) - `SQLITE_ENABLE_FTS5` - `SQLITE_ENABLE_JSON1` - `SQLITE_DEFAULT_PAGE_SIZE=1024` (all platforms) and `SQLITE_DEFAULT_CACHE_SIZE=2000` (iOS/macOS/Windows) to avoid "potentially distruptive change(s)" from SQLite 3.12.0 ref: @@ -471,7 +478,6 @@ See **Security of sensitive data** in the [Security](#security) section above. ## Known issues -- This plugin will NOT work on `cordova-android@7` due to issue with JAR and NDK library files as discussed in [litehelpers / Cordova-sqlcipher-adapter/issues/64](https://github.com/litehelpers/Cordova-sqlcipher-adapter/issues/64) and [litehelpers/Cordova-sqlite-storage#729](https://github.com/litehelpers/Cordova-sqlite-storage/issues/729). - The iOS/macOS platform versions do not support certain rapidly repeated open-and-close or open-and-delete test scenarios due to how the implementation handles background processing - ~~The Android platform version does not always handle four-byte UTF-8 characters emoji characters such as `\u1F603` (SMILING FACE, MOUTH OPEN) correctly ref: [litehelpers/Cordova-sqlite-storage#564](https://github.com/litehelpers/Cordova-sqlite-storage/issues/564). It is sometimes possible to store and retrieve such characters but certain operations such as hex conversions do not work properly when using the default [Android-sqlite-connector](https://github.com/liteglue/Android-sqlite-connector) database implementation. It is suspected that such characters would be stored incorrectly by the default Android platform version. Note that this is not an issue in case the built-in Android database is used (using the `androidDatabaseImplementation: 2` setting in `window.sqlitePlugin.openDatabase`)~~ _(NOT an issue in this plugin version)_ - Cannot read encrypted database with CORRECT password directly after attempt to open with INCORRECT password ref: [litehelpers/Cordova-sqlcipher-adapter#43](https://github.com/litehelpers/Cordova-sqlcipher-adapter/issues/43) diff --git a/package.json b/package.json index bb202b58..175886ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-sqlcipher-adapter", - "version": "0.1.12-pre2", + "version": "0.1.12-rc1", "description": "SQLCipher database adapter for PhoneGap/Cordova, based on cordova-sqlite-storage", "cordova": { "id": "cordova-sqlcipher-adapter", diff --git a/plugin.xml b/plugin.xml index 42a7b439..0dd8d67c 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="0.1.12-rc1"> Cordova sqlcipher adapter @@ -43,13 +43,13 @@ ... --> - - - - - - - + + + diff --git a/spec/www/spec/sqlite-version-test.js b/spec/www/spec/sqlite-version-test.js index 61f55883..c294ede1 100755 --- a/spec/www/spec/sqlite-version-test.js +++ b/spec/www/spec/sqlite-version-test.js @@ -69,7 +69,7 @@ var mytests = function() { expect(rs.rows.item(0).myResult).toMatch(/3\.[0-9]+\.[0-9]+/); // Check specific [plugin only]: if (!isWebSql /*&& !(!isWindows && isAndroid && isImpl2)*/) - expect(rs.rows.item(0).myResult).toBe(isAndroid ? '3.15.2' : '3.20.1'); + expect(rs.rows.item(0).myResult).toBe('3.20.1'); // Close (plugin only) & finish: (isWebSql) ? done() : db.close(done, done); diff --git a/src/android/sqlcipher/libs/arm64-v8a/libsqlcipher.so b/src/android/sqlcipher/libs/arm64-v8a/libsqlcipher.so deleted file mode 100755 index f99b4c10..00000000 Binary files a/src/android/sqlcipher/libs/arm64-v8a/libsqlcipher.so and /dev/null differ diff --git a/src/android/sqlcipher/libs/armeabi-v7a/libsqlcipher.so b/src/android/sqlcipher/libs/armeabi-v7a/libsqlcipher.so deleted file mode 100755 index 1f398586..00000000 Binary files a/src/android/sqlcipher/libs/armeabi-v7a/libsqlcipher.so and /dev/null differ diff --git a/src/android/sqlcipher/libs/armeabi/libsqlcipher.so b/src/android/sqlcipher/libs/armeabi/libsqlcipher.so deleted file mode 100755 index 61cae63f..00000000 Binary files a/src/android/sqlcipher/libs/armeabi/libsqlcipher.so and /dev/null differ diff --git a/src/android/sqlcipher/libs/sqlcipher.jar b/src/android/sqlcipher/libs/sqlcipher.jar deleted file mode 100644 index 4fef2e48..00000000 Binary files a/src/android/sqlcipher/libs/sqlcipher.jar and /dev/null differ diff --git a/src/android/sqlcipher/libs/x86/libsqlcipher.so b/src/android/sqlcipher/libs/x86/libsqlcipher.so deleted file mode 100755 index 298f5a90..00000000 Binary files a/src/android/sqlcipher/libs/x86/libsqlcipher.so and /dev/null differ diff --git a/src/android/sqlcipher/libs/x86_64/libsqlcipher.so b/src/android/sqlcipher/libs/x86_64/libsqlcipher.so deleted file mode 100755 index b434a9e5..00000000 Binary files a/src/android/sqlcipher/libs/x86_64/libsqlcipher.so and /dev/null differ