add export/import of Olm devices#1167
Merged
uhoreg merged 23 commits intomatrix-org:developfrom Feb 6, 2020
Merged
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
Contributor
Author
|
woops, tests fail. |
Contributor
Author
|
I'll fix the lint errors as well. Sorry for the mess |
uhoreg
requested changes
Jan 24, 2020
Member
uhoreg
left a comment
There was a problem hiding this comment.
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.
uhoreg
requested changes
Jan 29, 2020
Member
uhoreg
left a comment
There was a problem hiding this comment.
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>
Contributor
Author
|
Signed off with commit b217f6a |
uhoreg
approved these changes
Feb 6, 2020
Member
uhoreg
left a comment
There was a problem hiding this comment.
Looks good. Thanks for your contribution, Cedric!
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
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.
Adds an
exportmethod 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.