-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
add export/import of Olm devices #1167
add export/import of Olm devices #1167
Conversation
- only exporting account and P2P sessions - test is halfway done: - it only prints the export result instead of running assertions on it - there are no sessions to export Note: to run only the added test: node_modules/.bin/jest spec/unit/crypto/algorithms/olm.spec.js --testEnvironment node --testNamePattern OlmDevice
it should suffice that the exported data allows to recreate a device that can do crypto
not sure how to test these high-level methods though
woops, tests fail. |
I'll fix the lint errors as well. Sorry for the mess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just done a quick review for now and flagged a few minor issues. I'll try to do a more thorough review next week, but from a brief skim, it looks fairly sane.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just a few more changes, and and I think we'll be good to go.
Plus, can you add a comment to this PR that has your signoff as per https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.rst#sign-off .
Co-Authored-By: Hubert Chathi <hubert@uhoreg.ca>
Co-Authored-By: Hubert Chathi <hubert@uhoreg.ca>
Co-Authored-By: Hubert Chathi <hubert@uhoreg.ca>
Signed-off-by: Cédric Van Rompay <cedric.vanrompay@gmail.com>
Signed off with commit b217f6a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks for your contribution, Cedric!
Adds an
export
method to Olm device that exports the device “account” and “sessions”.Adds a parameter to the asynchronous initialization of the Olm device to import data that was exported with the said export method.
Adds methods to Matrix Client to expose these methods at a high level, including the device ID and user ID in the exported data (and using them during import).
Adds Jest tests for export/import at the Olm device level, and a HTML + JS document to try the mechanism in the browser at a high level in a non-automated way.