Skip to content
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

Perform crypto migration if necessary #1684

Merged
merged 5 commits into from
Jan 23, 2023
Merged

Perform crypto migration if necessary #1684

merged 5 commits into from
Jan 23, 2023

Conversation

Anderas
Copy link
Contributor

@Anderas Anderas commented Jan 16, 2023

Add mechanism that will migrate legacy crypto database into the new rust-based crypto sdk if neccessary. This is tracked via an existing MXCryptoVersion enum that now has a new ...Deprecated variant. If we then launch crypto V2 whilst legacy database is not yet deprecated, we will trigger migration, and if successful, write the deprecated version into the legacy db.

Another change in this PR is separating isAvailable and isEnabled parameters for the new crypto sdk. One serves as a feature flag around the entire SDK, controlling whether we show any labs options to the user, whereas the other controls whether we are actually using the legacy or rust-based crypto.

Lastly add a few more integration tests for migration (notably cross-signing status), though the test will currently fail until rust-side PR is merged

@Anderas Anderas requested review from a team and flescio and removed request for a team January 16, 2023 12:09
@Anderas Anderas merged commit 0d66c81 into develop Jan 23, 2023
@Anderas Anderas deleted the andy/migrate_crypto branch January 23, 2023 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants