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

Test Application ID In Leaf Node #10

Closed
wants to merge 2 commits into from
Closed

Conversation

neekolas
Copy link

@neekolas neekolas commented Jan 6, 2024

The OpenMLS spec describes application_id as something on the leaf node

If needed, applications may add application-specific identifiers to the extensions field of a LeafNode object with the application_id extension.

As implemented in OpenMLS, application_ids set on the key package do not make their way into the extensions of the leaf node. I am not sure if this is an oversight or not. I've added a test case that demonstrates this behaviour, and am happy to make a PR to OpenMLS to allow for this pass-through if we think it's desirable.

Or is the idea that one should always put the application ID extension as both a KeyPackage extension and a leaf node extension?

@github-actions github-actions bot added the size/s label Jan 6, 2024
.expect("error decoding key package with last resort extension")
.validate(provider.crypto(), ProtocolVersion::default())
.expect("error validating key package with last resort extension");
assert!(decoded_kp.extensions().application_id().is_some());
Copy link
Author

Choose a reason for hiding this comment

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

This will pass

.validate(provider.crypto(), ProtocolVersion::default())
.expect("error validating key package with last resort extension");
assert!(decoded_kp.extensions().application_id().is_some());
assert!(decoded_kp
Copy link
Author

Choose a reason for hiding this comment

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

This will fail

@neekolas neekolas closed this Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant