blob: 54e3ae4445abbf3df65f79b4883701760990c573 [file] [log] [blame]
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default
name:
4.1.4. [TC-DA-1.4] Device Attestation Request Validation-Error Scenario
[DUT-Commissioner]
PICS:
- MCORE.ROLE.COMMISSIONER
config:
nodeId: 0x12344321
cluster: "Basic"
endpoint: 0
tests:
- label: "Start the commissioning process of TH1 on DUT"
verification: |
sudo ./chip-all-clusters-app --wifi
DUT as commissioner side:
./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 --trace_decode 1
[1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success
disabled: true
- label: "DUT generates 32-byte AttestationNonce"
verification: |
To generate the Attestation Nonce give below command
echo hex:$(hexdump -vn32 -e"4/4 "%08X" " /dev/urandom)
The generated Attestation Nonce is hex:F573438E58E445EAB50665023A298E351446F5E5E9493F05F4C63CCC02E1F834
disabled: true
- label:
"DUT sends AttestationRequest Command with AttestationNonce as field
to the TH1."
verification: |
DUT sends AttestationRequest Command with AttestationNonce as field to the TH1.
./chip-tool operationalcredentials attestation-request hex:F573438E58E445EAB50665023A298E351446F5E5E9493F05F4C63CCC02E1F834 1 0
[1659514429.238042][3458:3464] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0001
[1659514429.238161][3458:3464] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0001
[1659514429.238282][3458:3464] CHIP:TOO: AttestationResponse: {
[1659514429.238447][3458:3464] CHIP:TOO: attestationElements: 1531011D023082021906092A864886F70D010702A082020A30820206020103310D300B06096086480165030402013082017106092A864886F70D010701A08201620482015E152400012501F1FF3602050080050180050280050380050480050580050680050780050880050980050A80050B80050C80050D80050E80050F80051080051180051280051380051480051580051680051780051880051980051A80051B80051C80051D80051E80051F80052080052180052280052380052480052580052680052780052880052980052A80052B80052C80052D80052E80052F80053080053180053280053380053480053580053680053780053880053980053A80053B80053C80053D80053E80053F80054080054180054280054380054480054580054680054780054880054980054A80054B80054C80054D80054E80054F80055080055180055280055380055480055580055680055780055880055980055A80055B80055C80055D80055E80055F80056080056180056280056380182403162C04135A494732303134325A423333303030332D3234240500240600250794
[1659514429.238593][3458:3464] CHIP:TOO: ...................: 2624080018317D307B020103801462FA823359ACFAA9963E1CFA140ADDF504F37160300B0609608648016503040201300A06082A8648CE3D04030204473045022024E5D1F47A7D7B0D206A26EF699B7C9757B72D469089DE3192E678C745E7F60C022100F8AA2FA711FCB79B97E397CEDA667BAE464E2BD3FFDFC3CCED7AA8CA5F4C1A7C300220F573438E58E445EAB50665023A298E351446F5E5E9493F05F4C63CCC02E1F83424030018
[1659514429.238672][3458:3464] CHIP:TOO: signature: 1644376FEC5DE29C92AD9CDF43E0051EA2C46DA93429BEEADDA5C7B74A6EF8ACFB47D8AAD77EBEEDEEFE987639ECCA596E1BBDBD39BF0ED5EE7BACAA7A899CA0
[1659514429.238756][3458:3464] CHIP:TOO: }
disabled: true
- label:
"TH1 responds to the DUT with an invalid AttestationResponse Command
by setting the following error condition: Commissionee is not yet
certified"
verification: |
To Execute ths step follow the following
1. To generate the CD use the below command
./out/debug/chip-cert gen-cd -C credentials/test/certification-declaration/Chip-Test-CD-Signing-Cert.pem -K credentials/test/certification-declaration/Chip-Test-CD-Signing-Key.pem --out dec_message.txt -f 1 -V FFF1 -p 8000 -p 8001 -p 8002 -p 8003 -p 8004 -p 8005 -p 8006 -p 8007 -p 8008 -p 8009 -p 800A -p 800B -p 800C -p 800D -p 800E -p 800F -p 8010 -p 8011 -p 8012 -p 8013 -p 8014 -p 8015 -p 8016 -p 8017 -p 8018 -p 8019 -p 801A -p 801B -p 801C -p 801D -p 801E -p 801F -p 8020 -p 8021 -p 8022 -p 8023 -p 8024 -p 8025 -p 8026 -p 8027 -p 8028 -p 8029 -p 802A -p 802B -p 802C -p 802D -p 802E -p 802F -p 8030 -p 8031 -p 8032 -p 8033 -p 8034 -p 8035 -p 8036 -p 8037 -p 8038 -p 8039 -p 803A -p 803B -p 803C -p 803D -p 803E -p 803F -p 8040 -p 8041 -p 8042 -p 8043 -p 8044 -p 8045 -p 8046 -p 8047 -p 8048 -p 8049 -p 804A -p 804B -p 804C -p 804D -p 804E -p 804F -p 8050 -p 8051 -p 8052 -p 8053 -p 8054 -p 8055 -p 8056 -p 8057 -p 8058 -p 8059 -p 805A -p 805B -p 805C -p 805D -p 805E -p 805F -p 8060 -p 8061 -p 8062 -p 8063 -d 0016 -c "ZIG20142ZB330003-24" -l 0 -i 0 -n 2694 -t 0
2. Use the below command to see the generated CD
xxd -p -c 1024 dec_message.txt
3082021906092a864886f70d010702a082020a30820206020103310d300b06096086480165030402013082017106092a864886f70d010701a08201620482015e152400012501f1ff3602050080050180050280050380050480050580050680050780050880050980050a80050b80050c80050d80050e80050f80051080051180051280051380051480051580051680051780051880051980051a80051b80051c80051d80051e80051f80052080052180052280052380052480052580052680052780052880052980052a80052b80052c80052d80052e80052f80053080053180053280053380053480053580053680053780053880053980053a80053b80053c80053d80053e80053f80054080054180054280054380054480054580054680054780054880054980054a80054b80054c80054d80054e80054f80055080055180055280055380055480055580055680055780055880055980055a80055b80055c80055d80055e80055f80056080056180056280056380182403162c04135a494732303134325a423333303030332d32342405002406002507942624080018317d307b0201038014fa92cf095efa42e11430651632fefe1b2c77a7c8300b0609608648016503040201300a06082a8648ce3d04030204473045022100e18616664a44b34b0d79ec61d58bdb19e2c3ac271f1867afdb567c7528ee01ce02201abc5baac73c7efb8034284e4234df1a23bc3e6801504b8bcee07ce57eb5f294
3. Copy the result from step 2 in json file and transfer the json file to Raspi That will be running chip-all-clusters-app
4. Commission DUT to TH using the above generated CD by using dac_provider parameter
------>sudo ./chip-all-clusters-app --dac_provide /dec_message.json
[1658320787.328879][4550:4550] CHIP:SVR: Failsafe timer expired
[1658320787.328962][4550:4550] CHIP:IN: SecureSession[0xaaaadef5bb00]: MarkForEviction Type:1 LSID:30683
[1658320787.329015][4550:4550] CHIP:SC: SecureSession[0xaaaadef5bb00]: Moving from state "kActive" --> "kPendingEviction"
[1658320787.329073][4550:4550] CHIP:IN: SecureSession[0xaaaadef5bb00]: Released - Type:1 LSID:30683
[1658320787.329147][4550:4550] CHIP:SVR: Commissioning failed (attempt 1): ../../third_party/connectedhomeip/src/app/server/CommissioningWindowManager.cpp:71: CHIP Error 0x00000032: Timeout
--->./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3840 --trace_decode 1
[1658320787.287039][4152:4157] CHIP:CTL: Verifying attestation
[1658320787.292504][4152:4157] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 601. Look at AttestationVerificationResult enum to understand the errors
[1658320787.292594][4152:4157] CHIP:CTL: Error on commissioning step "AttestationVerification": "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1011: CHIP Error 0x000000AC: Internal error"
[1658320787.292627][4152:4157] CHIP:CTL: Failed to perform commissioning step 8
[1658320787.292662][4152:4157] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1011: CHIP Error 0x000000AC: Internal error" -> "Cleanup"
[1658320787.292707][4152:4157] CHIP:CTL: Performing next commissioning step "Cleanup" with completion status = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1011: CHIP Error 0x000000AC: Internal error"
[1658320787.292739][4152:4157] CHIP:CTL: Expiring failsafe on proxy 0xffff7c000b60
disabled: true
- label:
"Verify that DUT notifies a warning stating that Commissionee is not a
fully trusted device,Verify that the warning contains the information
about the reason for error condition,If the warning message indicates
that Commissioning is allowed then confirm that CSRRequest Command is
sent from DUT to TH1"
PICS: MCORE.DA.ATTEST_WARNING
verification: |
------>sudo ./chip-all-clusters-app --dac_provide /dec_message.json
[1658320787.328879][4550:4550] CHIP:SVR: Failsafe timer expired
[1658320787.328962][4550:4550] CHIP:IN: SecureSession[0xaaaadef5bb00]: MarkForEviction Type:1 LSID:30683
[1658320787.329015][4550:4550] CHIP:SC: SecureSession[0xaaaadef5bb00]: Moving from state "kActive" --> "kPendingEviction"
[1658320787.329073][4550:4550] CHIP:IN: SecureSession[0xaaaadef5bb00]: Released - Type:1 LSID:30683
[1658320787.329147][4550:4550] CHIP:SVR: Commissioning failed (attempt 1): ../../third_party/connectedhomeip/src/app/server/CommissioningWindowManager.cpp:71: CHIP Error 0x00000032: Timeout
--->./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3840 --trace_decode 1
[1658320787.287039][4152:4157] CHIP:CTL: Verifying attestation
[1658320787.292504][4152:4157] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 601. Look at AttestationVerificationResult enum to understand the errors
[1658320787.292594][4152:4157] CHIP:CTL: Error on commissioning step "AttestationVerification": "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1011: CHIP Error 0x000000AC: Internal error"
[1658320787.292627][4152:4157] CHIP:CTL: Failed to perform commissioning step 8
[1658320787.292662][4152:4157] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1011: CHIP Error 0x000000AC: Internal error" -> "Cleanup"
[1658320787.292707][4152:4157] CHIP:CTL: Performing next commissioning step "Cleanup" with completion status = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1011: CHIP Error 0x000000AC: Internal error"
[1658320787.292739][4152:4157] CHIP:CTL: Expiring failsafe on proxy 0xffff7c000b60
disabled: true
- label: "Factory Reset TH1 so that it is commissionable again"
verification: |
sudo rm -rf /tmp/chip_*
sudo ./chip-all-clusters-app --wifi
DUT as commissioner side:
./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 --trace_decode 1
[1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success"
disabled: true
- label:
"Repeat step 1 to step 7 and for step 5 set different error condition
as below: Commissionees PAA is not in the Commissioners trusted set.
Commissionee provides an invalid DAC and PAI chain as validated by TH
against the RFC5280 certificate Basic path validation algorithm
Commissionee provides DAC with validity period that is not in range of
PAA/PAI"
verification: |
To Execute ths step for error condition 1 follow the following
1. To generate the CD use the below command
./out/debug/chip-cert gen-cd -C credentials/development/commissioner_dut/struct_dac_sig_algo_ecdsa_with_sha1/dac-Cert.pem -K credentials/development/commissioner_dut/struct_dac_sig_algo_ecdsa_with_sha1/dac-Key.pem --out dec_message_3 -f 1 -V FFF1 -p 8000 -p 8001 -p 8002 -p 8003 -p 8004 -p 8005 -p 8006 -p 8007 -p 8008 -p 8009 -p 800A -p 800B -p 800C -p 800D -p 800E -p 800F -p 8010 -p 8011 -p 8012 -p 8013 -p 8014 -p 8015 -p 8016 -p 8017 -p 8018 -p 8019 -p 801A -p 801B -p 801C -p 801D -p 801E -p 801F -p 8020 -p 8021 -p 8022 -p 8023 -p 8024 -p 8025 -p 8026 -p 8027 -p 8028 -p 8029 -p 802A -p 802B -p 802C -p 802D -p 802E -p 802F -p 8030 -p 8031 -p 8032 -p 8033 -p 8034 -p 8035 -p 8036 -p 8037 -p 8038 -p 8039 -p 803A -p 803B -p 803C -p 803D -p 803E -p 803F -p 8040 -p 8041 -p 8042 -p 8043 -p 8044 -p 8045 -p 8046 -p 8047 -p 8048 -p 8049 -p 804A -p 804B -p 804C -p 804D -p 804E -p 804F -p 8050 -p 8051 -p 8052 -p 8053 -p 8054 -p 8055 -p 8056 -p 8057 -p 8058 -p 8059 -p 805A -p 805B -p 805C -p 805D -p 805E -p 805F -p 8060 -p 8061 -p 8062 -p 8063 -d 0016 -c "ZIG20142ZB330003-24" -l 0 -i 0 -n 2694 -t 0
2. Use the below command to see the generated CD
xxd -p -c 1024 dec_message_3
3082021806092a864886f70d010702a082020930820205020103310d300b06096086480165030402013082017106092a864886f70d010701a08201620482015e152400012501f1ff3602050080050180050280050380050480050580050680050780050880050980050a80050b80050c80050d80050e80050f80051080051180051280051380051480051580051680051780051880051980051a80051b80051c80051d80051e80051f80052080052180052280052380052480052580052680052780052880052980052a80052b80052c80052d80052e80052f80053080053180053280053380053480053580053680053780053880053980053a80053b80053c80053d80053e80053f80054080054180054280054380054480054580054680054780054880054980054a80054b80054c80054d80054e80054f80055080055180055280055380055480055580055680055780055880055980055a80055b80055c80055d80055e80055f80056080056180056280056380182403162c04135a494732303134325a423333303030332d32342405002406002507942624080018317c307a02010380146f4b2077c703a3d97e2c7d0f7c309c9db12abbb3300b0609608648016503040201300a06082a8648ce3d04030204463044022065ce44afabe7ad98eba7f382825be984fd4da28a5b00904acaf9f904e12bfd93022037b92fc4343578c5305d0ef0fb85dd2105f8b665bfe97687e24834d7a27c5096
3. Copy the result from step 2 in json file and transfer the json file to Raspi That will be running chip-all-clusters-app
4. Commission DUT to TH using the above generated CD by using dac_provider parameter
sudo rm -rf /tmp/chip_*
./all-cluster-app --wifi --dac_provider /dec_3.json
[1658320256.356438][4486:4486] CHIP:DL: HandlePlatformSpecificBLEEvent 32782
[1658320256.356502][4486:4486] CHIP:SVR: Failsafe timer expired
[1658320256.356555][4486:4486] CHIP:IN: SecureSession[0xaaaaf9556b00]: MarkForEviction Type:1 LSID:62352
[1658320256.356611][4486:4486] CHIP:SC: SecureSession[0xaaaaf9556b00]: Moving from state "kActive" --> "kPendingEviction"
[1658320256.356675][4486:4486] CHIP:IN: SecureSession[0xaaaaf9556b00]: Released - Type:1 LSID:62352
[1658320256.356758][4486:4486] CHIP:SVR: Commissioning failed (attempt 1): ../../third_party/connectedhomeip/src/app/server/CommissioningWindowManager.cpp:71: CHIP Error 0x00000032: Timeout
--->./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3840 --trace_decode 1
[1658320256.309769][4098:4103] CHIP:CTL: Commissioning stage next step: "SendAttestationRequest" -> "AttestationVerification"
[1658320256.309810][4098:4103] CHIP:CTL: Performing next commissioning step "AttestationVerification"
[1658320256.309839][4098:4103] CHIP:CTL: Verifying attestation
[1658320256.315382][4098:4103] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 601. Look at AttestationVerificationResult enum to understand the errors
[1658320256.315464][4098:4103] CHIP:CTL: Error on commissioning step "AttestationVerification": "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1011: CHIP Error 0x000000AC: Internal error"
[1658320256.315499][4098:4103] CHIP:CTL: Failed to perform commissioning step 8
[1658320256.315534][4098:4103] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1011: CHIP Error 0x000000AC: Internal error" -> "Cleanup"
[1658320256.315578][4098:4103] CHIP:CTL: Performing next commissioning step "Cleanup" with completion status = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1011: CHIP Error 0x000000AC: Internal error"
[1658320256.315610][4098:4103] CHIP:CTL: Expiring failsafe on proxy 0xffff6c000b60
[1658320256.315707][4098:4103] CHIP:DMG: ICR moving to [AddingComm]
[1658320256.315748][4098:4103] CHIP:DMG: ICR moving to [AddedComma]
disabled: true
- label:
"Repeat step 1 to step 7 and for step 5 set different error condition:
Certification Declaration has only one of the following fields
dac_origin_vendor_id dac_origin_product_id vendor_id field in the
Certification Declaration does not match with the VendorID attribute
found in the Basic Information cluster The Vendor ID in the DAC does
not match the vendor_id field in the Certification Declaration. The
Product ID (PID) the DAC is not present in the product_id_array field
in the Certification Declaration"
verification: |
To Execute ths step for error condition 1 follow the following
1. To generate the CD use the below command
./out/debug/chip-cert gen-cd -I -E dac-origin-vid-present -C credentials/test/certification-declaration/Chip-Test-CD-Signing-Cert.pem -K credentials/test/certification-declaration/Chip-Test-CD-Signing-Key.pem --out cd_vid_present_pid_missing.txt -o 0x8000 -r 0xFFF1 -f 1 -V FFF1 -p 8000 -p 8001 -p 8002 -p 8003 -p 8004 -p 8005 -p 8006 -p 8007 -p 8008 -p 8009 -p 800A -p 800B -p 800C -p 800D -p 800E -p 800F -p 8010 -p 8011 -p 8012 -p 8013 -p 8014 -p 8015 -p 8016 -p 8017 -p 8018 -p 8019 -p 801A -p 801B -p 801C -p 801D -p 801E -p 801F -p 8020 -p 8021 -p 8022 -p 8023 -p 8024 -p 8025 -p 8026 -p 8027 -p 8028 -p 8029 -p 802A -p 802B -p 802C -p 802D -p 802E -p 802F -p 8030 -p 8031 -p 8032 -p 8033 -p 8034 -p 8035 -p 8036 -p 8037 -p 8038 -p 8039 -p 803A -p 803B -p 803C -p 803D -p 803E -p 803F -p 8040 -p 8041 -p 8042 -p 8043 -p 8044 -p 8045 -p 8046 -p 8047 -p 8048 -p 8049 -p 804A -p 804B -p 804C -p 804D -p 804E -p 804F -p 8050 -p 8051 -p 8052 -p 8053 -p 8054 -p 8055 -p 8056 -p 8057 -p 8058 -p 8059 -p 805A -p 805B -p 805C -p 805D -p 805E -p 805F -p 8060 -p 8061 -p 8062 -p 8063 -d 0016 -c "ZIG20142ZB330003-24" -l 0 -i 0 -n 2694 -t 0
2. Use the below command to see the generated CD
xxd -p -c 1024 cd_vid_present_pid_missing.txt
3082010506092a864886f70d010702a081f73081f4020103310d300b0609608648016503040201306106092a864886f70d010701a0540452152000012501f1ff3602050080182403162c04135a494732303134325a423333303030332d32342405002406002507942624080025090080360b10140b44cabbc5016577aa8b44ffb90fcca140fe66201818317d307b020103801462fa823359acfaa9963e1cfa140addf504f37160300b0609608648016503040201300a06082a8648ce3d0403020447304502205adea20956fcdce1213f2878da4a5f4a35907eaafa70efe367edc9cec23eb2f80221009b2482360c8713ccd2738150874f9b811ec2149c3ec1f579357219985ecc765a
3. Copy the result from step 2 in json file and transfer the json file to Raspi That will be running chip-all-clusters-app
4. Commission DUT to TH using the above generated CD by using dac_provider parameter
sudo rm -rf /tmp/chip_*
sudo ./chip-all-clusters-app --dac_provider /cd.json
[1658320561.405436][4521:4521] CHIP:DL: HandlePlatformSpecificBLEEvent 32782
[1658320561.405489][4521:4521] CHIP:SVR: Failsafe timer expired
[1658320561.405546][4521:4521] CHIP:IN: SecureSession[0xaaaaec7c9e10]: MarkForEviction Type:1 LSID:27478
[1658320561.405600][4521:4521] CHIP:SC: SecureSession[0xaaaaec7c9e10]: Moving from state "kActive" --> "kPendingEviction"
[1658320561.405663][4521:4521] CHIP:IN: SecureSession[0xaaaaec7c9e10]: Released - Type:1 LSID:27478
[1658320561.405748][4521:4521] CHIP:SVR: Commissioning failed (attempt 1): ../../third_party/connectedhomeip/src/app/server/CommissioningWindowManager.cpp:71: CHIP Error 0x00000032: Timeout
[1658320561.405815][4521:4521] CHIP:IN: Clearing BLE pending packets.
--->./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3840 --trace_decode 1
[1658320561.366298][4126:4132] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 603. Look at AttestationVerificationResult enum to understand the errors
[1658320561.366382][4126:4132] CHIP:CTL: Error on commissioning step "AttestationVerification": "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1011: CHIP Error 0x000000AC: Internal error"
[1658320561.366413][4126:4132] CHIP:CTL: Failed to perform commissioning step 8
[1658320561.366481][4126:4132] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1011: CHIP Error 0x000000AC: Internal error" -> "Cleanup"
[1658320561.366524][4126:4132] CHIP:CTL: Performing next commissioning step "Cleanup" with completion status = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1011: CHIP Error 0x000000AC: Internal error"
[1658320561.366554][4126:4132] CHIP:CTL: Expiring failsafe on proxy 0xffff84000b60
disabled: true