mbedtls
mbedtls copied to clipboard
Fix early data send and receive on client and server
Summary: Courtesy to Bill Warshaw. We found two issues related to early data in client and server, it happens on existing early data API and when MPS is not used.
- Client sends one extra byte as
MBEDTLS_SSL_MSG_APPLICATION_DATA
- Server doesn't set early data length properly, and the server early data call back doesn't work because early data length is not set.
Also add a test case for it.
Test Plan: tests/ssl-opt.sh -p -s -f "status - accepted"
Reviewers:
Subscribers:
Tasks:
Tags:
Notes:
- Pull requests cannot be accepted until the PR follows the contributing guidelines. In particular, each commit must have at least one
Signed-off-by:
line from the committer to certify that the contribution is made under the terms of the Developer Certificate of Origin. - This is just a template, so feel free to use/remove the unnecessary things
Description
A few sentences describing the overall goals of the pull request's commits.
Status
READY/IN DEVELOPMENT/HOLD
Requires Backporting
When there is a bug fix, it should be backported to all maintained and supported branches. Changes do not have to be backported if:
- This PR is a new feature\enhancement
- This PR contains changes in the API. If this is true, and there is a need for the fix to be backported, the fix should be handled differently in the legacy branch
Yes | NO
Which branch?
Migrations
If there is any API change, what's the incentive and logic for it.
YES | NO
Additional comments
Any additional information that could be of interest
Todos
- [ ] Tests
- [ ] Documentation
- [ ] Changelog updated
- [ ] Backported
Steps to test or reproduce
Outline the steps to test or reproduce the PR here.