blob: b24ee7734d68ced06a2da7326db41c2e48784729 [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.2. [TC-DA-1.2] Device Attestation Request Validation [DUT -
Commissionee]
config:
nodeId: 0x12344321
cluster: "Basic"
endpoint: 0
tests:
- label: "TH1 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:97B823C0207728BEC509CFE4D413C95AA693140D1F5D60215913ABB1F220E631
disabled: true
- label:
"TH1 sends AttestationRequest Command with a random 32 bytes
AttestationNonce` to the DUT."
verification: |
./chip-tool operationalcredentials attestation-request hex:hex:97B823C0207728BEC509CFE4D413C95AA693140D1F5D60215913ABB1F220E631 1 0
Verify attestation response in TH Log:
[1657814395.876850][2481:2486] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0001
[1657814395.876900][2481:2486] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0001
[1657814395.877019][2481:2486] CHIP:TOO: AttestationResponse: {
[1657814395.878828][2481:2486] CHIP:TOO: attestationElements: 1531011D023082021906092A864886F70D010702A082020A30820206020103310D300B06096086480165030402013082017106092A864886F70D010701A08201620482015E152400012501F1FF3602050080050180050280050380050480050580050680050780050880050980050A80050B80050C80050D80050E80050F80051080051180051280051380051480051580051680051780051880051980051A80051B80051C80051D80051E80051F80052080052180052280052380052480052580052680052780052880052980052A80052B80052C80052D80052E80052F80053080053180053280053380053480053580053680053780053880053980053A80053B80053C80053D80053E80053F80054080054180054280054380054480054580054680054780054880054980054A80054B80054C80054D80054E80054F80055080055180055280055380055480055580055680055780055880055980055A80055B80055C80055D80055E80055F80056080056180056280056380182403162C04135A494732303134325A423333303030332D3234240500240600250794
[1657814395.878926][2481:2486] CHIP:TOO: ...................: 2624080018317D307B020103801462FA823359ACFAA9963E1CFA140ADDF504F37160300B0609608648016503040201300A06082A8648CE3D04030204473045022024E5D1F47A7D7B0D206A26EF699B7C9757B72D469089DE3192E678C745E7F60C022100F8AA2FA711FCB79B97E397CEDA667BAE464E2BD3FFDFC3CCED7AA8CA5F4C1A7C300220762B6B9DA08F7FC63BB693E38634EC6F87CEFF28AB1554A16AD43DCEC24C246624030018
[1657814395.878960][2481:2486] CHIP:TOO: signature: A572A713B9A05208DEE004F41043577547B66D1EDECB36707E069EB1C04C1F75BEE56D3FE1E5CD3FD5E6CFB848E0B888C08BB3FD42D988B175A07D671F3C4D7C
[1657814395.878985][2481:2486] CHIP:TOO: }
disabled: true
- label:
"TH1 sends CertificateChainRequest Command with CertificateType field
set to DACCertificate (1) to DUT to obtain DAC"
verification: |
./chip-tool operationalcredentials certificate-chain-request 1 1 0
Verify certificate chain response in TH Log:
CertificateChainResponse: {
[1657814457.685538][2491:2496] CHIP:TOO: certificate: 308201E73082018EA003020102020869CDF10DE9E54ED1300A06082A8648CE3D040302303D3125302306035504030C1C4D6174746572204465762050414920307846464631206E6F2050494431143012060A2B0601040182A27C02010C04464646313020170D3232303230353030303030305A180F39393939313233313233353935395A30533125302306035504030C1C4D61747465722044657620444143203078464646312F30783830303131143012060A2B0601040182A27C02010C044646463131143012060A2B0601040182A27C02020C04383030313059301306072A8648CE3D020106082A8648CE3D03010703420004463AC69342910A0E5588FC6FF56BB63E62ECCECB148F7D4EB03EE552601415767D16A5C663F793E49123260B8297A7CD7E7CFC7B316B39D98E90D29377738E82A360305E300C0603551D130101FF04023000300E0603551D0F0101FF040403020780301D0603551D0E0416041488DDE7B300382932CFF734C04624810F44168A6F301F0603551D2304183016801463540E47F64B1C38D13884A462D16C195D8FFB3C300A06082A8648CE3D040302
[1657814457.685600][2491:2496] CHIP:TOO: ...........: 034700304402200127A27B4B44610EE2FCDC4D2B7885563660BC0F76F17219ED6A08DFB2B3C1CD02206B59E0AF45F3EB2A85B919D35731528C6028C415239545E108E4E54E70971353
disabled: true
- label: "TH1 saves DAC certificate"
verification: |
See above
disabled: true
- label:
"TH1 sends CertificateChainRequest Command with CertificateType field
set to PAICertificate (2) to DUT to obtain DAC"
verification: |
./chip-tool operationalcredentials certificate-chain-request 2 1 0
Verify CertificateChainResponse and the size is 600 bytes in TH Log:
[1657814533.325960][2501:2506] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0003
[1657814533.326064][2501:2506] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0003
[1657814533.326158][2501:2506] CHIP:TOO: CertificateChainResponse: {
[1657814533.326229][2501:2506] CHIP:TOO: certificate: 308201CB30820171A003020102020856AD8222AD945B64300A06082A8648CE3D04030230303118301606035504030C0F4D617474657220546573742050414131143012060A2B0601040182A27C02010C04464646313020170D3232303230353030303030305A180F39393939313233313233353935395A303D3125302306035504030C1C4D6174746572204465762050414920307846464631206E6F2050494431143012060A2B0601040182A27C02010C04464646313059301306072A8648CE3D020106082A8648CE3D03010703420004419A9315C2173E0C8C876D03CCFC944852647F7FEC5E5082F4059928ECA894C594151309AC631E4CB03392AF684B0BAFB7E65B3B8162C2F52BF931B8E77AAA82A366306430120603551D130101FF040830060101FF020100300E0603551D0F0101FF040403020106301D0603551D0E0416041463540E47F64B1C38D13884A462D16C195D8FFB3C301F0603551D230418301680146AFD22771F511FECBF1641976710DCDC31A1717E300A06082A8648CE3D0403020348003045022100B2EF27F49AE9B50FB91EEAC94C4D0BDBB8D7929C6C
[1657814533.326315][2501:2506] CHIP:TOO: ...........: B88FACE529368D12054C0C0220655DC92B86BD909882A6C62177B825D7D05EDBE7C22F9FEA71220E7EA703F891
disabled: true
- label: "TH1 saves PAI certificate"
verification: |
See above
disabled: true
- label:
"TH1 Reads the VendorID attribute of the Basic Information cluster and
saves it as basic_info_vendor_id"
verification: |
./chip-tool basic read vendor-id 1 0
Verify the vendorId in TH Log:
[1654068802.514300][10990:10995] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0002 DataVersion: 2079473956
[1654068802.514357][10990:10995] CHIP:TOO: VendorID: 65521
[1654068802.514447][10990:10995] CHIP:EM: Sending Standalone Ack for MessageCounter:5573281 on exchange 17510i
disabled: true
- label:
"TH1 Reads the ProductID attribute of the Basic Information cluster
and saves it as basic_info_product_id"
verification: |
./chip-tool basic read product-id 1 0
Verify ProductId in TH Log:
[1654068987.385768][11050:11055] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0004 DataVersion: 2079473956
[1654068987.385820][11050:11055] CHIP:TOO: ProductID: 32769
[1654068987.385908][11050:11055] CHIP:EM: Sending Standalone Ack for MessageCounter:7653435 on exchange 20545i
disabled: true
- label:
"Extract the attestation_elements_message structure fields from the
AttestationResponse Command received by TH1 from DUT"
verification: |
To get attestation nonce give below command
echo hex:$(hexdump -vn32 -e"4/4 "%08X" " /dev/urandom)
./chip-tool operationalcredentials attestation-request hex:3577CA6EFFFC560E287604663AE5BE2F11D1B1CF99BE326AF5B3B114A2E91395 1 0
Verify attestation response in TH Log
[1658223434.718871][5712:5717] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0001
[1658223434.718921][5712:5717] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0001
[1658223434.718981][5712:5717] CHIP:TOO: AttestationResponse: {
[1658223434.719026][5712:5717] CHIP:TOO: attestationElements: 1531011D023082021906092A864886F70D010702A082020A30820206020103310D300B06096086480165030402013082017106092A864886F70D010701A08201620482015E152400012501F1FF3602050080050180050280050380050480050580050680050780050880050980050A80050B80050C80050D80050E80050F80051080051180051280051380051480051580051680051780051880051980051A80051B80051C80051D80051E80051F80052080052180052280052380052480052580052680052780052880052980052A80052B80052C80052D80052E80052F80053080053180053280053380053480053580053680053780053880053980053A80053B80053C80053D80053E80053F80054080054180054280054380054480054580054680054780054880054980054A80054B80054C80054D80054E80054F80055080055180055280055380055480055580055680055780055880055980055A80055B80055C80055D80055E80055F80056080056180056280056380182403162C04135A494732303134325A423333303030332D3234240500240600250794
[1658223434.719078][5712:5717] CHIP:TOO: ...................: 2624080018317D307B020103801462FA823359ACFAA9963E1CFA140ADDF504F37160300B0609608648016503040201300A06082A8648CE3D04030204473045022024E5D1F47A7D7B0D206A26EF699B7C9757B72D469089DE3192E678C745E7F60C022100F8AA2FA711FCB79B97E397CEDA667BAE464E2BD3FFDFC3CCED7AA8CA5F4C1A7C3002203577CA6EFFFC560E287604663AE5BE2F11D1B1CF99BE326AF5B3B114A2E9139524030018
[1658223434.719110][5712:5717] CHIP:TOO: signature: 7E18271F57FFC60492CA74943FC897493FB2FECDD4A4DC9F2AD348AAD1F5C57DAEB144A4D1C79419386C746F28AC145F3185C64AD99DD829EE70C3690D29642D
[1658223434.719135][5712:5717] CHIP:TOO: }
disabled: true
- label: "Read the attestation_elements_message structure fields"
verification: |
verification step to be updated.
disabled: true
- label:
"TH1 sends AttestationRequestCommand with Invalid AttestationNonce
(size> 32 bytes) as the field to the DUT."
verification: |
Verify INVALID_COMMAND error when Attestation Request sent with attestation nonce >32 byte in TH Log:
./chip-tool operationalcredentials attestation-request 762B6B9DA08F7FC63BB693E38634EC6F87CEFF28AB1554A16AD43DCEC24C2466A16AD43DCEC24C2466 1 0
[1655984597.150863][23339:23344] CHIP:DMG: InvokeResponseMessage =
[1655984597.150923][23339:23344] CHIP:DMG: {
[1655984597.150981][23339:23344] CHIP:DMG: suppressResponse = false,
[1655984597.151042][23339:23344] CHIP:DMG: InvokeResponseIBs =
[1655984597.151117][23339:23344] CHIP:DMG: [
[1655984597.151177][23339:23344] CHIP:DMG: InvokeResponseIB =
[1655984597.151255][23339:23344] CHIP:DMG: {
[1655984597.151318][23339:23344] CHIP:DMG: CommandStatusIB =
[1655984597.151404][23339:23344] CHIP:DMG: {
[1655984597.151475][23339:23344] CHIP:DMG: CommandPathIB =
[1655984597.151561][23339:23344] CHIP:DMG: {
[1655984597.151644][23339:23344] CHIP:DMG: EndpointId = 0x0,
[1655984597.151729][23339:23344] CHIP:DMG: ClusterId = 0x3e,
[1655984597.151812][23339:23344] CHIP:DMG: CommandId = 0x0,
[1655984597.151890][23339:23344] CHIP:DMG: },
[1655984597.151978][23339:23344] CHIP:DMG:
[1655984597.152050][23339:23344] CHIP:DMG: StatusIB =
[1655984597.152127][23339:23344] CHIP:DMG: {
[1655984597.152216][23339:23344] CHIP:DMG: status = 0x85 (INVALID_COMMAND),
[1655984597.152297][23339:23344] CHIP:DMG: },
[1655984597.152377][23339:23344] CHIP:DMG:
[1655984597.152449][23339:23344] CHIP:DMG: },
[1655984597.152527][23339:23344] CHIP:DMG:
[1655984597.152593][23339:23344] CHIP:DMG: },
[1655984597.152666][23339:23344] CHIP:DMG:
[1655984597.152723][23339:23344] CHIP:DMG: ],
[1655984597.152794][23339:23344] CHIP:DMG:
[1655984597.152852][23339:23344] CHIP:DMG: InteractionModelRevision = 1
[1655984597.152908][23339:23344] CHIP:DMG: },
[1655984597.153037][23339:23344] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003E Command=0x0000_0000 Status=0x85
[1655984597.153112][23339:23344] CHIP:TOO: Error: IM Error 0x00000585: General error: 0x85 (INVALID_COMMAND)
[1655984597.153256][23339:23344] CHIP:DMG: ICR moving to [AwaitingDe]
disabled: true
- label:
"TH1 sends AttestationRequestCommand with invalid AttestationNonce
(size < 32 bytes) as the field to the DUT."
verification: |
Verify INVALID_COMMAND error when Attestation Request sent with attestation nonce <32 byte in TH Log:
./chip-tool operationalcredentials attestation-request 762B6B9DA08F7FC63BB693E38634EC6F87CEFF28AB1554A1 1 0
[1655984597.150863][23339:23344] CHIP:DMG: InvokeResponseMessage =
[1655984597.150923][23339:23344] CHIP:DMG: {
[1655984597.150981][23339:23344] CHIP:DMG: suppressResponse = false,
[1655984597.151042][23339:23344] CHIP:DMG: InvokeResponseIBs =
[1655984597.151117][23339:23344] CHIP:DMG: [
[1655984597.151177][23339:23344] CHIP:DMG: InvokeResponseIB =
[1655984597.151255][23339:23344] CHIP:DMG: {
[1655984597.151318][23339:23344] CHIP:DMG: CommandStatusIB =
[1655984597.151404][23339:23344] CHIP:DMG: {
[1655984597.151475][23339:23344] CHIP:DMG: CommandPathIB =
[1655984597.151561][23339:23344] CHIP:DMG: {
[1655984597.151644][23339:23344] CHIP:DMG: EndpointId = 0x0,
[1655984597.151729][23339:23344] CHIP:DMG: ClusterId = 0x3e,
[1655984597.151812][23339:23344] CHIP:DMG: CommandId = 0x0,
[1655984597.151890][23339:23344] CHIP:DMG: },
[1655984597.151978][23339:23344] CHIP:DMG:
[1655984597.152050][23339:23344] CHIP:DMG: StatusIB =
[1655984597.152127][23339:23344] CHIP:DMG: {
[1655984597.152216][23339:23344] CHIP:DMG: status = 0x85 (INVALID_COMMAND),
[1655984597.152297][23339:23344] CHIP:DMG: },
[1655984597.152377][23339:23344] CHIP:DMG:
[1655984597.152449][23339:23344] CHIP:DMG: },
[1655984597.152527][23339:23344] CHIP:DMG:
[1655984597.152593][23339:23344] CHIP:DMG: },
[1655984597.152666][23339:23344] CHIP:DMG:
[1655984597.152723][23339:23344] CHIP:DMG: ],
[1655984597.152794][23339:23344] CHIP:DMG:
[1655984597.152852][23339:23344] CHIP:DMG: InteractionModelRevision = 1
[1655984597.152908][23339:23344] CHIP:DMG: },
[1655984597.153037][23339:23344] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003E Command=0x0000_0000 Status=0x85
[1655984597.153112][23339:23344] CHIP:TOO: Error: IM Error 0x00000585: General error: 0x85 (INVALID_COMMAND)
[1655984597.153256][23339:23344] CHIP:DMG: ICR moving to [AwaitingDe]
disabled: true