8000 [E2E][JF] Add skeleton for steps 6-7 of JCM by doru91 · Pull Request #38749 · project-chip/connectedhomeip · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[E2E][JF] Add skeleton for steps 6-7 of JCM #38749

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

doru91
Copy link
Contributor
@doru91 doru91 commented May 5, 2025

Role of this PR is to introduce the main building blocks for executing steps 6-7 of JCM (see spec, Figure 92 and the associated text).

High-level architecture is described in Slide 4 and the associated use-case (which will be fully implemented in following PRs) is in Slides 5-7.

Associated SDK execution plan can be found in project-chip/123, SDK section.

Fix #38178, #38201:

  • depends on merging of [E2E][JF] XML Cluster definition for JF Clusters #34637
  • PR is split in multiple commits with clear description for easier review
  • first commit is doing some general refactoring around PAI/DAC certification generation/release to avoid code duplication. (that API will be used also for handling the JF certificates). Rest of the commissioner code required for steps 6-7 of JCM is guarded by CHIP_DEVICE_CONFIG_ENABLE_JOINT_FABRIC - by doing this we make sure we don't break any existing functionality
  • during the read commissioning phase, the 8000 AdministratorFabricIndex, Fabric Table and Trusted Root Certificates are read, associated information from the Fabric Table are also read. Then, only the entry from the Fabric Table corresponding to AdministratorFabricIndex is saved. This info will be used in a following PR for Fabric Table VID Verification.
  • more details about the architecture can be found in the guide introduced by this PR - docs/guides/joint_fabric_guide.md

Testing

  • given that [E2E][JF] XML Cluster definition for JF Clusters #34637 is not merged I had to locally rebase the changes from this PR on top of 34637 and then I used jf-control-app for testing the --execute-jcm option:
  • branch used for testing is here
  • used jf-control-app for pairing jf-admin-app as anchor: pairing onnetwork 1 110220033 --anchor true
  • used jf-control-app to OCW on jf-admin-app: pairing open-commissioning-window 1 1 400 1000 1261
  • used jf-control-app to test that the JF information is saved correctly: pairing onnetwork 10 17780303 --execute-jcm true

doru91 added 4 commits May 5, 2025 12:22
This avoids code duplication and the new certicate API may be used by JF.

Signed-off-by: Doru Gucea <doru-cristian.gucea@nxp.com>
If this option is set during the pairing command, then JCM flow is triggered.

Signed-off-by: Doru Gucea <doru-cristian.gucea@nxp.com>
…t in core-SDK

Enable JF suppport by default when jf-control-app is being compiled.

Signed-off-by: Doru Gucea <doru-cristian.gucea@nxp.com>
… 6-7 of JCM

Signed-off-by: Doru Gucea <doru-cristian.gucea@nxp.com>
Copy link
github-actions bot commented May 5, 2025

PR #38749: Size comparison from cff103b to a788222

Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen) < 8000 td align="left">
platform target config section cff103b a788222 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1102924 1102924 0 0.0
RAM 94866 94866 0 0.0
bl702 lighting-app bl702+eth FLASH 657772 657772 0 0.0
RAM 33637 33637 0 0.0
bl702+wifi FLASH 834770 834770 0 0.0
RAM 22361 22361 0 0.0
bl706+mfd+rpc+littlefs FLASH 1067548 1067548 0 0.0
RAM 32285 32285 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 898436 898436 0 0.0
RAM 27024 27024 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 980968 980968 0 0.0
RAM 24772 24772 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 822180 822180 0 0.0
RAM 120296 120296 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 831952 831952 0 0.0
RAM 125432 125432 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 778360 778360 0 0.0
RAM 113780 113780 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 762684 762684 0 0.0
RAM 113988 113988 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 549042 549042 0 0.0
RAM 205192 205192 0 0.0
lock CC3235SF_LAUNCHXL FLASH 581090 581090 0 0.0
RAM 205440 205440 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 664341 664341 0 0.0
RAM 77304 77304 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 684193 684193 0 0.0
RAM 79944 79944 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 684193 684193 0 0.0
RAM 79944 79944 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 641133 641133 0 0.0
RAM 72372 72372 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 624565 624565 0 0.0
RAM 73544 73544 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 644201 644201 0 0.0
RAM 76096 76096 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 644201 644201 0 0.0
RAM 76096 76096 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 644829 644829 0 0.0
RAM 76568 76568 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 664537 664537 0 0.0
RAM 79120 79120 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 664537 664537 0 0.0
RAM 79120 79120 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 621233 621233 0 0.0
RAM 70664 70664 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 641085 641085 0 0.0
RAM 73296 73296 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 641085 641085 0 0.0
RAM 73296 73296 0 0.0
efr32 lock-app BRD4187C FLASH 946348 946348 0 0.0
RAM 132096 132096 0 0.0
BRD4338a FLASH 741240 741240 0 0.0
RAM 206996 206996 0 0.0
window-app BRD4187C FLASH 1039048 1039040 -8 -0.0
RAM 128232 128232 0 0.0
esp32 all-clusters-app c3devkit DRAM 103328 103328 0 0.0
FLASH 1805914 1805914 0 0.0
IRAM 83846 83846 0 0.0
m5stack DRAM 121916 121916 0 0.0
FLASH 1771126 1771126 0 0.0
IRAM 117043 117043 0 0.0
linux air-purifier-app debug unknown 4848 4848 0 0.0
FLASH 2781645 2781645 0 0.0
RAM 114616 114616 0 0.0
all-clusters-app debug unknown 5656 5656 0 0.0
FLASH 6334504 6334504 0 0.0
RAM 529624 529624 0 0.0
all-clusters-minimal-app debug unknown 5528 5528 0 0.0
FLASH 5439664 5439664 0 0.0
RAM 224616 224616 0 0.0
bridge-app debug unknown 5560 5560 0 0.0
FLASH 4756192 4756192 0 0.0
RAM 204240 204240 0 0.0
camera-app debug unknown 8856 8856 0 0.0
FLASH 6885147 6885147 0 0.0
RAM 226448 226448 0 0.0
camera-controller debug unknown 9240 9240 0 0.0
FLASH 14013483 14013035 -448 -0.0
RAM 645136 645136 0 0.0
chip-tool debug unknown 6256 6256 0 0.0
FLASH 14231809 14231359 -450 -0.0
RAM 631696 631696 0 0.0
chip-tool-ipv6only arm64 unknown 39432 39432 0 0.0
FLASH 12284624 12284176 -448 -0.0
RAM 677760 677760 0 0.0
fabric-admin debug unknown 5936 5936 0 0.0
FLASH 12378017 12377567 -450 -0.0
RAM 631056 631056 0 0.0
fabric-bridge-app debug unknown 4808 4808 0 0.0
FLASH 4573040 4573040 0 0.0
RAM 190280 190280 0 0.0
fabric-sync debug unknown 5064 5064 0 0.0
FLASH 5712677 5712229 -448 -0.0
RAM 483000 483000 0 0.0
lighting-app debug+rpc+ui unknown 6264 6264 0 0.0
FLASH 5642577 5642577 0 0.0
RAM 207256 207256 0 0.0
lock-app debug unknown 5496 5496 0 0.0
FLASH 4816026 4816026 0 0.0
RAM 194488 194488 0 0.0
ota-provider-app debug unknown 4848 4848 0 0.0
FLASH 4435848 4435848 0 0.0
RAM 183720 183720 0 0.0
ota-requestor-app debug unknown 4800 4800 0 0.0
FLASH 4563558 4563558 0 0.0
RAM 187624 187624 0 0.0
shell debug unknown 4272 4272 0 0.0
FLASH 3075132 3075132 0 0.0
RAM 148008 148008 0 0.0
thermostat-no-ble arm64 unknown 9552 9552 0 0.0
FLASH 4227888 4227888 0 0.0
RAM 230992 230992 0 0.0
tv-app debug unknown 5832 5832 0 0.0
FLASH 6069813 6069365 -448 -0.0
RAM 607680 607680 0 0.0
tv-casting-app debug unknown 5416 5416 0 0.0
FLASH 12410205 12410205 0 0.0
RAM 749448 749448 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 919832 919832 0 0.0
RAM 167328 167328 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 911752 911752 0 0.0
RAM 145572 145572 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 856308 856308 0 0.0
RAM 141091 141091 0 0.0
nxp contact k32w0+release FLASH 592304 592304 0 0.0
RAM 72848 72848 0 0.0
mcxw71+release FLASH 624568 624568 0 0.0
RAM 63188 63188 0 0.0
light k32w0+release FLASH 618268 618268 0 0.0
RAM 72144 72144 0 0.0
k32w1+release FLASH 709032 709032 0 0.0
RAM 72036 72036 0 0.0
lock mcxw71+release FLASH 774048 774048 0 0.0
RAM 67612 67612 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1666060 1666060 0 0.0
RAM 212328 212328 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1570348 1570348 0 0.0
RAM 208504 208504 0 0.0
light cy8ckit_062s2_43012 FLASH 1447620 1447620 0 0.0
RAM 197320 197320 0 0.0
lock cy8ckit_062s2_43012 FLASH 1477476 1477476 0 0.0
RAM 225016 225016 0 0.0
qpg lighting-app qpg6105+debug FLASH 669196 669196 0 0.0
RAM 105200 105200 0 0.0
lock-app qpg6105+debug FLASH 627632 627632 0 0.0
RAM 99820 99820 0 0.0
stm32 light STM32WB5MM-DK FLASH 466540 466540 0 0.0
RAM 141504 141504 0 0.0
telink bridge-app tl7218x FLASH 677132 677132 0 0.0
700250 700250 0 0.0
RAM 90672 90672 0 0.0
101820 101820 0 0.0
light-app-ota-compress-lzma-factory-data tl3218x FLASH 781332 781332 0 0.0
RAM 50052 50052 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 771592 771592 0 0.0
RAM 40352 40352 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 760066 760066 0 0.0
787984 787984 0 0.0
RAM 97472 97472 0 0.0
109240 109240 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 687100 687100 0 0.0
709210 709210 0 0.0
RAM 51520 51520 0 0.0
62552 62552 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 715550 715550 0 0.0
745392 745392 0 0.0
RAM 73340 73340 0 0.0
85740 85740 0 0.0
light-switch-app-ota-shell-factory-data tl3218x_retention FLASH 713080 713080 0 0.0
RAM 36976 36976 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 607570 607570 0 0.0
607112 607112 0 0.0
RAM 138572 138572 0 0.0
148636 148636 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 795068 795072 4 0.0
822598 822602 4 0.0
RAM 96328 96328 0 0.0
107500 107500 0 0.0
tizen all-clusters-app arm unknown 5176 5176 0 0.0
FLASH 1809216 1809216 0 0.0
RAM 94640 94640 0 0.0
chip-tool-ubsan arm unknown 20152 20152 0 0.0
FLASH 20261774 20261062 -712 -0.0
RAM 8823236 8822812 -424 -0.0

@doru91 doru91 requested review from chrisdecenzo and vijs May 5, 2025 11:22
Comment on lines +768 to +776
Optional<ByteSpan> mJFAdminNOC;
Optional<uint16_t> mJFAdminNOCLen;

Optional<ByteSpan> mJFAdminICAC;
Optional<uint16_t> mJFAdminICACLen;

Optional<ByteSpan> mJFAdminRCAC;
Optional<uint16_t> mJFAdminRCACLen;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use size_t instead of uint16_t everywhere for sizes, even if they are small. It's more standard and less wondering about the why and less casts.

Comment on lines +878 to +880
VendorId vendorId = VendorId::Common;
FabricId fabricId = kUndefinedFabricId;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FabricID is not unique across roots. Did you mean fabricIndex here?

@@ -117,6 +117,11 @@ declare_args() {
}
}

declare_args() {
# Enable Joint Fabric features
chip_device_config_enable_joint_fabric = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no tests for the new code. Is that intended?

@doru91 doru91 force-pushed the upstream-pr/feature/projectchip-123/issue-38178 branch from a788222 to efd914c Compare May 5, 2025 15:50
* check that the commissioned Admin has an Admin CAT inside its NOC.

Signed-off-by: Doru Gucea <doru-cristian.gucea@nxp.com>
@doru91 doru91 force-pushed the upstream-pr/feature/projectchip-123/issue-38178 branch from efd914c to 22bd237 Compare May 5, 2025 15:52
Copy link
github-actions bot commented May 5, 2025

PR #38749: Size comparison from 039b430 to 22bd237

Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 039b430 22bd237 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1102924 1102924 0 0.0
RAM 94866 94866 0 0.0
bl702 lighting-app bl702+eth FLASH 657772 657772 0 0.0
RAM 33637 33637 0 0.0
bl702+wifi FLASH 834770 834770 0 0.0
RAM 22361 22361 0 0.0
bl706+mfd+rpc+littlefs FLASH 1067548 1067548 0 0.0
RAM 32285 32285 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 898436 898436 0 0.0
RAM 27024 27024 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 980968 980968 0 0.0
RAM 24772 24772 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 822180 822180 0 0.0
RAM 120296 120296 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 831952 831952 0 0.0
RAM 125432 125432 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 778360 778360 0 0.0
RAM 113780 113780 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 762684 762684 0 0.0
RAM 113988 113988 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 549042 549042 0 0.0
RAM 205192 205192 0 0.0
lock CC3235SF_LAUNCHXL FLASH 581090 581090 0 0.0
RAM 205440 205440 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 664341 664341 0 0.0
RAM 77304 77304 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 684193 684193 0 0.0
RAM 79944 79944 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 684193 684193 0 0.0
RAM 79944 79944 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 641133 641133 0 0.0
RAM 72372 72372 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 624565 624565 0 0.0
RAM 73544 73544 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 644201 644201 0 0.0
RAM 76096 76096 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 644201 644201 0 0.0
RAM 76096 76096 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 644829 644829 0 0.0
RAM 76568 76568 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 664537 664537 0 0.0
RAM 79120 79120 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 664537 664537 0 0.0
RAM 79120 79120 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 621233 621233 0 0.0
RAM 70664 70664 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 641085 641085 0 0.0
RAM 73296 73296 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 641085 641085 0 0.0
RAM 73296 73296 0 0.0
efr32 lock-app BRD4187C FLASH 946348 946348 0 0.0
RAM 132096 132096 0 0.0
BRD4338a FLASH 741240 741240 0 0.0
RAM 206996 206996 0 0.0
window-app BRD4187C FLASH 1039048 1039040 -8 -0.0
RAM 128232 128232 0 0.0
esp32 all-clusters-app c3devkit DRAM 103328 103328 0 0.0
FLASH 1805914 1805914 0 0.0
IRAM 83846 83846 0 0.0
m5stack DRAM 121916 121916 0 0.0
FLASH 1771126 1771126 0 0.0
IRAM 117043 117043 0 0.0
linux air-purifier-app debug unknown 4848 4848 0 0.0
FLASH 2781645 2781645 0 0.0
RAM 114616 114616 0 0.0
all-clusters-app debug unknown 5656 5656 0 0.0
FLASH 6334504 6334504 0 0.0
RAM 529624 529624 0 0.0
all-clusters-minimal-app debug unknown 5528 5528 0 0.0
FLASH 5439664 5439664 0 0.0
RAM 224616 224616 0 0.0
bridge-app debug unknown 5560 5560 0 0.0
FLASH 4756192 4756192 0 0.0
RAM 204240 204240 0 0.0
camera-app debug unknown 8856 8856 0 0.0
FLASH 6885147 6885147 0 0.0
RAM 226448 226448 0 0.0
camera-controller debug unknown 9240 9240 0 0.0
FLASH 14013483 14013035 -448 -0.0
RAM 645136 645136 0 0.0
chip-tool debug unknown 6256 6256 0 0.0
FLASH 14231809 14231359 -450 -0.0
RAM 631696 631696 0 0.0
chip-tool-ipv6only arm64 unknown 39432 39432 0 0.0
FLASH 12284624 12284176 -448 -0.0
RAM 677760 677760 0 0.0
fabric-admin debug unknown 5936 5936 0 0.0
FLASH 12378017 12377567 -450 -0.0
RAM 631056 631056 0 0.0
fabric-bridge-app debug unknown 4808 4808 0 0.0
FLASH 4573040 4573040 0 0.0
RAM 190280 190280 0 0.0
fabric-sync debug unknown 5064 5064 0 0.0
FLASH 5712677 5712229 -448 -0.0
RAM 483000 483000 0 0.0
lighting-app debug+rpc+ui unknown 6264 6264 0 0.0
FLASH 5642577 5642577 0 0.0
RAM 207256 207256 0 0.0
lock-app debug unknown 5496 5496 0 0.0
FLASH 4816026 4816026 0 0.0
RAM 194488 194488 0 0.0
ota-provider-app debug unknown 4848 4848 0 0.0
FLASH 4435848 4435848 0 0.0
RAM 183720 183720 0 0.0
ota-requestor-app debug unknown 4800 4800 0 0.0
FLASH 4563558 4563558 0 0.0
RAM 187624 187624 0 0.0
shell debug unknown 4272 4272 0 0.0
FLASH 3075132 3075132 0 0.0
RAM 148008 148008 0 0.0
thermostat-no-ble arm64 unknown 9552 9552 0 0.0
FLASH 4227888 4227888 0 0.0
RAM 230992 230992 0 0.0
tv-app debug unknown 5832 5832 0 0.0
FLASH 6069813 6069365 -448 -0.0
RAM 607680 607680 0 0.0
tv-casting-app debug unknown 5416 5416 0 0.0
FLASH 12410205 12410205 0 0.0
RAM 749448 749448 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 919832 919832 0 0.0
RAM 167328 167328 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 911752 911752 0 0.0
RAM 145572 145572 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 856308 856308 0 0.0
RAM 141091 141091 0 0.0
nxp contact k32w0+release FLASH 592304 592304 0 0.0
RAM 72848 72848 0 0.0
mcxw71+release FLASH 624568 624568 0 0.0
RAM 63188 63188 0 0.0
light k32w0+release FLASH 618268 618268 0 0.0
RAM 72144 72144 0 0.0
k32w1+release FLASH 709032 709032 0 0.0
RAM 72036 72036 0 0.0
lock mcxw71+release FLASH 774048 774048 0 0.0
RAM 67612 67612 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1666060 1666060 0 0.0
RAM 212328 212328 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1570348 1570348 0 0.0
RAM 208504 208504 0 0.0
light cy8ckit_062s2_43012 FLASH 1447620 1447620 0 0.0
RAM 197320 197320 0 0.0
lock cy8ckit_062s2_43012 FLASH 1477476 1477476 0 0.0
RAM 225016 225016 0 0.0
qpg lighting-app qpg6105+debug FLASH 669196 669196 0 0.0
RAM 105200 105200 0 0.0
lock-app qpg6105+debug FLASH 627632 627632 0 0.0
RAM 99820 99820 0 0.0
stm32 light STM32WB5MM-DK FLASH 466540 466540 0 0.0
RAM 141504 141504 0 0.0
telink bridge-app tl7218x FLASH 700250 677132 -23118 -3.3
RAM 101820 90672 -11148 -10.9
light-app-ota-compress-lzma-factory-data tl3218x FLASH 781332 781332 0 0.0
RAM 50052 50052 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 771592 771592 0 0.0
RAM 40352 40352 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 787984 760066 -27918 -3.5
RAM 109240 97472 -11768 -10.8
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 709210 687100 -22110 -3.1
RAM 62552 51520 -11032 -17.6
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 745392 715550 -29842 -4.0
RAM 85740 73340 -12400 -14.5
light-switch-app-ota-shell-factory-data tl3218x_retention FLASH 713080 713080 0 0.0
RAM 36976 36976 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 607112 607570 458 0.1
RAM 148636 138572 -10064 -6.8
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 822598 795072 -27526 -3.3
RAM 107500 96328 -11172 -10.4
tizen all-clusters-app arm unknown 5176 5176 0 0.0
FLASH 1809216 1809216 0 0.0
RAM 94640 94640 0 0.0
chip-tool-ubsan arm unknown 20152 20152 0 0.0
FLASH 20261774 20261062 -712 -0.0
RAM 8823236 8822812 -424 -0.0

Comment on lines +69 to +70
CHIP_ERROR SaveCertificate(ByteSpan inCertSpan, uint8_t ** outCert, uint16_t * outCertSize);
void ReleaseCertificate(uint8_t ** cert, uint16_t * certSize);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These APIs need a bunch of documentation, since they are making some assumptions about what the caller will do with those pointers and require some specific actions on the caller to avoid memory leaks, right?

Might want to do something in terms of the naming too to make it clearer that one of these things allocates and the other releases.

But also, since this is all private to this class: is there a reason to not just use a ScopedMemoryBufferWithSize for the outparam? That will also ensure that the destructor properly deallocates, which would be good, because I am not seeing ReleaseCertificate calls in this PR to match the SaveCertificate calls it adds.

Comment on lines +2816 to +2817
info.JFAdministratorFabricIndex = administratorFabricIndex.Value();
info.JFAdminEndpointId = path.mEndpointId;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can there be more than one JointFabricAdministrator cluster on the node? Or is there at most one, but we just don't know which endpoint it will be on?

break;
}
}
return CHIP_NO_ERROR;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is never checking whether we got a value but it's not well-formed TLV (in which case Next() will return false at some point and the status of the iterator will be a failure).

ChipLogProgress(Controller, "JCM: Successfully parsed the Administrator NOC and ICAC");
break;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, this is never checking for iteration failure.

ReturnErrorOnFailure(this->mAttributeCache->Get<TrustedRootCertificates::TypeInfo>(path, trustedCAs));

auto iter = trustedCAs.begin();
while (iter.Next())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these iterators need status checks at end of iteration.

@@ -629,6 +701,11 @@ class CommissioningParameters
mDefaultNTP.ClearValue();
mICDSymmetricKey.ClearValue();
mExtraReadPaths = decltype(mExtraReadPaths)();
#if CHIP_DEVICE_CONFIG_ENABLE_JOINT_FABRIC
mJFAdminNOC.ClearValue();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, but doesn't the AutoCommissioner code that makes copies of these external buffer things then need to do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
0