openmls
openmls copied to clipboard
Find a way to generate illegal messages so we can test validation
Currently, we often can not create illegal messages, because the functions building them validate the input data. However, this means it is difficult for us to test the validation of incoming illegal messages. We need a general approach to this.
One approach that has been discussed is to have a second protocol implementation that can generate these messages.
Another approach would be to introduce a way to disable validation. This could be done either using boolean flags in the control flow (which seems fragile and prone to errors) or something like a ValidationProvider. One problem that might occur here is that the sender might break their local state when trying to perform illegal operations, but this might be okay in test scenarios.