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

breaking sqlcipher usage update #132

Merged
merged 3 commits into from
Aug 22, 2024
Merged

breaking sqlcipher usage update #132

merged 3 commits into from
Aug 22, 2024

Conversation

neonphog
Copy link
Collaborator

@neonphog neonphog commented Aug 20, 2024

Summary

  • upgrade rusqlite
  • pin cipher_compatibility to version 4
  • apply ios workaround
  • track salt in config, and pragma as consequence of ios workaround

TODO:

  • CHANGELOG(s) updated with appropriate info

@neonphog neonphog marked this pull request as ready for review August 21, 2024 22:41
.map_err(one_err::OneErr::new)?;
}

conn.execute_batch(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a test for migration that will open the newly encrypted database with the same compatibility settings right?

Just thinking ahead to when we move versions and only remember to update one :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. In fact the workflow is:

  • to try to open the database
  • on error, run this encrypt_unencrypted_database function
  • then re-run the normal open the database command

So it ends up testing itself : )

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(and yes, there's a migrate_unencrypted test that triggers this code to be run.)

Copy link
Member

@ThetaSinner ThetaSinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had a look at the sqlcipher docs and I think I understand what this is doing. Looks good to me!

@neonphog neonphog merged commit 70e2bd9 into main Aug 22, 2024
14 checks passed
@neonphog neonphog deleted the sqlcipher-update branch August 22, 2024 15:28
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