Skip to content
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

OpenMLS Updates #21

Closed
wants to merge 26 commits into from
Closed

OpenMLS Updates #21

wants to merge 26 commits into from

Conversation

zombieobject
Copy link

While I was able to merge and resolve the conflicts in the upstream merge, I do get the following error output during cargo build. It's most likely that I made some flawed choices during conflict resolution.

warning: unused variable: `group_keypairs`
   --> openmls/src/group/core_group/new_from_welcome.rs:177:13
    |
177 |         let group_keypairs = if let Some(path_secret) = path_secret_option {
    |             ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_group_keypairs`
    |
    = note: `#[warn(unused_variables)]` on by default

error[E0382]: use of moved value
   --> openmls/src/group/core_group/new_from_welcome.rs:246:41
    |
127 |         let path_secret_option = group_secrets.path_secret;
    |                                  ------------------------- value moved here
...
246 |         let path_keypairs = if let Some(path_secret) = group_secrets.path_secret {
    |                                         ^^^^^^^^^^^ value used here after move
    |
    = note: move occurs because `group_secrets.path_secret` has type `std::option::Option<messages::PathSecret>`, which does not implement the `Copy` trait

error[E0382]: use of moved value: `leaf_keypair`
   --> openmls/src/group/core_group/new_from_welcome.rs:274:13
    |
32  |         let leaf_keypair = EncryptionKeyPair::read_from_key_store(
    |             ------------ move occurs because `leaf_keypair` has type `encryption_keys::EncryptionKeyPair`, which does not implement the `Copy` trait
...
192 |             vec![leaf_keypair]
    |                  ------------ value moved here
...
197 |             vec![leaf_keypair]
    |                  ------------ value moved here
...
274 |             leaf_keypair,
    |             ^^^^^^^^^^^^ value used here after move
    |
help: consider cloning the value if the performance cost is acceptable
    |
197 |             vec![leaf_keypair.clone()]
    |                              ++++++++
help: consider cloning the value if the performance cost is acceptable
    |
192 |             vec![leaf_keypair.clone()]
    |                              ++++++++

For more information about this error, try `rustc --explain E0382`.
warning: `openmls` (lib) generated 1 warning
error: could not compile `openmls` (lib) due to 2 previous errors; 1 warning emitted

keks and others added 26 commits January 25, 2024 10:12
Co-authored-by: Jan Winkelmann (keks) <[email protected]>
Fix typo in documentation: Member -> External

Co-authored-by: raphaelrobert <[email protected]>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: raphaelrobert <[email protected]>
This PR addresses issue openmls#1487. The problem is that currently the list of extensions in a GroupContextExtensions proposal is compared against the capabilities of the current members. Instead, it needs to

 -   check that the RequiredCapabilities of the group are satisfied by all members of the group
 -   check that the types of all extensions in the proposal are in the RequiredCapabilities.

This PR also adds a method on the RequiredCapabilitiesExtension for checking whether an extension type is supported. This is needed because the extension types defined in the RFC are supported implicitly, so we also have to compare against the defaults. The defaults are defined close to the Capabilities struct and used to be private to these modules. I made the one for extension types pub(crate) so I can check against it.

---------

Co-authored-by: Jan Winkelmann (keks) <[email protected]>
Co-authored-by: raphaelrobert <[email protected]>
* Improve processing

* Fix typos

Co-authored-by: Jonas Vautherin <[email protected]>

---------

Co-authored-by: Jonas Vautherin <[email protected]>
* Remove unnecessary cloning of proposals

* Remove to_owned()

---------

Co-authored-by: Konrad Kohbrok <[email protected]>
* Cleanup unused CoreGroup methods

* Address review comments
* Introduce InitKey type for KeyPackages

* Address review comments
This commit changes OpenMLS such that it can handle arbitrary credentials, as long as they are encoded as a variable-length vector.
* check for last resort in core_group/new_from_welcome

* test join_multiple_groups_last_resort_extension

* changelog includes PR#1503

---------

Co-authored-by: Joseph Lukefahr <[email protected]>
Co-authored-by: Konrad Kohbrok <[email protected]>
Co-authored-by: Franziskus Kiefer <[email protected]>
This commit adds the above types to make it possible to inspect the content
of a Welcome message before joining a group.

Fixes: openmls#1326 openmls#1506
Co-authored-by: raphaelrobert <[email protected]>
…1525)

This PR adds minimal Wasm bindings and example code, and a github action workflow that measures the size of the built bundle (currently around 1.2MB uncompressed, 450kB gzip'd). It fails when it gets significantly larger.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Franziskus Kiefer <[email protected]>
* Improve BasicCredential

* Address review comments

* Fix new CI errors
* add DeserializeBytes impl for MlsMessageIn

* add getter for body of MlsMessageOut

* add getter for MlsGroup extensions

* expose group info extensions and signature

* expose PublicMessage content type

* add convenience function to mark kp as last resort
Co-authored-by: Jan Winkelmann (keks) <[email protected]>
Co-authored-by: raphaelrobert <[email protected]>
* WIP: function probably works

* clear_pendind_proposals made public

* changelog entry for PR#1516

* additional comments warning against use of clear_pending_proposals

* additional logic in clearing pending proposals

* improved grammar and code placement for clear_pending_proposals

---------

Co-authored-by: Joseph Lukefahr <[email protected]>
Co-authored-by: raphaelrobert <[email protected]>
)

In openmls#1506 we not only added the StagedWelcome types, but also made the methods to create them consume an MlsMessageIn instead of a Welcome. This was done at the time because there was the open issue openmls#1326 that asked to do this, and we didn't check whether that really was a good idea.

It wasn't.

This PR keeps StagedWelcome, but makes the method that create these structs a Welcome instead of a MlsMessageIn.

Fixes openmls#1519.
# Conflicts:
#	openmls/src/extensions/test_extensions.rs
#	openmls/src/group/core_group/new_from_welcome.rs
#	openmls/src/group/errors.rs
#	openmls/src/group/public_group/validation.rs
@zombieobject zombieobject added the help wanted Extra attention is needed label Mar 19, 2024
@zombieobject zombieobject self-assigned this Mar 19, 2024
Copy link

This PR is so big! Please, split it 😊

@zombieobject
Copy link
Author

zombieobject commented Mar 19, 2024

Getting shamed by a GitHub action for an upstream merge is an achievement unlocked. Where's my badge? 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed size/xl
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants