-
Notifications
You must be signed in to change notification settings - Fork 130
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
Implement multiframe encryption correctly #1644
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes both multiframe and single frame where single frame was actually over TLS max data size
Codecov Report
@@ Coverage Diff @@
## release/5.1.0_RC #1644 +/- ##
======================================================
- Coverage 54.06% 54.03% -0.03%
+ Complexity 5305 5304 -1
======================================================
Files 555 555
Lines 24504 24530 +26
Branches 3088 3093 +5
======================================================
+ Hits 13248 13255 +7
- Misses 10107 10124 +17
- Partials 1149 1151 +2
|
1 task
This is added to deal with the case where Core would incorrectly encrypt the first frame which would make the payload length greater than 8 which is a protocol spec violation.
RHenigan
approved these changes
Mar 24, 2021
In the clean up effort this was removed but needs to be added back
RHenigan
approved these changes
Mar 25, 2021
joeljfischer
added a commit
to smartdevicelink/sdl_ios
that referenced
this pull request
Mar 31, 2021
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1642
This PR is ready for review.
Risk
This PR makes no API changes.
Testing Plan
Summary
The library is now setup to correctly encrypt multi frame packets by encrypting each frames payload rather than the entire payload first. The first frame will also no longer be marked as encrypted because it is not. Also fixed the logic for single frame messages when they were approaching the max size of a TLS record but still under the MTU. Receiving encrypted multiframe packets will no longer crash the library as the data size is reset to the decrypted data size before parsing further.
Changelog
Bug Fixes
CLA