-
Notifications
You must be signed in to change notification settings - Fork 10
SQLCipher integration with API for storing Session Pro revocations and account seed #74
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
Open
Doy-lee
wants to merge
64
commits into
session-foundation:dev
Choose a base branch
from
Doy-lee:doyle-pro-with-sqlite
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…r from the backend
Pre-empting the idea that libsession should start managing state on behalf of the caller by first having a runtime cache of the Session Pro revocation list that backs up to the DB on update.
Alongside upgrading from 4.6.1 to 4.12 there are a few new changes to some of the conventions followed by SQLCipher which are summarised as follows: - SQLCipher now generates a libsqlite3.a instead of libsqlcipher.a - The include directory mirrors sqlite3 layout so #include <sqlcipher/sqlite3.h> turns into #include <sqlite3.h> - tcl is no longer required as a dependency which was previously used to create the amalgamated SQLite source file (they now have an internal tool jimsh0 to create this if tcl's missing). - Some SQLCipher ./configure options are updated - --with-pic does not exist anymore - --enable-fts5 was updated to --fts5 - --with-tempstore=3 (or =always) was added - -DSQLITE_EXTRA_INIT=sqlcipher_extra_init and -DSQLITE_EXTRA_SHUTDOWN=sqlcipher_extra_shutdown are new defines that must be set
…_CRYPTO_COMMONCRYPTO
…vided by libsession Initially these changes were stored as a separate database library and it was tempting to put everything into the crypto library but from the architecture aspect this didn't seem right. The crypto library contains all the low-level primitives to talk on the Session Protocol. These new changes include a database and a manager for libsession state which exclusively uses the primitives and tooling provided by libsession that merging it into the low-level cryptography didn't seem right. In essence this is more the service layer that provides, _additional_ services for applications to use to book-keep the libsession state such as - persistent storage, i.e. the database - caching of the runtime state of libsession i.e. the core
…it from doing -lFramework
628d31e to
7efbb76
Compare
efe9c66 to
a3064d3
Compare
a3064d3 to
64a9894
Compare
a35144e to
ea1ddb7
Compare
ea1ddb7 to
15e824d
Compare
…oid builds Whilst we can use the new android targets for the ./Configure tool that openssl has, this has issues in that it doesn't support the clang NDK toolchain, it still defaults to gcc and there doesn't seem to be a way to override this without setting CC/AR/CXX/RANLIB e.t.c. Oxen-core can statically build openssl already without issues so we're going to revert back to what it's doing and KISS.
9b41cad to
5871b2c
Compare
b3b4484 to
3be2126
Compare
3be2126 to
8673e75
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This introduces SQLCipher, building on from https://github.com/mpretty-cyro/libsession-util/tree/feature/initial-database# The database is exposed under the
session::database::Connectioninterface and we also in addition to that introduce a overarching managing class dubbedsession::core::Corethat manages requests going into the database, caching queries before insertion and returning results from caches instead of the DB if it hasn't been invalidated yet.The intended usage pattern of the new code looks something like this: