-
Notifications
You must be signed in to change notification settings - Fork 36
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 support for new dehydrated device format #199
Conversation
97c798f
to
fbf8e39
Compare
Gonna close and reopen this to see if the codecov thing kicks in. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #199 +/- ##
==========================================
+ Coverage 90.28% 90.38% +0.09%
==========================================
Files 34 34
Lines 1905 1986 +81
==========================================
+ Hits 1720 1795 +75
- Misses 185 191 +6 ☔ View full report in Codecov by Sentry. |
@poljar can I get a review on this PR? Thanks |
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.
Hi, sorry for the late reply, we miscommunicated on who would do the first review.
A good start but needs a bit more polish.
The clippy failure seems to be in code that I did not change. I'm guessing that I should create a new PR to fix that, rather than adding the fixes to this PR. |
Should be fixed in this PR: #200. |
f421d84
to
800719a
Compare
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.
Found a couple of minor things, but I think after that it's good to go.
I'm fuzzing the new target so we have a large corpus that we can run as part of the unit tests (We do that for every fuzz target).
I think that the clippy errors are (again) unrelated to this PR |
Yeah, that lint might not have been the best idea: #203. |
d7240c2
to
8c15db1
Compare
Rebased to get the CI unblocked. |
f1f130f
to
b04448a
Compare
Changelog: Added support for [MSC3814](matrix-org/matrix-spec-proposals#3814), allowing users to export an Olm Account in a serialized format. The serialized account can be uploaded to a server for safekeeping until needed.
b04448a
to
210fb77
Compare
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 added some minor fixes and cleaned up the history which now includes a changelog entry as well.
Thanks for working patiently on this.
private_ed25519_key: account | ||
.signing_key | ||
.unexpanded_secret_key() | ||
.expect("Cannot dehydrate an account created from a libolm pickle"), |
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.
Actually, @uhoreg, won't this pose a problem? In any case I don't think we should use expect()
here.
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.
So the expectation is that we ourselves will always create a new Account when we want to create a dehydrated device, but people may misuse this.
I think we should convert this into a TryFrom
and let the person be aware of this limitation. In the Rust SDK itself we can guarantee that we don't misuse the API and call expect()
there.
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.
Will open a PR.
as documented in the current version of MSC3814
Fixes #196