Skip to content

feat: allow to bypass KeyPackage/LeafNode validation - #2045

Merged
raphaelrobert merged 5 commits into
openmls:mainfrom
boxdot:dima/validation-bypass
Jun 15, 2026
Merged

raphaelrobert merged 5 commits into
openmls:mainfrom
boxdot:dima/validation-bypass

Conversation

@boxdot

@boxdot boxdot commented Jun 2, 2026 •

Copy link
Copy Markdown
Contributor

Add functions that allow unchecked conversion of KeyPackageIn,
LeafNodeIn, Extensions into already verified types. Intended
for callers that have verified the input through another path.

This feature is behind a feature flag unchecked-conversions.

…tion

Add functions that allow assuming a `KeyPackage` and `LeafNode` are
already verified, constructing the validated types without re-running
signature/struct validation. Intended for callers that have verified
the input through another path.
@boxdot boxdot changed the title feat: add unchecked constructors to bypass KeyPackage/LeafNode validation feat: allow to bypass KeyPackage/LeafNode validation Jun 2, 2026
@keks

keks commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

I think this generally makes sense. Any reason not to also have a non-checking function for converting the Extensions without checking?

@boxdot

boxdot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

I think this generally makes sense. Any reason not to also have a non-checking function for converting the Extensions without checking?

No particular reason. It can be introduced for any In/Out type, however I did not want to do it upfront. Only in case somebody needs it.

@boxdot
boxdot marked this pull request as ready for review June 10, 2026 12:31
@boxdot
boxdot requested a review from a team as a code owner June 10, 2026 12:31
@boxdot

boxdot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Added unchecked conversion for Extensions and a feature flag unchecked-conversions.

@raphaelrobert raphaelrobert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, let's get this in!

@raphaelrobert
raphaelrobert merged commit ca2ceb7 into openmls:main Jun 15, 2026
39 of 40 checks passed
boxdot added a commit that referenced this pull request Jun 18, 2026
The function should have been infallible from the beginning. This is a
remnant from #2045.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants