Skip to content

Commit a20d0ac

Browse files
Merge branch 'master' into fix_array_size
2 parents 84da202 + 72bd391 commit a20d0ac

File tree

9 files changed

+116
-20
lines changed

9 files changed

+116
-20
lines changed

examples/camera-app/camera-common/camera-app.matter

+25-2
Original file line numberDiff line numberDiff line change
@@ -1883,12 +1883,14 @@ cluster OperationalCredentials = 62 {
18831883
fabric_id fabricID = 3;
18841884
node_id nodeID = 4;
18851885
char_string<32> label = 5;
1886+
optional octet_string<85> vidVerificationStatement = 6;
18861887
fabric_idx fabricIndex = 254;
18871888
}
18881889

18891890
fabric_scoped struct NOCStruct {
1890-
fabric_sensitive octet_string noc = 1;
1891-
nullable fabric_sensitive octet_string icac = 2;
1891+
octet_string noc = 1;
1892+
nullable octet_string icac = 2;
1893+
optional octet_string vvsc = 3;
18921894
fabric_idx fabricIndex = 254;
18931895
}
18941896

@@ -1963,6 +1965,23 @@ cluster OperationalCredentials = 62 {
19631965
octet_string rootCACertificate = 0;
19641966
}
19651967

1968+
request struct SetVidVerificationStatementRequest {
1969+
optional vendor_id vendorID = 0;
1970+
optional octet_string vidVerificationStatement = 1;
1971+
optional octet_string vvsc = 2;
1972+
}
1973+
1974+
request struct SignVidVerificationRequestRequest {
1975+
fabric_idx fabricIndex = 0;
1976+
octet_string<32> clientChallenge = 1;
1977+
}
1978+
1979+
response struct SignVidVerificationResponse = 14 {
1980+
fabric_idx fabricIndex = 0;
1981+
int8u fabricBindingVersion = 1;
1982+
octet_string signature = 2;
1983+
}
1984+
19661985
/** Sender is requesting attestation information from the receiver. */
19671986
command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0;
19681987
/** Sender is requesting a device attestation certificate from the receiver. */
@@ -1979,6 +1998,10 @@ cluster OperationalCredentials = 62 {
19791998
command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10;
19801999
/** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */
19812000
command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11;
2001+
/** This command SHALL be used to update any of the accessing fabric's associated VendorID, VidVerificatioNStatement or VVSC (Vendor Verification Signing Certificate). */
2002+
fabric command access(invoke: administer) SetVidVerificationStatement(SetVidVerificationStatementRequest): DefaultSuccess = 12;
2003+
/** This command SHALL be used to request that the server authenticate the fabric associated with the FabricIndex given. */
2004+
command access(invoke: administer) SignVidVerificationRequest(SignVidVerificationRequestRequest): SignVidVerificationResponse = 13;
19822005
}
19832006

19842007
/** The Group Key Management Cluster is the mechanism by which group keys are managed. */

examples/chef/devices/rootnode_rainsensor_a7aa5d7738.matter

+25-2
Original file line numberDiff line numberDiff line change
@@ -1333,12 +1333,14 @@ cluster OperationalCredentials = 62 {
13331333
fabric_id fabricID = 3;
13341334
node_id nodeID = 4;
13351335
char_string<32> label = 5;
1336+
optional octet_string<85> vidVerificationStatement = 6;
13361337
fabric_idx fabricIndex = 254;
13371338
}
13381339

13391340
fabric_scoped struct NOCStruct {
1340-
fabric_sensitive octet_string noc = 1;
1341-
nullable fabric_sensitive octet_string icac = 2;
1341+
octet_string noc = 1;
1342+
nullable octet_string icac = 2;
1343+
optional octet_string vvsc = 3;
13421344
fabric_idx fabricIndex = 254;
13431345
}
13441346

@@ -1413,6 +1415,23 @@ cluster OperationalCredentials = 62 {
14131415
octet_string rootCACertificate = 0;
14141416
}
14151417

1418+
request struct SetVidVerificationStatementRequest {
1419+
optional vendor_id vendorID = 0;
1420+
optional octet_string vidVerificationStatement = 1;
1421+
optional octet_string vvsc = 2;
1422+
}
1423+
1424+
request struct SignVidVerificationRequestRequest {
1425+
fabric_idx fabricIndex = 0;
1426+
octet_string<32> clientChallenge = 1;
1427+
}
1428+
1429+
response struct SignVidVerificationResponse = 14 {
1430+
fabric_idx fabricIndex = 0;
1431+
int8u fabricBindingVersion = 1;
1432+
octet_string signature = 2;
1433+
}
1434+
14161435
/** Sender is requesting attestation information from the receiver. */
14171436
command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0;
14181437
/** Sender is requesting a device attestation certificate from the receiver. */
@@ -1429,6 +1448,10 @@ cluster OperationalCredentials = 62 {
14291448
command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10;
14301449
/** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */
14311450
command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11;
1451+
/** This command SHALL be used to update any of the accessing fabric's associated VendorID, VidVerificatioNStatement or VVSC (Vendor Verification Signing Certificate). */
1452+
fabric command access(invoke: administer) SetVidVerificationStatement(SetVidVerificationStatementRequest): DefaultSuccess = 12;
1453+
/** This command SHALL be used to request that the server authenticate the fabric associated with the FabricIndex given. */
1454+
command access(invoke: administer) SignVidVerificationRequest(SignVidVerificationRequestRequest): SignVidVerificationResponse = 13;
14321455
}
14331456

14341457
/** The Group Key Management Cluster is the mechanism by which group keys are managed. */

examples/chef/devices/rootnode_waterfreezedetector_dd94a13a16.matter

+25-2
Original file line numberDiff line numberDiff line change
@@ -1333,12 +1333,14 @@ cluster OperationalCredentials = 62 {
13331333
fabric_id fabricID = 3;
13341334
node_id nodeID = 4;
13351335
char_string<32> label = 5;
1336+
optional octet_string<85> vidVerificationStatement = 6;
13361337
fabric_idx fabricIndex = 254;
13371338
}
13381339

13391340
fabric_scoped struct NOCStruct {
1340-
fabric_sensitive octet_string noc = 1;
1341-
nullable fabric_sensitive octet_string icac = 2;
1341+
octet_string noc = 1;
1342+
nullable octet_string icac = 2;
1343+
optional octet_string vvsc = 3;
13421344
fabric_idx fabricIndex = 254;
13431345
}
13441346

@@ -1413,6 +1415,23 @@ cluster OperationalCredentials = 62 {
14131415
octet_string rootCACertificate = 0;
14141416
}
14151417

1418+
request struct SetVidVerificationStatementRequest {
1419+
optional vendor_id vendorID = 0;
1420+
optional octet_string vidVerificationStatement = 1;
1421+
optional octet_string vvsc = 2;
1422+
}
1423+
1424+
request struct SignVidVerificationRequestRequest {
1425+
fabric_idx fabricIndex = 0;
1426+
octet_string<32> clientChallenge = 1;
1427+
}
1428+
1429+
response struct SignVidVerificationResponse = 14 {
1430+
fabric_idx fabricIndex = 0;
1431+
int8u fabricBindingVersion = 1;
1432+
octet_string signature = 2;
1433+
}
1434+
14161435
/** Sender is requesting attestation information from the receiver. */
14171436
command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0;
14181437
/** Sender is requesting a device attestation certificate from the receiver. */
@@ -1429,6 +1448,10 @@ cluster OperationalCredentials = 62 {
14291448
command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10;
14301449
/** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */
14311450
command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11;
1451+
/** This command SHALL be used to update any of the accessing fabric's associated VendorID, VidVerificatioNStatement or VVSC (Vendor Verification Signing Certificate). */
1452+
fabric command access(invoke: administer) SetVidVerificationStatement(SetVidVerificationStatementRequest): DefaultSuccess = 12;
1453+
/** This command SHALL be used to request that the server authenticate the fabric associated with the FabricIndex given. */
1454+
command access(invoke: administer) SignVidVerificationRequest(SignVidVerificationRequestRequest): SignVidVerificationResponse = 13;
14321455
}
14331456

14341457
/** The Group Key Management Cluster is the mechanism by which group keys are managed. */
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
113 : [Android] set java 8 for java docker
1+
114 : [Silabs] Update Silabs sisdk to v2024.12.1-0, Wiseconnect to 2.11.2 and wifisdk to 3.4.1

integrations/docker/images/stage-2/chip-build-efr32/Dockerfile

+6-7
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ RUN set -x \
1212
&& rm -rf /var/lib/apt/lists/ \
1313
&& : # last line
1414

15-
16-
# Download Simplicity SDK v2024.12.0 (8627f84)
17-
RUN wget https://github.com/SiliconLabs/simplicity_sdk/releases/download/v2024.12.0/gecko-sdk.zip -O /tmp/simplicity_sdk.zip \
15+
# Download Simplicity SDK v2024.12.1-0 (da66128)
16+
RUN wget https://github.com/SiliconLabs/simplicity_sdk/releases/download/v2024.12.1-0/simplicity-sdk.zip -O /tmp/simplicity_sdk.zip \
1817
&& unzip /tmp/simplicity_sdk.zip -d /tmp/simplicity_sdk \
1918
&& rm -rf /tmp/simplicity_sdk.zip \
2019
# Deleting files that are not needed to save space
@@ -29,14 +28,14 @@ RUN wget https://github.com/SiliconLabs/simplicity_sdk/releases/download/v2024.1
2928
&& find /tmp/simplicity_sdk/platform/Device/SiliconLabs -mindepth 1 -maxdepth 1 -type d ! \( -name 'EFR32MG24' -o -name 'EFR32MG26' -o -name 'MGM24' -o -name 'MGM26' \) -exec rm -rf {} + \
3029
&& : # last line
3130

32-
# Clone WiSeConnect Wi-Fi and Bluetooth Software 2.10.3 (b6d6cb5)
33-
RUN git clone --depth=1 --single-branch --branch=2.10.3 https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git /tmp/wiseconnect-wifi-bt-sdk && \
31+
# Clone WiSeConnect Wi-Fi and Bluetooth Software 2.11.2 (3dbc243)
32+
RUN git clone --depth=1 --single-branch --branch=2.11.2 https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git /tmp/wiseconnect-wifi-bt-sdk && \
3433
cd /tmp/wiseconnect-wifi-bt-sdk && \
3534
rm -rf .git examples \
3635
&& : # last line
3736

38-
# Clone WiSeConnect SDK v3.4.0 (9f6db89)
39-
RUN git clone --depth=1 --single-branch --branch=v3.4.0 https://github.com/SiliconLabs/wiseconnect.git /tmp/wifi_sdk && \
37+
# Clone WiSeConnect SDK v3.4.1 (f675628)
38+
RUN git clone --depth=1 --single-branch --branch=v3.4.1 https://github.com/SiliconLabs/wiseconnect.git /tmp/wifi_sdk && \
4039
cd /tmp/wifi_sdk && \
4140
rm -rf .git examples components/device/stm32 \
4241
&& : # last line

scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py

+6
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ def DecodeClusterFromXml(element: xml.etree.ElementTree.Element):
9090
if 'optional' in attr.attrib and attr.attrib['optional'] == 'true':
9191
continue
9292

93+
if 'apiMaturity' in attr.attrib and attr.attrib['apiMaturity'] == 'provisional':
94+
continue
95+
9396
# when introducing access controls, the content of attributes may either be:
9497
# <attribute ...>myName</attribute>
9598
# or
@@ -112,6 +115,9 @@ def DecodeClusterFromXml(element: xml.etree.ElementTree.Element):
112115
if 'optional' in cmd.attrib and cmd.attrib['optional'] == 'true':
113116
continue
114117

118+
if 'apiMaturity' in cmd.attrib and cmd.attrib['apiMaturity'] == 'provisional':
119+
continue
120+
115121
required_commands.append(RequiredCommand(
116122
name=cmd.attrib["name"], code=parseNumberString(cmd.attrib['code'])))
117123

src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,14 @@ CHIP_ERROR AES_CCM_encrypt(const uint8_t * plaintext, size_t plaintext_length, c
161161
// Add the aligned part of the plaintext
162162
status = psa_aead_update(&operation, plaintext, block_aligned_length, ciphertext, block_aligned_length, &out_length);
163163
VerifyOrReturnError(status == PSA_SUCCESS, CHIP_ERROR_INTERNAL);
164-
VerifyOrReturnError(out_length == block_aligned_length, CHIP_ERROR_INTERNAL);
164+
VerifyOrReturnError(out_length <= block_aligned_length, CHIP_ERROR_INTERNAL);
165165
ciphertext_length += out_length;
166166

167167
if (partial_block_length > 0)
168168
{
169169
// The update output should fit in the temp buffer
170170
size_t max_output = PSA_AEAD_UPDATE_OUTPUT_SIZE(PSA_KEY_TYPE_AES, algorithm, partial_block_length);
171+
VerifyOrReturnError(max_output <= sizeof(temp), CHIP_ERROR_INTERNAL);
171172

172173
// Add the non-aligned end of the plaintext
173174
status =
@@ -254,13 +255,14 @@ CHIP_ERROR AES_CCM_decrypt(const uint8_t * ciphertext, size_t ciphertext_length,
254255
// Add the aligned part of the ciphertext
255256
status = psa_aead_update(&operation, ciphertext, block_aligned_length, plaintext, block_aligned_length, &out_length);
256257
VerifyOrReturnError(status == PSA_SUCCESS, CHIP_ERROR_INTERNAL);
257-
VerifyOrReturnError(out_length == block_aligned_length, CHIP_ERROR_INTERNAL);
258+
VerifyOrReturnError(out_length <= block_aligned_length, CHIP_ERROR_INTERNAL);
258259
plaintext_length += out_length;
259260

260261
if (partial_block_length > 0)
261262
{
262263
// The update output should fit in the temp buffer
263264
size_t max_output = PSA_AEAD_UPDATE_OUTPUT_SIZE(PSA_KEY_TYPE_AES, algorithm, partial_block_length);
265+
VerifyOrReturnError(max_output <= sizeof(temp), CHIP_ERROR_INTERNAL);
264266

265267
// Add the non-aligned end of the ciphertext
266268
status =

src/platform/silabs/wifi/icd/WifiSleepManager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class WifiSleepManager
5959
mIsCommissioningInProgress = true;
6060

6161
// TODO: Remove High Performance Req during commissioning when sleep issues are resolved
62-
// WifiSleepManager::GetInstance().RequestHighPerformance();
62+
WifiSleepManager::GetInstance().RequestHighPerformance();
6363
}
6464

6565
inline void HandleCommissioningSessionStopped()

src/platform/silabs/wifi/wf200/WifiInterfaceImpl.cpp

+23-3
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,26 @@ sl_status_t get_all_counters(void)
284284
return result;
285285
}
286286

287+
/**
288+
* @brief Convert RCPI to RSSI
289+
290+
* This function converts the Received Channel Power Indicator (RCPI) to
291+
* the Received Signal Strength Indicator (RSSI). If the result of the
292+
* conversion exceeds the range of a int16_t, it will be clamped to the maximum
293+
* or minimum value of int16_t.
294+
295+
* @param[in] rcpi: Received Channel Power Indicator value
296+
297+
* @return RSSI value
298+
*/
299+
inline int16_t ConvertRcpiToRssi(uint32_t rcpi)
300+
{
301+
int64_t rssi = (rcpi / 2) - 110;
302+
// Checking for overflows
303+
VerifyOrReturnValue(rssi <= std::numeric_limits<int16_t>::max(), std::numeric_limits<int16_t>::max());
304+
VerifyOrReturnValue(rssi >= std::numeric_limits<int16_t>::min(), std::numeric_limits<int16_t>::min());
305+
return rssi;
306+
}
287307
} // namespace
288308

289309
CHIP_ERROR GetMacAddress(sl_wfx_interface_t interface, MutableByteSpan & address)
@@ -404,7 +424,7 @@ CHIP_ERROR GetAccessPointInfo(wfx_wifi_scan_result_t & info)
404424
sl_status_t status = sl_wfx_get_signal_strength(&signal_strength);
405425
VerifyOrReturnError(status == SL_STATUS_OK, CHIP_ERROR_INTERNAL);
406426

407-
info.rssi = (signal_strength - 220) / 2;
427+
info.rssi = ConvertRcpiToRssi(signal_strength);
408428

409429
ChipLogDetail(DeviceLayer, "WIFI:SSID : %s", ap_info.ssid);
410430
ChipLogDetail(DeviceLayer, "WIFI:BSSID : %02x:%02x:%02x:%02x:%02x:%02x", ap_info.bssid[0], ap_info.bssid[1],
@@ -583,7 +603,7 @@ static void sl_wfx_scan_result_callback(sl_wfx_scan_result_ind_body_t * scan_res
583603
{
584604

585605
ChipLogDetail(DeviceLayer, "# %2d %2d %03d %02X:%02X:%02X:%02X:%02X:%02X %s", scan_count, scan_result->channel,
586-
((int16_t) (scan_result->rcpi - 220) / 2), scan_result->mac[0], scan_result->mac[1], scan_result->mac[2],
606+
(ConvertRcpiToRssi(scan_result->rcpi)), scan_result->mac[0], scan_result->mac[1], scan_result->mac[2],
587607
scan_result->mac[3], scan_result->mac[4], scan_result->mac[5], scan_result->ssid_def.ssid);
588608

589609
chip::ByteSpan requestedSsid(scan_ssid, scan_ssid_length);
@@ -628,7 +648,7 @@ static void sl_wfx_scan_result_callback(sl_wfx_scan_result_ind_body_t * scan_res
628648
}
629649

630650
ap->scan.chan = scan_result->channel;
631-
ap->scan.rssi = (scan_result->rcpi - 220) / 2;
651+
ap->scan.rssi = ConvertRcpiToRssi(scan_result->rcpi);
632652

633653
chip::ByteSpan scannedBssid(scan_result->mac, kWifiMacAddressLength);
634654
chip::MutableByteSpan outputBssid(ap->scan.bssid, kWifiMacAddressLength);

0 commit comments

Comments
 (0)