-
Notifications
You must be signed in to change notification settings - Fork 212
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
Define MXCrypto and MXCrossSigning as protocols #1614
Conversation
cb57209
to
e6d70f0
Compare
092d867
to
26301f3
Compare
Codecov ReportBase: 15.77% // Head: 36.35% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #1614 +/- ##
============================================
+ Coverage 15.77% 36.35% +20.57%
============================================
Files 575 577 +2
Lines 90921 90959 +38
Branches 38355 39578 +1223
============================================
+ Hits 14347 33068 +18721
+ Misses 76107 56909 -19198
- Partials 467 982 +515
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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 to me. The only question I have is whether you might want to rename some of the files to …Legacy…
to match updated class names?
@@ -179,6 +174,20 @@ typedef NS_ENUM(NSInteger, MXCrossSigningErrorCode) | |||
onPrivateKeysReceived:(void (^)(void))onPrivateKeysReceived | |||
failure:(void (^)(NSError *error))failure; | |||
|
|||
/** | |||
Does given secret, interpreted as a private key, match given public cross-signing key |
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.
Does given secret, interpreted as a private key, match given public cross-signing key | |
Does the given secret, interpreted as a private key, match given public cross-signing key |
// These methods and properties will not be available in MXCrossSigningV2 and therefore given | ||
// integration tests cannot be run (or have to be re-written). | ||
var legacyCrossSigning: MXLegacyCrossSigning? { | ||
guard let crossSignign = crossSigning else { |
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.
guard let crossSignign = crossSigning else { | |
guard let crossSigning = crossSigning else { |
004c2da
to
8fbd5d1
Compare
26301f3
to
cafabf0
Compare
cafabf0
to
2be4bb0
Compare
I do plan to align all the naming (and potentially replace V2 with something more sensible), but I think adding |
Cross-sign self after restoring session with Crypto V2
Convert
MXCrypto
andMXCrossSigning
into protocols and define..Legacy..
implementations for both. These two types are the last two that were previously overriden by rust-based V2 implementations, but can now be relatively safely converted into protocols.To make the conversion possible a number of changes were made:
MXCrypto_Private
.Note that this PR does minimum changes to the actual protocols to ease the review of this PR. Future PRs will further tweak the protocol requirements and add nullability support for
MXCrypto