You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix corner cases of handling of Common Name fallback encoding (#28911)
* Fix corner cases of handling of Common Name fallback encoding
Problem:
- Appearance of a Mpid:/Mvid: in a DAC/PAI/PAA DN was deemed OK
by previous code, but this caused a critical ambiguity in PAIs which
would possibly cause fall-back to non-PID-scoped PAI interpretation.
- Related to CHIP-Specifications/connectedhomeip-spec#7470
- Fixes#28898
This PR:
- Replaces the logic for fallback encodign conversion to take
the first legitimate fully matching case for Mvid: and Mpid:
and detect errors where either of these is present but without
a following Mpid/Mvid.
- Updates unit tests to improve coverage and to properly mark as
invalid some cases marked invalid in spec which where deemed
valid by prior code by mistake
Testing done:
- Integration tests still pass (relater to Commissioner DUT).
- Test vectors updated.
- New unit tests added.
* Restyled by clang-format
* Restyled by prettier-json
* Address review comments by revamping algorithm
* Fix leftover comment follow-ups from @bzbarsky-apple from #28899
* Restyled by clang-format
* Add more comments and fix clang-tidy
* Address more review comments
---------
Co-authored-by: tennessee.carmelveilleux@gmail.com <tennessee@google.com>
Co-authored-by: Restyled.io <commits@restyled.io>
Copy file name to clipboardexpand all lines: credentials/development/commissioner_dut/struct_pai_vidpid_fallback_encoding_08/test_case_vector.json
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"description": "PAI Test Vector: Fallback VID and PID encoding example from spec: invalid, since substring following Mpid: is not exactly 4 uppercase hexadecimal digits",
Copy file name to clipboardexpand all lines: credentials/development/commissioner_dut/struct_pai_vidpid_fallback_encoding_09/test_case_vector.json
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"description": "PAI Test Vector: Fallback VID and PID encoding example from spec: invalid, since substring following Mpid: is not exactly 4 uppercase hexadecimal digits",
0 commit comments