-
-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggested change to support SQLite Encryption Extension #506
Comments
Hello @BenRB, You have well explained your trouble. I know that the current GRDB code tests both I would be happy to review a pull request that cleans up this situation. |
Thank you for the response. I now have a local version which appears to work with the encryption extension which I can push to my fork and open a pull request for initial review. It has the basics working and passes the same tests as the SQLCipher version (but updated with slightly different API). Do you still want it based off the development branch? I have been working with Swift 5/Xcode 10.2 so perhaps it is best to base it on the GRDB-4.0 branch? Which is better for you? |
@BenRB I would be glad with your pull request! And as you have noticed, GRDB 4 is on the way. Yes, the GRDB-4.0 branch is the perfect target 👍 |
Discussion has moved to #509. |
I am building GRDBCustomSQLite so that I can use the SQLite Encryption Extension (for which I have purchased a license).
Unfortunately, GRDB appears to not support this and only supports SQLCipher for encrypted databases.
Using SQLite-SEE, my custom build has defined the preprocessor macro
SQLITE_HAS_CODEC
.When this is defined, GRDB attempts to validate that SQLCipher has been correctly linked.
In this case however, we don't want to perform validation as the custom SQLite build has taken care of encryption duties.
I would like to request that we adjust this following section of code to allow support for custom SQLite-SEE builds. I am happy to offer a pull request with changes/doc updates if that would help.
My suggestion would be to change occurrences of:
#if SQLITE_HAS_CODEC
to
#if SQLITE_HAS_CODEC && !GRDB_SQLITE_SEE
Then if we want to use a custom build of SQLite-SEE, we can define
GRDB_SQLITE_SEE
in the.xcconfig
files and will bypass the SQLCipher check.If the extra macro is not defined, then there is no impact on existing users.
**GRDB flavor(s): GRDBCustom
**GRDB version: v3.7
**Installation method: Manual
**Xcode version: 10.2
**Swift version: 5
**Platform(s) running GRDB: iOS/macOS
**macOS version running Xcode: 10.14.4
The text was updated successfully, but these errors were encountered: