-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Make DecodeMRPParametersIfPresent()
and ParseSigma1()
methods static + fix for TLV reading corner case
#36956
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
Alami-Amine
force-pushed
the
AA/DecodeParams
branch
from
January 3, 2025 16:53
199286a
to
5023fe6
Compare
Alami-Amine
force-pushed
the
AA/DecodeParams
branch
from
January 3, 2025 16:55
5023fe6
to
1e3e1a2
Compare
PR #36956: Size comparison from 1b4c56c to 1e3e1a2 Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
Alami-Amine
changed the title
Aa/decode params
Make Jan 3, 2025
DecodeMRPParametersIfPresent()
and ParseSigma1()
methods static
bzbarsky-apple
approved these changes
Jan 3, 2025
…nParameters struct has extra TLV elements that were added to the spec, Yet the TLV struct is not terminated with an EndOfContainer Element. In this Case, we should make sure that ExitContainer so that an Error is triggered.
Alami-Amine
force-pushed
the
AA/DecodeParams
branch
from
January 6, 2025 16:35
c9dc062
to
144b4c1
Compare
Alami-Amine
changed the title
Make
Make Jan 6, 2025
DecodeMRPParametersIfPresent()
and ParseSigma1()
methods static DecodeMRPParametersIfPresent()
and ParseSigma1()
methods static + fix for corner case
PR #36956: Size comparison from bba390a to 144b4c1 Full report (11 builds for cc13x4_26x4, cc32xx, qpg, stm32, tizen)
|
Alami-Amine
force-pushed
the
AA/DecodeParams
branch
from
January 6, 2025 17:11
144b4c1
to
d77c3ea
Compare
PR #36956: Size comparison from bba390a to d77c3ea Full report (14 builds for cc13x4_26x4, cc32xx, nrfconnect, qpg, stm32, tizen)
|
Alami-Amine
force-pushed
the
AA/DecodeParams
branch
from
January 6, 2025 17:37
d77c3ea
to
4cdfd0f
Compare
PR #36956: Size comparison from bba390a to 4cdfd0f Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
tehampson
reviewed
Jan 6, 2025
tehampson
approved these changes
Jan 6, 2025
PR #36956: Size comparison from bba390a to c6018c1 Full report (47 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, linux, nrfconnect, psoc6, qpg, stm32, telink, tizen)
|
Alami-Amine
changed the title
Make
Make Jan 7, 2025
DecodeMRPParametersIfPresent()
and ParseSigma1()
methods static + fix for corner caseDecodeMRPParametersIfPresent()
and ParseSigma1()
methods static + fix for TLV reading corner case
PR #36956: Size comparison from bba390a to a50db92 Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
Alami-Amine
force-pushed
the
AA/DecodeParams
branch
from
January 10, 2025 14:30
00af395
to
a50db92
Compare
PR #36956: Size comparison from b528132 to a50db92 Full report (70 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
tehampson
approved these changes
Jan 10, 2025
Alami-Amine
added a commit
to Alami-Amine/connectedhomeip
that referenced
this pull request
Jan 12, 2025
…tic + fix for TLV reading corner case (project-chip#36956) * Making DecodeMRPParametersIfPresent self-contained and static and renaming it * Making ParseSigma1 static and not dependent on class state * Making SetRemoteSessionParameters protected * Fix for the following Corner case: if the received TLV-encoded SessionParameters struct has extra TLV elements that were added to the spec, Yet the TLV struct is not terminated with an EndOfContainer Element. In this Case, we should make sure that ExitContainer so that an Error is triggered. * Adding Unit Test for DecodeSessionParametersIfPresent() * Fix CI failure related to using aggregate initializer with C-String * Integrating Comments
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.
Changes in the PR:
decoupling
DecodeMRPParametersIfPresent()
from class state and making it static; this is needed to make the factored out TLV Parsing Functions in CASESession and PASESession self-contained and indepedent of class state.Fix for Corner Case in
DecodeMRPParametersIfPresent
: If the received TLV-encoded SessionParameters structure contains extra TLV elements not known by the receiver (newly added to the specification) but is not terminated with an EndOfContainer element, we must ENSURE thatExitContainer
is called to ensure that an error is triggered.Added Unit Tests, which also covers above Corner case.
Change the name of
DecodeMRPParametersIfPresent()
toDecodeSessionParametersIfPresent()
since it is not ONLY decoding MRP but also other Session Parameters (I believe in Matter 1.2 Session Parameters only Included MRP hence the name?)Make
ParseSigma1()
static and completely self-contained.Testing
Originally posted by @bzbarsky-apple in #36679 (comment)