Skip to content

Conversation

@BillCarsonFr
Copy link
Member

Fixes #4446

@BillCarsonFr BillCarsonFr requested a review from bmarty November 10, 2021 15:56
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

LGTM on the impl side (not sure what it is doing/fixing though). Just a remark about doc, which could help me to get some context actually

private val signatures: Map<String, Map<String, String>>
private val signatures: Map<String, Map<String, String>>,

private val rawMap: JsonDict
Copy link
Member

Choose a reason for hiding this comment

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

Can you add doc like other fields please?

Copy link
Member Author

Choose a reason for hiding this comment

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

added

@github-actions
Copy link

github-actions bot commented Nov 10, 2021

Unit Test Results

  62 files  ±0    62 suites  ±0   46s ⏱️ -10s
118 tests ±0  118 ✔️ ±0  0 💤 ±0  0 ±0 
350 runs  ±0  350 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit b304ef8. ± Comparison against base commit 474e2aa.

♻️ This comment has been updated with latest results.

@BillCarsonFr
Copy link
Member Author

LGTM on the impl side (not sure what it is doing/fixing though). Just a remark about doc, which could help me to get some context actually

There are more details in the linked issue.
But basically when we need to share a megolm key and that we don't have an existing olm session with a target device we need to create one.

This is done by claiming a one time key to establish outbound session.
But before creating the olm session we first check the otk signature. And in the case of the fallback key the signature check will currently fail because we don't include the correct fileds in the json that is signed

The code that gets the signable json is wrong signalableJSONDictionaryit was adding only the keyhardcoded. Instead of removing unsigned and signature from the raw otk json

@BillCarsonFr BillCarsonFr merged commit c8577eb into develop Nov 12, 2021
@BillCarsonFr BillCarsonFr deleted the feature/bca/fix_fallback_key_support branch November 12, 2021 13:33
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.

Unable to establish Olm outbound session from fallback key (BAD_MAC error when verifying signature)

3 participants