Skip to content
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

[OperationalCredentials]: Support read TrustedRootCertificates attribute #10943

Merged
merged 3 commits into from
Oct 26, 2021
Merged

[OperationalCredentials]: Support read TrustedRootCertificates attribute #10943

merged 3 commits into from
Oct 26, 2021

Conversation

yufengwangca
Copy link
Contributor

Problem

What is being fixed? Examples:

Change overview

Support read TrustedRootCertificates attribute

Testing

How was this tested? (at least one bullet point required)

yufengw@yufengw-SEi:~/Workspace/connectedhomeip/out/debug/standalone$ ./chip-tool operationalcredentials read trusted-root-certificates 12344321 0
[1635215987.564441][1664539:1664539] CHIP:CTL: Generating NOC
[1635215987.564538][1664539:1664539] CHIP:CTL: Generating ICAC
[1635215987.566488][1664539:1664539] CHIP:DL: AUDIT: ===== RANDOM NUMBER GENERATOR AUDIT START ====
[1635215987.566495][1664539:1664539] CHIP:DL: AUDIT: * Validate buf1 and buf2 are <<<different every run/boot!>>>
[1635215987.566498][1664539:1664539] CHIP:DL: AUDIT: * Validate r1 and r2 are <<<different every run/boot!>>>
[1635215987.566517][1664539:1664539] CHIP:DL: AUDIT: * buf1: 64D6F3677ACD54964516EA3369918942
[1635215987.566520][1664539:1664539] CHIP:DL: AUDIT: * buf2: EC9402944E171B4E01D0ED308329D6EC
[1635215987.566546][1664539:1664539] CHIP:DL: AUDIT: * r1: 0xC2AA46B7 r2: 0x1CEC4967
[1635215987.566550][1664539:1664539] CHIP:DL: AUDIT: ===== RANDOM NUMBER GENERATOR AUDIT END ====
[1635215987.566680][1664539:1664539] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-nudGzQ)
[1635215987.566879][1664539:1664539] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini)
[1635215987.566899][1664539:1664539] CHIP:DL: NVS set: chip-counters/reboot-count = 3 (0x3)
[1635215987.567194][1664539:1664539] CHIP:DL: Got Ethernet interface: enp1s0
[1635215987.567346][1664539:1664539] CHIP:DL: Found the primary Ethernet interface:enp1s0
[1635215987.567500][1664539:1664539] CHIP:DL: Got WiFi interface: wlp3s0
[1635215987.569751][1664539:1664539] CHIP:DL: Found the primary WiFi interface:wlp3s0
[1635215987.569814][1664539:1664539] CHIP:IN: UDP::Init bind&listen port=5541
[1635215987.569879][1664539:1664539] CHIP:IN: UDP::Init bound to port=5541
[1635215987.569899][1664539:1664539] CHIP:IN: UDP::Init bind&listen port=5541
[1635215987.569945][1664539:1664539] CHIP:IN: UDP::Init bound to port=5541
[1635215987.569963][1664539:1664539] CHIP:IN: TransportMgr initialized
[1635215987.570039][1664539:1664539] CHIP:DIS: Init fabric pairing table with server storage
[1635215987.570366][1664539:1664539] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-RIREeO)
[1635215987.570719][1664539:1664539] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini)
[1635215987.570769][1664539:1664539] CHIP:DL: NVS set: chip-counters/GlobalMCTR = 3000 (0xBB8)
[1635215987.570842][1664539:1664539] CHIP:CTL: System State Initialized...
[1635215987.571975][1664539:1664539] CHIP:DL: MDNS failed to join multicast group on enp1s0 for address type IPv4: ../../../examples/chip-tool/third_party/connectedhomeip/src/inet/IPEndPointBasis.cpp:388: Inet Error 0x00000110: Address not found
[1635215987.575306][1664539:1664539] CHIP:ZCL: Using ZAP configuration...
[1635215987.575499][1664539:1664539] CHIP:DIS: Verifying the received credentials
[1635215987.575976][1664539:1664539] CHIP:DIS: Added new fabric at index: 1, Initialized: 1
[1635215987.575981][1664539:1664539] CHIP:DIS: Assigned compressed fabric ID: 0x391C1C5511506A1D, node ID: 0x000000000001B669
[1635215987.575985][1664539:1664539] CHIP:CTL: Joined the fabric at index 1. Compressed fabric ID is: 0x391C1C5511506A1D
[1635215987.576121][1664539:1664544] CHIP:DL: CHIP task running
[1635215987.576174][1664539:1664544] CHIP:TOO: Sending command to node 0xbc5c01
[1635215987.576375][1664539:1664544] CHIP:IN: Prepared plaintext message 0x55909b75be20 to 0x0000000000000000 of type 0x30 and protocolId (0, 0) on exchange 39986i with MessageCounter:1726685955.
[1635215987.576385][1664539:1664544] CHIP:IN: Sending plaintext msg 0x55909b75be20 with MessageCounter:1726685955 to 0x0000000000000000 at monotonic time: 1166009162 msec
[1635215987.576464][1664539:1664544] CHIP:SC: Sent Sigma1 msg
[1635215987.577080][1664539:1664544] CHIP:EM: Received message of type 0x31 with protocolId (0, 0) and MessageCounter:3825397202 on exchange 39986i
[1635215987.577093][1664539:1664544] CHIP:EM: Rxd Ack; Removing MessageCounter:1726685955 from Retrans Table on exchange 39986i
[1635215987.577097][1664539:1664544] CHIP:EM: Removed CHIP MessageCounter:1726685955 from RetransTable on exchange 39986i
[1635215987.577103][1664539:1664544] CHIP:SC: Received Sigma2 msg
[1635215987.577109][1664539:1664544] CHIP:SC: Peer assigned session session ID 3
[1635215987.577735][1664539:1664544] CHIP:SC: Sending Sigma3
[1635215987.577798][1664539:1664544] CHIP:EM: Piggybacking Ack for MessageCounter:3825397202 on exchange: 39986i
[1635215987.577805][1664539:1664544] CHIP:IN: Prepared plaintext message 0x55909b75be20 to 0x0000000000000000 of type 0x32 and protocolId (0, 0) on exchange 39986i with MessageCounter:1726685956.
[1635215987.577812][1664539:1664544] CHIP:IN: Sending plaintext msg 0x55909b75be20 with MessageCounter:1726685956 to 0x0000000000000000 at monotonic time: 1166009163 msec
[1635215987.577831][1664539:1664544] CHIP:SC: Sent Sigma3 msg
[1635215987.578553][1664539:1664544] CHIP:EM: Received message of type 0x40 with protocolId (0, 0) and MessageCounter:3825397203 on exchange 39986i
[1635215987.578566][1664539:1664544] CHIP:EM: Rxd Ack; Removing MessageCounter:1726685956 from Retrans Table on exchange 39986i
[1635215987.578572][1664539:1664544] CHIP:EM: Removed CHIP MessageCounter:1726685956 from RetransTable on exchange 39986i
[1635215987.578599][1664539:1664544] CHIP:SC: Success status report received. Session was established
[1635215987.578605][1664539:1664544] CHIP:IN: New secure session created for device 0x0000000000BC5C01, key 3!!
[1635215987.578623][1664539:1664544] CHIP:TOO: Sending cluster (0x003E) command (0x00) on endpoint 0
[1635215987.578650][1664539:1664544] CHIP:DMG: SendReadRequest: Client[0] [ INIT]
[1635215987.578686][1664539:1664544] CHIP:IN: Prepared encrypted message 0x55909b75be20 to 0x0000000000BC5C01 of type 0x2 and protocolId (0, 1) on exchange 39987i with MessageCounter:0.
[1635215987.578693][1664539:1664544] CHIP:IN: Sending encrypted msg 0x55909b75be20 with MessageCounter:0 to 0x0000000000BC5C01 at monotonic time: 1166009164 msec
[1635215987.578711][1664539:1664544] CHIP:DMG: Client[0] moving to [AwaitingInitialReport]
[1635215987.578718][1664539:1664544] CHIP:EM: Sending Standalone Ack for MessageCounter:3825397203 on exchange 39986i
[1635215987.578738][1664539:1664544] CHIP:IN: Prepared plaintext message 0x7f5d4a054fe0 to 0x0000000000000000 of type 0x10 and protocolId (0, 0) on exchange 39986i with MessageCounter:1726685957.
[1635215987.578764][1664539:1664544] CHIP:IN: Sending plaintext msg 0x7f5d4a054fe0 with MessageCounter:1726685957 to 0x0000000000000000 at monotonic time: 1166009164 msec
[1635215987.578780][1664539:1664544] CHIP:EM: Flushed pending ack for MessageCounter:3825397203 on exchange 39986i
[1635215987.579129][1664539:1664544] CHIP:EM: Received message of type 0x5 with protocolId (0, 1) and MessageCounter:1 on exchange 39987i
[1635215987.579141][1664539:1664544] CHIP:EM: Rxd Ack; Removing MessageCounter:0 from Retrans Table on exchange 39987i
[1635215987.579146][1664539:1664544] CHIP:EM: Removed CHIP MessageCounter:0 from RetransTable on exchange 39987i
[1635215987.579155][1664539:1664544] CHIP:DMG: ReportData =
[1635215987.579160][1664539:1664544] CHIP:DMG: {
[1635215987.579163][1664539:1664544] CHIP:DMG: 	AttributeDataList =
[1635215987.579167][1664539:1664544] CHIP:DMG: 	[
[1635215987.579171][1664539:1664544] CHIP:DMG: 		AttributeDataElement =
[1635215987.579175][1664539:1664544] CHIP:DMG: 		{
[1635215987.579178][1664539:1664544] CHIP:DMG: 			AttributePath =
[1635215987.579182][1664539:1664544] CHIP:DMG: 			{
[1635215987.579187][1664539:1664544] CHIP:DMG: 				NodeId = 0xbc5c01,
[1635215987.579193][1664539:1664544] CHIP:DMG: 				EndpointId = 0x0,
[1635215987.579198][1664539:1664544] CHIP:DMG: 				ClusterId = 0x3e,
[1635215987.579202][1664539:1664544] CHIP:DMG: 				FieldTag = 0x0000_0004,
[1635215987.579206][1664539:1664544] CHIP:DMG: 			}
[1635215987.579211][1664539:1664544] CHIP:DMG: 				
[1635215987.579215][1664539:1664544] CHIP:DMG: 			Data = [
[1635215987.579220][1664539:1664544] CHIP:DMG: 				[
[1635215987.579228][1664539:1664544] CHIP:DMG: 					0x15, 0x30, 0x1, 0x1, 0x0, 0x24, 0x2, 0x1, 0x37, 0x3, 0x24, 0x14, 0x0, 0x24, 0x15, 0x0, 0x18, 0x26, 0x4, 0x80, 0x22, 0x81, 0x27, 0x26, 0x5, 0x80, 0x25, 0x4d, 0x3a, 0x37, 0x6, 0x24, 0x14, 0x0, 0x24, 0x15, 0x0, 0x18, 0x24, 0x7, 0x1, 0x24, 0x8, 0x1, 0x3
[1635215987.579233][1664539:1664544] CHIP:DMG: 				]
[1635215987.579238][1664539:1664544] CHIP:DMG: 			],
[1635215987.579242][1664539:1664544] CHIP:DMG: 			DataElementVersion = 0x0,
[1635215987.579246][1664539:1664544] CHIP:DMG: 		},
[1635215987.579251][1664539:1664544] CHIP:DMG: 		
[1635215987.579255][1664539:1664544] CHIP:DMG: 	],
[1635215987.579260][1664539:1664544] CHIP:DMG: 	
[1635215987.579263][1664539:1664544] CHIP:DMG: }
[1635215987.579280][1664539:1664544] CHIP:ZCL: ReadAttributesResponse:
[1635215987.579284][1664539:1664544] CHIP:ZCL:   ClusterId: 0x0000_003E
[1635215987.579287][1664539:1664544] CHIP:ZCL:   attributeId: 0x0000_0004
[1635215987.579291][1664539:1664544] CHIP:ZCL:   status: Success                (0x0000)
[1635215987.579294][1664539:1664544] CHIP:ZCL:   attribute TLV Type: 0x16
[1635215987.579299][1664539:1664544] CHIP:TOO: OnOperationalCredentialsTrustedRootCertificatesListAttributeResponse: 1 entries

@github-actions
Copy link

PR #10943: Size comparison from b6dda48 to 9297f19

8 builds (for k32w, p6, qpg, telink)
platform target config section b6dda48 9297f19 change % change
k32w lock-app k32w061+debug .bss 69196 69196 0 0.0
.data 1864 1864 0 0.0
.text 515140 515364 224 0.0
shell k32w061+debug .bss 63256 63256 0 0.0
.data 672 672 0 0.0
.text 359572 359572 0 0.0
lighting-app k32w061+se05x+release .bss 78712 78712 0 0.0
.data 1900 1900 0 0.0
.text 613776 614000 224 0.0
p6 lock-app default .bss 67176 67176 0 0.0
.data 2416 2416 0 0.0
.heap 963752 963752 0 0.0
.text 1126088 1126584 496 0.0
qpg lighting-app qpg6100+debug .bss 52416 52416 0 0.0
.data 1000 1000 0 0.0
.text 485044 485252 208 0.0
lock-app qpg6100+debug .bss 51360 51360 0 0.0
.data 956 956 0 0.0
.text 461264 461472 208 0.0
persistent-storage-app qpg6100+debug .bss 27752 27752 0 0.0
.data 372 372 0 0.0
.text 149900 149900 0 0.0
telink lighting-app tlsr9518adk80d bss 69940 69940 0 0.0
noinit 33216 33216 0 0.0
text 457672 457876 204 0.0

@pullapprove pullapprove bot requested a review from selissia October 26, 2021 03:31
@github-actions
Copy link

Size increase report for "gn_qpg-example-build" from b6dda48

File Section File VM
chip-qpg6100-lighting-example.out .text 208 208
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-qpg6100-lighting-example.out.map and ./pull_artifact/chip-qpg6100-lighting-example.out.map:

BLOAT EXECUTION FAILED WITH CODE 1:
bloaty: unknown file type for file './pull_artifact/chip-qpg6100-lighting-example.out.map'

Comparing ./master_artifact/chip-qpg6100-lighting-example.out and ./pull_artifact/chip-qpg6100-lighting-example.out:

sections,vmsize,filesize
.debug_info,0,2322
.debug_loc,0,1078
.debug_ranges,0,544
.debug_line,0,350
.debug_str,0,208
.text,208,208
.strtab,0,38
.symtab,0,32
.debug_abbrev,0,22
.shstrtab,0,2
[Unmapped],0,-208


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from b6dda48

File Section File VM
chip-lock.elf text 216 216
chip-lock.elf device_handles -8 -8
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_info,0,2319
.debug_loc,0,1085
.debug_ranges,0,544
.debug_line,0,355
text,216,216
.debug_str,0,211
.strtab,0,38
.symtab,0,32
.debug_abbrev,0,22
.shstrtab,0,2
device_handles,-8,-8

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize


@github-actions
Copy link

Size increase report for "esp32-example-build" from b6dda48

File Section File VM
chip-all-clusters-app.elf .flash.text 160 160
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_info,0,1840
.debug_loc,0,644
.debug_line,0,601
.debug_ranges,0,392
.debug_str,0,211
.flash.text,160,160
.debug_abbrev,0,12
[Unmapped],0,-160


@yufengwangca yufengwangca merged commit 95d8dd5 into project-chip:master Oct 26, 2021
@yufengwangca yufengwangca deleted the pr/cluster/opcreds branch October 27, 2021 21:29
JasonLiuZhuoCheng pushed a commit to JasonLiuZhuoCheng/connectedhomeip that referenced this pull request Oct 28, 2021
…ute (project-chip#10943)

* [OperationalCredentials]: Support read TrustedRootCertificates attribute

* Enable TrustedRootCertificates in controller zap

* Update gen folders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants