Skip to content

Commit 6ba2a09

Browse files
tcarmelveilleuxemargolisrestyled-commits
authored
Remove all dead config options from SDK (project-chip#17119)
* Remove all dead config options from SDK - All `CHIP_CONFIG_*` that came from OpenWeave and had no current usage outside CHIPProjectConfig.h or were always disabled in common code for > 1 year and have obviously no use anymore, were removed. Fixes project-chip#17118 * Update src/lib/core/CHIPConfig.h Co-authored-by: Evgeny Margolis <emargolis@google.com> * Restyled by clang-format * Fix missing dependency Co-authored-by: Evgeny Margolis <emargolis@google.com> Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 5061044 commit 6ba2a09

File tree

59 files changed

+187
-1436
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+187
-1436
lines changed

config/android/CHIPProjectConfig.h

-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@
2626
#ifndef CHIPPROJECTCONFIG_H
2727
#define CHIPPROJECTCONFIG_H
2828

29-
// Enable use of an ephemeral UDP source port for locally initiated CHIP exchanges.
30-
#define CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT 1
31-
3229
// Enable UDP listening on demand in the CHIPDeviceController
3330
#define CHIP_CONFIG_DEVICE_CONTROLLER_DEMAND_ENABLE_UDP 1
3431

config/ios/CHIPProjectConfig.h

-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@
2626
#ifndef CHIPPROJECTCONFIG_H
2727
#define CHIPPROJECTCONFIG_H
2828

29-
// Enable use of an ephemeral UDP source port for locally initiated CHIP exchanges.
30-
#define CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT 1
31-
3229
// Enable UDP listening on demand in the CHIPDeviceController
3330
#define CHIP_CONFIG_DEVICE_CONTROLLER_DEMAND_ENABLE_UDP 1
3431

config/python/CHIPProjectConfig.h

-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#ifndef CHIPPROJECTCONFIG_H
2424
#define CHIPPROJECTCONFIG_H
2525

26-
#define CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT 1
27-
2826
#define CHIP_CONFIG_EVENT_LOGGING_NUM_EXTERNAL_CALLBACKS 2
2927

3028
#define CHIP_CONFIG_EVENT_LOGGING_EXTERNAL_EVENT_SUPPORT 1
@@ -51,7 +49,6 @@
5149
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
5250
//
5351
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
54-
#define CHIP_CONFIG_REQUIRE_AUTH 1
5552

5653
#define CHIP_CONFIG_ENABLE_UPDATE 1
5754

config/standalone/CHIPProjectConfig.h

-3
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
#ifndef CHIPPROJECTCONFIG_H
2525
#define CHIPPROJECTCONFIG_H
2626

27-
#define CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT 1
28-
2927
#define CHIP_CONFIG_EVENT_LOGGING_NUM_EXTERNAL_CALLBACKS 2
3028

3129
#define CHIP_CONFIG_EVENT_LOGGING_EXTERNAL_EVENT_SUPPORT 1
@@ -57,7 +55,6 @@
5755
// To build with this flag, pass 'treat_warnings_as_errors=false' to gn/ninja.
5856
//
5957
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
60-
#define CHIP_CONFIG_REQUIRE_AUTH 1
6158

6259
#define CHIP_CONFIG_ENABLE_UPDATE 1
6360

examples/all-clusters-app/p6/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
4646
//
4747
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
48-
#define CHIP_CONFIG_REQUIRE_AUTH 1
4948

5049
/**
5150
* CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION

examples/chip-tool/include/CHIPProjectAppConfig.h

-3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525

2626
#define CHIP_CONFIG_MAX_FABRICS 17
2727

28-
#define CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT 1
29-
3028
#define CHIP_CONFIG_EVENT_LOGGING_NUM_EXTERNAL_CALLBACKS 2
3129

3230
#define CHIP_CONFIG_EVENT_LOGGING_EXTERNAL_EVENT_SUPPORT 1
@@ -53,7 +51,6 @@
5351
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
5452
//
5553
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
56-
#define CHIP_CONFIG_REQUIRE_AUTH 1
5754

5855
#define CHIP_CONFIG_ENABLE_UPDATE 1
5956

examples/light-switch-app/efr32/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
4545
//
4646
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
47-
#define CHIP_CONFIG_REQUIRE_AUTH 1
4847

4948
/**
5049
* CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID

examples/lighting-app/bouffalolab/bl602/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
5252
//
5353
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
54-
#define CHIP_CONFIG_REQUIRE_AUTH 1
5554

5655
/**
5756
* CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID

examples/lighting-app/efr32/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
4545
//
4646
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
47-
#define CHIP_CONFIG_REQUIRE_AUTH 1
4847

4948
/**
5049
* CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID

examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h

-17
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
// WARNING: These options make it possible to circumvent basic CHIP security functionality,
3434
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
3535
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
36-
#define CHIP_CONFIG_REQUIRE_AUTH 0
3736

3837
// Use a default setup PIN code if one hasn't been provisioned in flash.
3938
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
@@ -109,22 +108,6 @@
109108
*/
110109
//#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 1
111110

112-
/**
113-
* CHIP_CONFIG_MAX_BINDINGS
114-
*
115-
* Maximum number of simultaneously active bindings per ChipExchangeManager
116-
* 1 (Time Sync) + 2 (Two 1-way subscriptions) + 1 (Software Update) = 4
117-
* in the worst case. Keeping another 4 as buffer.
118-
*/
119-
#define CHIP_CONFIG_MAX_BINDINGS 8
120-
121-
/**
122-
* CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD
123-
*
124-
* Select the ability to offload event logs to any interested subscribers using WDM.
125-
*/
126-
#define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1
127-
128111
/**
129112
* CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT
130113
*

examples/lighting-app/p6/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
5555
//
5656
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
57-
#define CHIP_CONFIG_REQUIRE_AUTH 1
5857

5958
/**
6059
* CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION

examples/lighting-app/qpg/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
4444
//
4545
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
46-
#define CHIP_CONFIG_REQUIRE_AUTH 1
4746

4847
/**
4948
* CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID

examples/lock-app/efr32/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
4242
//
4343
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
44-
#define CHIP_CONFIG_REQUIRE_AUTH 1
4544

4645
/**
4746
* CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID

examples/lock-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h

-17
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
// WARNING: These options make it possible to circumvent basic CHIP security functionality,
3434
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
3535
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
36-
#define CHIP_CONFIG_REQUIRE_AUTH 0
3736

3837
// Use a default setup PIN code if one hasn't been provisioned in flash.
3938
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
@@ -109,22 +108,6 @@
109108
*/
110109
//#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 1
111110

112-
/**
113-
* CHIP_CONFIG_MAX_BINDINGS
114-
*
115-
* Maximum number of simultaneously active bindings per ChipExchangeManager
116-
* 1 (Time Sync) + 2 (Two 1-way subscriptions) + 1 (Software Update) = 4
117-
* in the worst case. Keeping another 4 as buffer.
118-
*/
119-
#define CHIP_CONFIG_MAX_BINDINGS 8
120-
121-
/**
122-
* CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD
123-
*
124-
* Select the ability to offload event logs to any interested subscribers using WDM.
125-
*/
126-
#define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1
127-
128111
/**
129112
* CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT
130113
*

examples/lock-app/p6/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
4242
//
4343
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
44-
#define CHIP_CONFIG_REQUIRE_AUTH 1
4544

4645
/**
4746
* CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION

examples/lock-app/qpg/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
4242
//
4343
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
44-
#define CHIP_CONFIG_REQUIRE_AUTH 1
4544

4645
/**
4746
* CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID

examples/ota-requestor-app/efr32/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
4545
//
4646
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
47-
#define CHIP_CONFIG_REQUIRE_AUTH 1
4847

4948
/**
5049
* CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID

examples/ota-requestor-app/p6/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
5555
//
5656
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
57-
#define CHIP_CONFIG_REQUIRE_AUTH 1
5857

5958
/**
6059
* CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION

examples/persistent-storage/cc13x2x7_26x2x7/include/CHIPProjectConfig.h

-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232

3333
// Security and Authentication enabled for release build.
3434
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
35-
#define CHIP_CONFIG_REQUIRE_AUTH 1
3635

3736
#else // development build
3837

@@ -42,7 +41,6 @@
4241
// WARNING: These options make it possible to circumvent basic CHIP security functionality,
4342
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
4443
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
45-
#define CHIP_CONFIG_REQUIRE_AUTH 0
4644

4745
// Use a default pairing code if one hasn't been provisioned in flash.
4846
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021

examples/persistent-storage/efr32/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
4040
//
4141
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
42-
#define CHIP_CONFIG_REQUIRE_AUTH 1
4342

4443
/**
4544
* CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID

examples/persistent-storage/p6/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
5252
//
5353
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
54-
#define CHIP_CONFIG_REQUIRE_AUTH 1
5554

5655
/**
5756
* CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION

examples/persistent-storage/qpg/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
4040
//
4141
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
42-
#define CHIP_CONFIG_REQUIRE_AUTH 1
4342

4443
/**
4544
* CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID

examples/pigweed-app/efr32/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
3939
//
4040
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
41-
#define CHIP_CONFIG_REQUIRE_AUTH 1
4241

4342
/**
4443
* CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID

examples/pump-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
// Security and Authentication always enabled
3232
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
33-
#define CHIP_CONFIG_REQUIRE_AUTH 1
3433

3534
#if BUILD_RELEASE // release build
3635
// Note: Default Pairing/PIN/Serial Numbers being used. These should not be enabled for production builds

examples/pump-controller-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
// Security and Authentication always enabled
3232
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
33-
#define CHIP_CONFIG_REQUIRE_AUTH 1
3433

3534
#if BUILD_RELEASE // release build
3635
// Note: Default Pairing/PIN/Serial Numbers being used. These should not be enabled for production builds

examples/shell/efr32/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
4242
//
4343
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
44-
#define CHIP_CONFIG_REQUIRE_AUTH 1
4544

4645
/**
4746
* CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID

examples/shell/nxp/k32w/k32w0/include/CHIPProjectConfig.h

-17
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
// WARNING: These options make it possible to circumvent basic CHIP security functionality,
3434
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
3535
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
36-
#define CHIP_CONFIG_REQUIRE_AUTH 0
3736

3837
// Use a default setup PIN code if one hasn't been provisioned in flash.
3938
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
@@ -109,22 +108,6 @@
109108
*/
110109
//#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 1
111110

112-
/**
113-
* CHIP_CONFIG_MAX_BINDINGS
114-
*
115-
* Maximum number of simultaneously active bindings per ChipExchangeManager
116-
* 1 (Time Sync) + 2 (Two 1-way subscriptions) + 1 (Software Update) = 4
117-
* in the worst case. Keeping another 4 as buffer.
118-
*/
119-
#define CHIP_CONFIG_MAX_BINDINGS 8
120-
121-
/**
122-
* CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD
123-
*
124-
* Select the ability to offload event logs to any interested subscribers using WDM.
125-
*/
126-
#define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1
127-
128111
/**
129112
* @def CHIP_CONFIG_ENABLE_SERVER_IM_EVENT
130113
*

examples/shell/qpg/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
4646
//
4747
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
48-
#define CHIP_CONFIG_REQUIRE_AUTH 1
4948

5049
/**
5150
* CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID

examples/window-app/efr32/include/CHIPProjectConfig.h

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
4242
//
4343
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
44-
#define CHIP_CONFIG_REQUIRE_AUTH 1
4544

4645
/**
4746
* CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID

src/credentials/CHIPCert.h

+1
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ class ChipDN
309309
**/
310310
bool IsEmpty() const { return RDNCount() == 0; }
311311

312+
static_assert((CHIP_CONFIG_CERT_MAX_RDN_ATTRIBUTES) >= 5, "Spec requires at least 5 RDN to be supported per Matter TLV cert");
312313
ChipRDN rdn[CHIP_CONFIG_CERT_MAX_RDN_ATTRIBUTES];
313314

314315
uint8_t RDNCount() const;

src/lib/core/BUILD.gn

-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ source_set("chip_config_header") {
6868
sources = [
6969
"CHIPConfig.h",
7070
"CHIPEventLoggingConfig.h",
71-
"CHIPTimeConfig.h",
7271
]
7372

7473
public_configs = [ "${chip_root}/src:includes" ]

0 commit comments

Comments
 (0)