diff --git a/config/android/CHIPProjectConfig.h b/config/android/CHIPProjectConfig.h index 6804dd9cd1739e..5b55f3ba7447cb 100644 --- a/config/android/CHIPProjectConfig.h +++ b/config/android/CHIPProjectConfig.h @@ -26,9 +26,6 @@ #ifndef CHIPPROJECTCONFIG_H #define CHIPPROJECTCONFIG_H -// Enable use of an ephemeral UDP source port for locally initiated CHIP exchanges. -#define CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT 1 - // Enable UDP listening on demand in the CHIPDeviceController #define CHIP_CONFIG_DEVICE_CONTROLLER_DEMAND_ENABLE_UDP 1 diff --git a/config/ios/CHIPProjectConfig.h b/config/ios/CHIPProjectConfig.h index bb2d102f8f525d..f9be4d998c7319 100644 --- a/config/ios/CHIPProjectConfig.h +++ b/config/ios/CHIPProjectConfig.h @@ -26,9 +26,6 @@ #ifndef CHIPPROJECTCONFIG_H #define CHIPPROJECTCONFIG_H -// Enable use of an ephemeral UDP source port for locally initiated CHIP exchanges. -#define CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT 1 - // Enable UDP listening on demand in the CHIPDeviceController #define CHIP_CONFIG_DEVICE_CONTROLLER_DEMAND_ENABLE_UDP 1 diff --git a/config/python/CHIPProjectConfig.h b/config/python/CHIPProjectConfig.h index 9084ff3f77bf42..c9bb77021fa1e4 100644 --- a/config/python/CHIPProjectConfig.h +++ b/config/python/CHIPProjectConfig.h @@ -23,8 +23,6 @@ #ifndef CHIPPROJECTCONFIG_H #define CHIPPROJECTCONFIG_H -#define CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT 1 - #define CHIP_CONFIG_EVENT_LOGGING_NUM_EXTERNAL_CALLBACKS 2 #define CHIP_CONFIG_EVENT_LOGGING_EXTERNAL_EVENT_SUPPORT 1 @@ -51,7 +49,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 #define CHIP_CONFIG_ENABLE_UPDATE 1 diff --git a/config/standalone/CHIPProjectConfig.h b/config/standalone/CHIPProjectConfig.h index 919897fcf7ecae..e058cb2fef1579 100644 --- a/config/standalone/CHIPProjectConfig.h +++ b/config/standalone/CHIPProjectConfig.h @@ -24,8 +24,6 @@ #ifndef CHIPPROJECTCONFIG_H #define CHIPPROJECTCONFIG_H -#define CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT 1 - #define CHIP_CONFIG_EVENT_LOGGING_NUM_EXTERNAL_CALLBACKS 2 #define CHIP_CONFIG_EVENT_LOGGING_EXTERNAL_EVENT_SUPPORT 1 @@ -57,7 +55,6 @@ // To build with this flag, pass 'treat_warnings_as_errors=false' to gn/ninja. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 #define CHIP_CONFIG_ENABLE_UPDATE 1 diff --git a/examples/all-clusters-app/p6/include/CHIPProjectConfig.h b/examples/all-clusters-app/p6/include/CHIPProjectConfig.h index 7a6ada1013b678..f582a28fce06b5 100644 --- a/examples/all-clusters-app/p6/include/CHIPProjectConfig.h +++ b/examples/all-clusters-app/p6/include/CHIPProjectConfig.h @@ -45,7 +45,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION diff --git a/examples/chip-tool/include/CHIPProjectAppConfig.h b/examples/chip-tool/include/CHIPProjectAppConfig.h index d813f281a5ee04..a3ba0112fc70c7 100644 --- a/examples/chip-tool/include/CHIPProjectAppConfig.h +++ b/examples/chip-tool/include/CHIPProjectAppConfig.h @@ -25,8 +25,6 @@ #define CHIP_CONFIG_MAX_FABRICS 17 -#define CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT 1 - #define CHIP_CONFIG_EVENT_LOGGING_NUM_EXTERNAL_CALLBACKS 2 #define CHIP_CONFIG_EVENT_LOGGING_EXTERNAL_EVENT_SUPPORT 1 @@ -53,7 +51,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 #define CHIP_CONFIG_ENABLE_UPDATE 1 diff --git a/examples/light-switch-app/efr32/include/CHIPProjectConfig.h b/examples/light-switch-app/efr32/include/CHIPProjectConfig.h index b115bc4cd1d42f..ed1ca208f6607c 100644 --- a/examples/light-switch-app/efr32/include/CHIPProjectConfig.h +++ b/examples/light-switch-app/efr32/include/CHIPProjectConfig.h @@ -44,7 +44,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/lighting-app/bouffalolab/bl602/include/CHIPProjectConfig.h b/examples/lighting-app/bouffalolab/bl602/include/CHIPProjectConfig.h index 6df15a52750fee..432da6a471750a 100644 --- a/examples/lighting-app/bouffalolab/bl602/include/CHIPProjectConfig.h +++ b/examples/lighting-app/bouffalolab/bl602/include/CHIPProjectConfig.h @@ -51,7 +51,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/lighting-app/efr32/include/CHIPProjectConfig.h b/examples/lighting-app/efr32/include/CHIPProjectConfig.h index c919407757536c..b84048f1d7d3ae 100644 --- a/examples/lighting-app/efr32/include/CHIPProjectConfig.h +++ b/examples/lighting-app/efr32/include/CHIPProjectConfig.h @@ -44,7 +44,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h b/examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h index 8b248f9e76e22c..93600227de7325 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h +++ b/examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h @@ -33,7 +33,6 @@ // WARNING: These options make it possible to circumvent basic CHIP security functionality, // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 0 // Use a default setup PIN code if one hasn't been provisioned in flash. #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 @@ -109,22 +108,6 @@ */ //#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 1 -/** - * CHIP_CONFIG_MAX_BINDINGS - * - * Maximum number of simultaneously active bindings per ChipExchangeManager - * 1 (Time Sync) + 2 (Two 1-way subscriptions) + 1 (Software Update) = 4 - * in the worst case. Keeping another 4 as buffer. - */ -#define CHIP_CONFIG_MAX_BINDINGS 8 - -/** - * CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD - * - * Select the ability to offload event logs to any interested subscribers using WDM. - */ -#define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1 - /** * CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT * diff --git a/examples/lighting-app/p6/include/CHIPProjectConfig.h b/examples/lighting-app/p6/include/CHIPProjectConfig.h index 21271e4a31e380..9e3dca035ea178 100644 --- a/examples/lighting-app/p6/include/CHIPProjectConfig.h +++ b/examples/lighting-app/p6/include/CHIPProjectConfig.h @@ -54,7 +54,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION diff --git a/examples/lighting-app/qpg/include/CHIPProjectConfig.h b/examples/lighting-app/qpg/include/CHIPProjectConfig.h index 1b54b4d76debc0..41cd674cffdc90 100755 --- a/examples/lighting-app/qpg/include/CHIPProjectConfig.h +++ b/examples/lighting-app/qpg/include/CHIPProjectConfig.h @@ -43,7 +43,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/lock-app/efr32/include/CHIPProjectConfig.h b/examples/lock-app/efr32/include/CHIPProjectConfig.h index c2a2bca9e90449..cc930f85bc796f 100644 --- a/examples/lock-app/efr32/include/CHIPProjectConfig.h +++ b/examples/lock-app/efr32/include/CHIPProjectConfig.h @@ -41,7 +41,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/lock-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h b/examples/lock-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h index e7529327edf259..688a563932b9d6 100644 --- a/examples/lock-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h +++ b/examples/lock-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h @@ -33,7 +33,6 @@ // WARNING: These options make it possible to circumvent basic CHIP security functionality, // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 0 // Use a default setup PIN code if one hasn't been provisioned in flash. #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 @@ -109,22 +108,6 @@ */ //#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 1 -/** - * CHIP_CONFIG_MAX_BINDINGS - * - * Maximum number of simultaneously active bindings per ChipExchangeManager - * 1 (Time Sync) + 2 (Two 1-way subscriptions) + 1 (Software Update) = 4 - * in the worst case. Keeping another 4 as buffer. - */ -#define CHIP_CONFIG_MAX_BINDINGS 8 - -/** - * CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD - * - * Select the ability to offload event logs to any interested subscribers using WDM. - */ -#define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1 - /** * CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT * diff --git a/examples/lock-app/p6/include/CHIPProjectConfig.h b/examples/lock-app/p6/include/CHIPProjectConfig.h index 94246045e8aa41..248a8a8b17dc2e 100644 --- a/examples/lock-app/p6/include/CHIPProjectConfig.h +++ b/examples/lock-app/p6/include/CHIPProjectConfig.h @@ -41,7 +41,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION diff --git a/examples/lock-app/qpg/include/CHIPProjectConfig.h b/examples/lock-app/qpg/include/CHIPProjectConfig.h index 1ce2f90108a7f5..16b2fda7c3bce5 100755 --- a/examples/lock-app/qpg/include/CHIPProjectConfig.h +++ b/examples/lock-app/qpg/include/CHIPProjectConfig.h @@ -41,7 +41,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/ota-requestor-app/efr32/include/CHIPProjectConfig.h b/examples/ota-requestor-app/efr32/include/CHIPProjectConfig.h index acd26eaee40c02..babec560c4b589 100644 --- a/examples/ota-requestor-app/efr32/include/CHIPProjectConfig.h +++ b/examples/ota-requestor-app/efr32/include/CHIPProjectConfig.h @@ -44,7 +44,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/ota-requestor-app/p6/include/CHIPProjectConfig.h b/examples/ota-requestor-app/p6/include/CHIPProjectConfig.h index 17f8d6772f71b7..30140dc83620d7 100644 --- a/examples/ota-requestor-app/p6/include/CHIPProjectConfig.h +++ b/examples/ota-requestor-app/p6/include/CHIPProjectConfig.h @@ -54,7 +54,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION diff --git a/examples/persistent-storage/cc13x2x7_26x2x7/include/CHIPProjectConfig.h b/examples/persistent-storage/cc13x2x7_26x2x7/include/CHIPProjectConfig.h index 54692eee25be1a..bb8f058881f051 100644 --- a/examples/persistent-storage/cc13x2x7_26x2x7/include/CHIPProjectConfig.h +++ b/examples/persistent-storage/cc13x2x7_26x2x7/include/CHIPProjectConfig.h @@ -32,7 +32,6 @@ // Security and Authentication enabled for release build. #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 #else // development build @@ -42,7 +41,6 @@ // WARNING: These options make it possible to circumvent basic CHIP security functionality, // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 0 // Use a default pairing code if one hasn't been provisioned in flash. #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 diff --git a/examples/persistent-storage/efr32/include/CHIPProjectConfig.h b/examples/persistent-storage/efr32/include/CHIPProjectConfig.h index 04b237b4cfe598..3e44c4d3308c6e 100644 --- a/examples/persistent-storage/efr32/include/CHIPProjectConfig.h +++ b/examples/persistent-storage/efr32/include/CHIPProjectConfig.h @@ -39,7 +39,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/persistent-storage/p6/include/CHIPProjectConfig.h b/examples/persistent-storage/p6/include/CHIPProjectConfig.h index e410cc9f4857c0..3b4b86c14a9e92 100644 --- a/examples/persistent-storage/p6/include/CHIPProjectConfig.h +++ b/examples/persistent-storage/p6/include/CHIPProjectConfig.h @@ -51,7 +51,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION diff --git a/examples/persistent-storage/qpg/include/CHIPProjectConfig.h b/examples/persistent-storage/qpg/include/CHIPProjectConfig.h index 225d05f0ca5d13..e6bfac94cffa51 100755 --- a/examples/persistent-storage/qpg/include/CHIPProjectConfig.h +++ b/examples/persistent-storage/qpg/include/CHIPProjectConfig.h @@ -39,7 +39,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/pigweed-app/efr32/include/CHIPProjectConfig.h b/examples/pigweed-app/efr32/include/CHIPProjectConfig.h index adf9beb4b0c04b..31021c1723ddf8 100644 --- a/examples/pigweed-app/efr32/include/CHIPProjectConfig.h +++ b/examples/pigweed-app/efr32/include/CHIPProjectConfig.h @@ -38,7 +38,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h b/examples/pump-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h index 8fde7943e32306..f94a7c4c0ac657 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h +++ b/examples/pump-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h @@ -30,7 +30,6 @@ // Security and Authentication always enabled #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 #if BUILD_RELEASE // release build // Note: Default Pairing/PIN/Serial Numbers being used. These should not be enabled for production builds diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h b/examples/pump-controller-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h index c4d9aff0db5290..0c216632b9d5e8 100644 --- a/examples/pump-controller-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h @@ -30,7 +30,6 @@ // Security and Authentication always enabled #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 #if BUILD_RELEASE // release build // Note: Default Pairing/PIN/Serial Numbers being used. These should not be enabled for production builds diff --git a/examples/shell/efr32/include/CHIPProjectConfig.h b/examples/shell/efr32/include/CHIPProjectConfig.h index 72294a43cd0894..98d23fc7afa32d 100644 --- a/examples/shell/efr32/include/CHIPProjectConfig.h +++ b/examples/shell/efr32/include/CHIPProjectConfig.h @@ -41,7 +41,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/shell/nxp/k32w/k32w0/include/CHIPProjectConfig.h b/examples/shell/nxp/k32w/k32w0/include/CHIPProjectConfig.h index a5f5b04740b222..1373d88894a921 100644 --- a/examples/shell/nxp/k32w/k32w0/include/CHIPProjectConfig.h +++ b/examples/shell/nxp/k32w/k32w0/include/CHIPProjectConfig.h @@ -33,7 +33,6 @@ // WARNING: These options make it possible to circumvent basic CHIP security functionality, // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 0 // Use a default setup PIN code if one hasn't been provisioned in flash. #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 @@ -109,22 +108,6 @@ */ //#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 1 -/** - * CHIP_CONFIG_MAX_BINDINGS - * - * Maximum number of simultaneously active bindings per ChipExchangeManager - * 1 (Time Sync) + 2 (Two 1-way subscriptions) + 1 (Software Update) = 4 - * in the worst case. Keeping another 4 as buffer. - */ -#define CHIP_CONFIG_MAX_BINDINGS 8 - -/** - * CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD - * - * Select the ability to offload event logs to any interested subscribers using WDM. - */ -#define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1 - /** * @def CHIP_CONFIG_ENABLE_SERVER_IM_EVENT * diff --git a/examples/shell/qpg/include/CHIPProjectConfig.h b/examples/shell/qpg/include/CHIPProjectConfig.h index 957d799ce5becd..6d27e30110c9c7 100755 --- a/examples/shell/qpg/include/CHIPProjectConfig.h +++ b/examples/shell/qpg/include/CHIPProjectConfig.h @@ -45,7 +45,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/examples/window-app/efr32/include/CHIPProjectConfig.h b/examples/window-app/efr32/include/CHIPProjectConfig.h index cf54d3d7f5296b..5c8dbc8f2cc99f 100644 --- a/examples/window-app/efr32/include/CHIPProjectConfig.h +++ b/examples/window-app/efr32/include/CHIPProjectConfig.h @@ -41,7 +41,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID diff --git a/src/credentials/CHIPCert.h b/src/credentials/CHIPCert.h index 27e4380f886937..633668bd88fde5 100644 --- a/src/credentials/CHIPCert.h +++ b/src/credentials/CHIPCert.h @@ -309,6 +309,7 @@ class ChipDN **/ bool IsEmpty() const { return RDNCount() == 0; } + static_assert((CHIP_CONFIG_CERT_MAX_RDN_ATTRIBUTES) >= 5, "Spec requires at least 5 RDN to be supported per Matter TLV cert"); ChipRDN rdn[CHIP_CONFIG_CERT_MAX_RDN_ATTRIBUTES]; uint8_t RDNCount() const; diff --git a/src/lib/core/BUILD.gn b/src/lib/core/BUILD.gn index 94fc8db703c077..70e12672891c81 100644 --- a/src/lib/core/BUILD.gn +++ b/src/lib/core/BUILD.gn @@ -68,7 +68,6 @@ source_set("chip_config_header") { sources = [ "CHIPConfig.h", "CHIPEventLoggingConfig.h", - "CHIPTimeConfig.h", ] public_configs = [ "${chip_root}/src:includes" ] diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index f48fdd9f2f120b..209b6e7d94f3a2 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -94,8 +94,7 @@ * * @brief * Enable (1) or disable (0) support for platform-specific - * implementation of chip Security Manager memory-management - * functions. + * implementation of Matter memory-management functions. * * @note This configuration is mutual exclusive with * #CHIP_CONFIG_MEMORY_MGMT_MALLOC. @@ -110,7 +109,7 @@ * * @brief * Enable (1) or disable (0) support for a chip-provided - * implementation of chip Security Manager memory-management + * implementation of Matter memory-management * functions based on the C Standard Library malloc / free * functions. * @@ -164,62 +163,6 @@ #define CHIP_CONFIG_MEMORY_DEBUG_DMALLOC 0 #endif // CHIP_CONFIG_MEMORY_DEBUG_DMALLOC -/** - * @name chip Security Manager Time-Consuming Crypto Alerts. - * - * @brief - * The following definitions enable one of two potential chip - * Security Manager time-consuming crypto alerts implementations: - * - * * #CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_DUMMY - * * #CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_PLATFORM - * - * Note that these options are mutually exclusive and only one - * of these options should be set. - * - * @{ - */ - -/** - * @def CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_DUMMY - * - * @brief - * Enable (1) or disable (0) support for chip-provided dummy - * implementation of chip security manager time-consuming - * crypto alerts functions. - * - * @note This configuration is mutual exclusive with - * #CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_PLATFORM. - * - */ -#ifndef CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_DUMMY -#define CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_DUMMY 1 -#endif // CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_DUMMY - -/** - * @def CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_PLATFORM - * - * @brief - * Enable (1) or disable (0) support for a platform-specific - * implementation of chip security manager time-consuming - * crypto alerts functions. - * - * @note This configuration is mutual exclusive with - * #CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_DUMMY. - * - */ -#ifndef CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_PLATFORM -#define CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_PLATFORM 0 -#endif // CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_PLATFORM - -/** - * @} - */ - -#if ((CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_DUMMY + CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_PLATFORM) != 1) -#error "Please assert exactly one of CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_DUMMY or CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_PLATFORM." -#endif // ((CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_DUMMY + CHIP_CONFIG_SECURITY_MGR_TIME_ALERTS_PLATFORM) != 1) - /** * @def CHIP_CONFIG_SHA256_CONTEXT_SIZE * @@ -242,83 +185,6 @@ #define CHIP_CONFIG_SHA256_CONTEXT_SIZE ((sizeof(unsigned int) * (8 + 2 + 16 + 2)) + sizeof(uint64_t)) #endif // CHIP_CONFIG_SHA256_CONTEXT_SIZE -/** - * @def CHIP_CONFIG_MAX_PEER_NODES - * - * @brief - * Maximum number of peer nodes that the local node can communicate - * with. - * - */ -#ifndef CHIP_CONFIG_MAX_PEER_NODES -#define CHIP_CONFIG_MAX_PEER_NODES 128 -#endif // CHIP_CONFIG_MAX_PEER_NODES - -/** - * @def CHIP_CONFIG_MAX_CONNECTIONS - * - * @brief - * Maximum number of simultaneously active connections. - * - */ -#ifndef CHIP_CONFIG_MAX_CONNECTIONS -#define CHIP_CONFIG_MAX_CONNECTIONS INET_CONFIG_NUM_TCP_ENDPOINTS -#endif // CHIP_CONFIG_MAX_CONNECTIONS - -/** - * @def CHIP_CONFIG_MAX_INCOMING_TCP_CONNECTIONS - * - * @brief - * Maximum number of simultaneously active inbound TCP connections. - * - * Regardless of what #CHIP_CONFIG_MAX_INCOMING_TCP_CONNECTIONS - * is set to, the total number of inbound connections cannot exceed - * #CHIP_CONFIG_MAX_CONNECTIONS, which is the overall limit for - * inbound and outbound connections. - */ -#ifndef CHIP_CONFIG_MAX_INCOMING_TCP_CONNECTIONS -#define CHIP_CONFIG_MAX_INCOMING_TCP_CONNECTIONS (CHIP_CONFIG_MAX_CONNECTIONS * 4 / 5) -#endif // CHIP_CONFIG_MAX_INCOMING_TCP_CONNECTIONS - -/** - * @def CHIP_CONFIG_MAX_INCOMING_TCP_CON_FROM_SINGLE_IP - * - * @brief - * Maximum number of simultaneously active inbound TCP connections - * from the single IP address. - * - * Regardless of what #CHIP_CONFIG_MAX_INCOMING_TCP_CON_FROM_SINGLE_IP - * is set to, the total number of inbound connections from a single IP - * address cannot exceed #CHIP_CONFIG_MAX_CONNECTIONS or - * #CHIP_CONFIG_MAX_INCOMING_TCP_CONNECTIONS. - */ -#ifndef CHIP_CONFIG_MAX_INCOMING_TCP_CON_FROM_SINGLE_IP -#define CHIP_CONFIG_MAX_INCOMING_TCP_CON_FROM_SINGLE_IP 2 -#endif // CHIP_CONFIG_MAX_INCOMING_TCP_CON_FROM_SINGLE_IP - -/** - * @def CHIP_CONFIG_MAX_SESSION_KEYS - * - * @brief - * Maximum number of simultaneously active session keys. - * - */ -#ifndef CHIP_CONFIG_MAX_SESSION_KEYS -#define CHIP_CONFIG_MAX_SESSION_KEYS CHIP_CONFIG_MAX_CONNECTIONS -#endif // CHIP_CONFIG_MAX_SESSION_KEYS - -/** - * @def CHIP_CONFIG_NUM_MESSAGE_BUFS - * - * @brief - * Total number of message buffers. Only used for the BSD sockets - * configuration. - * - */ -#ifndef CHIP_CONFIG_NUM_MESSAGE_BUFS -#define CHIP_CONFIG_NUM_MESSAGE_BUFS 16 -#endif // CHIP_CONFIG_NUM_MESSAGE_BUFS - /** * @def CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS * @@ -342,37 +208,6 @@ #define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 16 #endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS -/** - * @def CHIP_CONFIG_MAX_ACTIVE_CHANNELS - * - * @brief - * Maximum number of simultaneously active channels - */ -#ifndef CHIP_CONFIG_MAX_ACTIVE_CHANNELS -#define CHIP_CONFIG_MAX_ACTIVE_CHANNELS 16 -#endif // CHIP_CONFIG_MAX_ACTIVE_CHANNELS - -/** - * @def CHIP_CONFIG_MAX_CHANNEL_HANDLES - * - * @brief - * Maximum number of channel handles - */ -#ifndef CHIP_CONFIG_MAX_CHANNEL_HANDLES -#define CHIP_CONFIG_MAX_CHANNEL_HANDLES 32 -#endif // CHIP_CONFIG_MAX_CHANNEL_HANDLES - -/** - * @def CHIP_CONFIG_NODE_ADDRESS_RESOLVE_TIMEOUT_MSECS - * - * @brief - * This is the default timeout for node addres resolve over mDNS - * - */ -#ifndef CHIP_CONFIG_NODE_ADDRESS_RESOLVE_TIMEOUT_MSECS -#define CHIP_CONFIG_NODE_ADDRESS_RESOLVE_TIMEOUT_MSECS (5000) -#endif // CHIP_CONFIG_NODE_ADDRESS_RESOLVE_TIMEOUT_MSECS - /** * @def CHIP_CONFIG_MCSP_RECEIVE_TABLE_SIZE * @@ -395,18 +230,6 @@ #define CHIP_CONFIG_MESSAGE_COUNTER_WINDOW_SIZE 32 #endif // CHIP_CONFIG_MESSAGE_COUNTER_WINDOW_SIZE -/** - * @def CHIP_CONFIG_CONNECT_IP_ADDRS - * - * @brief - * Maximum number of IP addresses tried when connecting to a - * hostname. - * - */ -#ifndef CHIP_CONFIG_CONNECT_IP_ADDRS -#define CHIP_CONFIG_CONNECT_IP_ADDRS 4 -#endif // CHIP_CONFIG_CONNECT_IP_ADDRS - /** * @def CHIP_CONFIG_DEFAULT_UDP_MTU_SIZE * @@ -422,51 +245,6 @@ #define CHIP_CONFIG_DEFAULT_UDP_MTU_SIZE 1280 #endif // CHIP_CONFIG_DEFAULT_UDP_MTU_SIZE -/** - * @def CHIP_HEADER_RESERVE_SIZE - * - * @brief - * The number of bytes to reserve in a network packet buffer to contain the - * chip message and exchange headers. - * - * This number was calculated as follows: - * - * chip Message Header: - * - * 2 -- Frame Length - * 2 -- Message Header - * 4 -- Message Id - * 8 -- Source Node Id - * 8 -- Destination Node Id - * 2 -- Key Id - * - * chip Exchange Header: - * - * 1 -- Application Version - * 1 -- Message Type - * 2 -- Exchange Id - * 4 -- Profile Id - * 4 -- Acknowledged Message Id - * - * @note A number of these fields are optional or not presently used. - * So most headers will be considerably smaller than this. - * - */ -#ifndef CHIP_HEADER_RESERVE_SIZE -#define CHIP_HEADER_RESERVE_SIZE 38 -#endif // CHIP_HEADER_RESERVE_SIZE - -/** - * @def CHIP_TRAILER_RESERVE_SIZE - * - * @brief - * TODO - * - */ -#ifndef CHIP_TRAILER_RESERVE_SIZE -#define CHIP_TRAILER_RESERVE_SIZE 20 -#endif // CHIP_TRAILER_RESERVE_SIZE - /** * @def CHIP_PORT * @@ -489,27 +267,6 @@ #define CHIP_UDC_PORT CHIP_PORT + 10 #endif // CHIP_UDC_PORT -/** - * @def CHIP_UNSECURED_PORT - * - * @brief - * chip TCP/UDP port for unsecured chip traffic. - * - */ -#ifndef CHIP_UNSECURED_PORT -#define CHIP_UNSECURED_PORT 11096 -#endif // CHIP_UNSECURED_PORT - -/** - * @def CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT - * - * @brief - * Enable use of an ephemeral UDP source port for locally initiated chip exchanges. - */ -#ifndef CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT -#define CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT 0 -#endif // CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT - /** * @def CHIP_CONFIG_SECURITY_TEST_MODE * @@ -543,49 +300,6 @@ #define CHIP_CONFIG_TEST_SHARED_SECRET_VALUE "Test secret for key derivation." #endif // CHIP_CONFIG_TEST_SHARED_SECRET_VALUE -/** - * @def CHIP_CONFIG_RESOLVE_IPADDR_LITERAL - * - * @brief - * Enable support for resolving hostnames as literal IP addresses without a DNS resolver. - * - * For historical reasons, the default is \c TRUE where \c CHIP_SYSTEM_CONFIG_USE_SOCKETS=1, - * and \c FALSE otherwise. The exception in the LwIP-only case was originally made to facilitate - * integration and change management with existing development lines. The default may - * change in the future to \c TRUE in all cases. - */ -#ifndef CHIP_CONFIG_RESOLVE_IPADDR_LITERAL -#define CHIP_CONFIG_RESOLVE_IPADDR_LITERAL (CHIP_SYSTEM_CONFIG_USE_SOCKETS) -#endif // CHIP_CONFIG_RESOLVE_IPADDR_LITERAL - -/** - * @def CHIP_CONFIG_ENABLE_TARGETED_LISTEN - * - * @brief - * Enable support for listening on particular addresses/interfaces. - * - * This allows testing multiple instances of the chip stack - * running on a single host. - * - */ -#ifndef CHIP_CONFIG_ENABLE_TARGETED_LISTEN -#define CHIP_CONFIG_ENABLE_TARGETED_LISTEN (!CHIP_SYSTEM_CONFIG_USE_LWIP) -#endif // CHIP_CONFIG_ENABLE_TARGETED_LISTEN - -/** - * @def CHIP_CONFIG_ENABLE_UNSECURED_TCP_LISTEN - * - * @brief - * Enable support for receiving TCP connections over an unsecured - * network layer (for example, from a device that is provisionally joined - * to a 6LowPAN network but does not possess the 802.15.4 network - * keys). - * - */ -#ifndef CHIP_CONFIG_ENABLE_UNSECURED_TCP_LISTEN -#define CHIP_CONFIG_ENABLE_UNSECURED_TCP_LISTEN 0 -#endif // CHIP_CONFIG_ENABLE_UNSECURED_TCP_LISTEN - /** * @def CHIP_CONFIG_CERT_MAX_RDN_ATTRIBUTES * @@ -602,100 +316,6 @@ #define CHIP_CONFIG_PERSISTED_STORAGE_KEY_GLOBAL_MESSAGE_COUNTER "GlobalMCTR" #endif // CHIP_CONFIG_PERSISTED_STORAGE_KEY_GLOBAL_MESSAGE_COUNTER -/** - * @def CHIP_CONFIG_REQUIRE_AUTH - * - * @brief - * Enable (1) or disable (0) support for client requests via an - * authenticated session. - * - * This broadly controls whether or not a number of chip servers - * require client requests to be sent via an authenticated session - * and provides a default configuration value to these related - * definitions: - * - * * #CHIP_CONFIG_REQUIRE_AUTH_DEVICE_CONTROL - * * #CHIP_CONFIG_REQUIRE_AUTH_FABRIC_PROV - * * #CHIP_CONFIG_REQUIRE_AUTH_NETWORK_PROV - * * #CHIP_CONFIG_REQUIRE_AUTH_SERVICE_PROV - * - * @note These configurations shall be deasserted for development - * and testing purposes only. No chip-enabled device shall - * be certified without these asserted. - * - */ -#ifndef CHIP_CONFIG_REQUIRE_AUTH -#define CHIP_CONFIG_REQUIRE_AUTH 1 -#endif // CHIP_CONFIG_REQUIRE_AUTH - -/** - * @def CHIP_CONFIG_REQUIRE_AUTH_DEVICE_CONTROL - * - * @brief - * Enable (1) or disable (0) support for client requests to the - * chip Device Control server via an authenticated session. See - * also #CHIP_CONFIG_REQUIRE_AUTH. - * - * @note This configuration shall be deasserted for development - * and testing purposes only. No chip-enabled device shall - * be certified without this asserted. - * - */ -#ifndef CHIP_CONFIG_REQUIRE_AUTH_DEVICE_CONTROL -#define CHIP_CONFIG_REQUIRE_AUTH_DEVICE_CONTROL CHIP_CONFIG_REQUIRE_AUTH -#endif // CHIP_CONFIG_REQUIRE_AUTH_DEVICE_CONTROL - -/** - * @def CHIP_CONFIG_REQUIRE_AUTH_FABRIC_PROV - * - * @brief - * Enable (1) or disable (0) support for client requests to the - * chip Fabric Provisioning server via an authenticated - * session. See also #CHIP_CONFIG_REQUIRE_AUTH. - * - * @note This configuration shall be deasserted for development - * and testing purposes only. No chip-enabled device shall - * be certified without this asserted. - * - */ -#ifndef CHIP_CONFIG_REQUIRE_AUTH_FABRIC_PROV -#define CHIP_CONFIG_REQUIRE_AUTH_FABRIC_PROV CHIP_CONFIG_REQUIRE_AUTH -#endif // CHIP_CONFIG_REQUIRE_AUTH_FABRIC_PROV - -/** - * @def CHIP_CONFIG_REQUIRE_AUTH_NETWORK_PROV - * - * @brief - * Enable (1) or disable (0) support for client requests to the - * chip Network Provisioning server via an authenticated - * session. See also #CHIP_CONFIG_REQUIRE_AUTH. - * - * @note This configuration shall be deasserted for development - * and testing purposes only. No chip-enabled device shall - * be certified without this asserted. - * - */ -#ifndef CHIP_CONFIG_REQUIRE_AUTH_NETWORK_PROV -#define CHIP_CONFIG_REQUIRE_AUTH_NETWORK_PROV CHIP_CONFIG_REQUIRE_AUTH -#endif // CHIP_CONFIG_REQUIRE_AUTH_NETWORK_PROV - -/** - * @def CHIP_CONFIG_REQUIRE_AUTH_SERVICE_PROV - * - * @brief - * Enable (1) or disable (0) support for client requests to the - * chip Service Provisioning server via an authenticated - * session. See also #CHIP_CONFIG_REQUIRE_AUTH. - * - * @note This configuration shall be deasserted for development - * and testing purposes only. No chip-enabled device shall - * be certified without this asserted. - * - */ -#ifndef CHIP_CONFIG_REQUIRE_AUTH_SERVICE_PROV -#define CHIP_CONFIG_REQUIRE_AUTH_SERVICE_PROV CHIP_CONFIG_REQUIRE_AUTH -#endif // CHIP_CONFIG_REQUIRE_AUTH_SERVICE_PROV - /** * @def CHIP_ERROR_LOGGING * @@ -764,50 +384,6 @@ #define CHIP_CONFIG_ENABLE_CONDITION_LOGGING 0 #endif // CHIP_CONFIG_ENABLE_CONDITION_LOGGING -/** - * @def CHIP_CONFIG_SERVICE_DIR_CONNECT_TIMEOUT_MSECS - * - * @brief - * This is the default timeout for the connect call to the - * directory server to wait for success or being notified - * of an error. - * - */ -#ifndef CHIP_CONFIG_SERVICE_DIR_CONNECT_TIMEOUT_MSECS -#define CHIP_CONFIG_SERVICE_DIR_CONNECT_TIMEOUT_MSECS (10000) -#endif // CHIP_CONFIG_SERVICE_DIR_CONNECT_TIMEOUT_MSECS - -/** - * @def CHIP_CONFIG_DEFAULT_INCOMING_CONNECTION_IDLE_TIMEOUT - * - * @brief - * The maximum amount of time, in milliseconds, that an idle inbound - * chip connection will be allowed to exist before being closed. - * - * This is a default value that can be overridden at runtime by the - * application. - * - * A value of 0 disables automatic closing of idle connections. - * - */ -#ifndef CHIP_CONFIG_DEFAULT_INCOMING_CONNECTION_IDLE_TIMEOUT -#define CHIP_CONFIG_DEFAULT_INCOMING_CONNECTION_IDLE_TIMEOUT 15000 -#endif // CHIP_CONFIG_DEFAULT_INCOMING_CONNECTION_IDLE_TIMEOUT - -/** - * @def CHIP_CONFIG_MSG_COUNTER_SYNC_RESP_TIMEOUT - * - * @brief - * The amount of time (in milliseconds) which a peer is given - * to respond to a message counter synchronization request. - * Depending on when the request is sent, peers may - * actually have up to twice this time. - * - */ -#ifndef CHIP_CONFIG_MSG_COUNTER_SYNC_RESP_TIMEOUT -#define CHIP_CONFIG_MSG_COUNTER_SYNC_RESP_TIMEOUT 2000 -#endif // CHIP_CONFIG_MSG_COUNTER_SYNC_RESP_TIMEOUT - /** * @def CHIP_CONFIG_TEST * @@ -935,18 +511,6 @@ #define CHIP_CONFIG_BLE_PKT_RESERVED_SIZE 0 #endif // CHIP_CONFIG_BLE_PKT_RESERVED_SIZE -/** - * @def CHIP_CONFIG_ENABLE_SECURITY_DEBUG_FUNCS - * - * @brief - * Enable (1) or disable (0) support for utility functions for - * decoding and outputing information related to chip security. - * - */ -#ifndef CHIP_CONFIG_ENABLE_SECURITY_DEBUG_FUNCS -#define CHIP_CONFIG_ENABLE_SECURITY_DEBUG_FUNCS 1 -#endif // CHIP_CONFIG_ENABLE_SECURITY_DEBUG_FUNCS - /** * @def CHIP_CONFIG_IsPlatformErrorNonCritical(CODE) * @@ -989,54 +553,6 @@ (_CHIP_CONFIG_IsPlatformPOSIXErrorNonCritical(CODE) || _CHIP_CONFIG_IsPlatformLwIPErrorNonCritical(CODE)) #endif // CHIP_CONFIG_IsPlatformErrorNonCritical -/** - * @def CHIP_CONFIG_WILL_OVERRIDE_PLATFORM_MATH_FUNCS - * - * @brief - * Enable (1) or disable (0) replacing math functions - * which may not be available in the standard/intrinsic library, - * and hence require special support from the platform. - * - */ -#ifndef CHIP_CONFIG_WILL_OVERRIDE_PLATFORM_MATH_FUNCS -#define CHIP_CONFIG_WILL_OVERRIDE_PLATFORM_MATH_FUNCS 0 -#endif // CHIP_CONFIG_WILL_OVERRIDE_PLATFORM_MATH_FUNCS - -/** - * @def CHIP_CONFIG_SERIALIZATION_USE_MALLOC - * - * @brief If turned on, then schema event serialization and - * deserialization will use the stdlib implementations of malloc, - * free, and realloc by default (if no other implementations have - * been provided). We will fail at compile time if the stdlib - * implementations are not present. - */ -#ifndef CHIP_CONFIG_SERIALIZATION_USE_MALLOC -#define CHIP_CONFIG_SERIALIZATION_USE_MALLOC 0 -#endif - -/** - * @def CHIP_CONFIG_SERIALIZATION_DEBUG_LOGGING - * - * @brief Enable debug logging for the serialization/deserialization APIs. - */ -#ifndef CHIP_CONFIG_SERIALIZATION_DEBUG_LOGGING -#define CHIP_CONFIG_SERIALIZATION_DEBUG_LOGGING 0 -#endif - -/** - * @def CHIP_CONFIG_SERIALIZATION_LOG_FLOATS - * - * @brief Enable debug logging of floats and doubles for the - * serialization/deserialization APIs. Not all platforms - * support these types, and may not compile if there are - * any references to them. Only matters if - * CHIP_CONFIG_SERIALIZATION_DEBUG_LOGGING is enabled. - */ -#ifndef CHIP_CONFIG_SERIALIZATION_LOG_FLOATS -#define CHIP_CONFIG_SERIALIZATION_LOG_FLOATS 1 -#endif - /** * @def CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE * @@ -1069,17 +585,6 @@ #define CHIP_CONFIG_PERSISTED_STORAGE_ENC_MSG_CNTR_ID "EncMsgCntr" #endif // CHIP_CONFIG_PERSISTED_STORAGE_ENC_MSG_CNTR_ID -/** - * @def CHIP_CONFIG_PERSISTED_STORAGE_ENC_MSG_CNTR_EPOCH - * - * @brief - * The group key message counter persisted storage epoch. - * - */ -#ifndef CHIP_CONFIG_PERSISTED_STORAGE_ENC_MSG_CNTR_EPOCH -#define CHIP_CONFIG_PERSISTED_STORAGE_ENC_MSG_CNTR_EPOCH 0x1000 -#endif // CHIP_CONFIG_PERSISTED_STORAGE_ENC_MSG_CNTR_EPOCH - /** * @def CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH * @@ -1090,16 +595,6 @@ #define CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH 16 #endif -/** - * @def CHIP_CONFIG_PERSISTED_STORAGE_MAX_VALUE_LENGTH - * - * @brief The maximum length of the value in a key/value pair - * stored in the platform's persistent storage. - */ -#ifndef CHIP_CONFIG_PERSISTED_STORAGE_MAX_VALUE_LENGTH -#define CHIP_CONFIG_PERSISTED_STORAGE_MAX_VALUE_LENGTH 256 -#endif - /** * @def CHIP_CONFIG_PERSISTED_COUNTER_DEBUG_LOGGING * @@ -1130,73 +625,21 @@ #endif /** - * @def CHIP_CONFIG_ENABLE_ARG_PARSER_SANTIY_CHECK + * @def CHIP_CONFIG_ENABLE_ARG_PARSER_VALIDITY_CHECKS * - * @brief Enable santiy checking of command-line argument definitions. - */ -#ifndef CHIP_CONFIG_ENABLE_ARG_PARSER_SANTIY_CHECK -#define CHIP_CONFIG_ENABLE_ARG_PARSER_SANTIY_CHECK 1 -#endif - -/** - * @def CHIP_CONFIG_SERVICE_PROV_RESPONSE_TIMEOUT + * @brief Enable validity checking of command-line argument definitions. * - * @brief - * The amount of time (in milliseconds) which the service is given - * to respond to a pair device to account request. + * // TODO: Determine why we wouldn't need this */ -#ifndef CHIP_CONFIG_SERVICE_PROV_RESPONSE_TIMEOUT -#define CHIP_CONFIG_SERVICE_PROV_RESPONSE_TIMEOUT 60000 +#ifndef CHIP_CONFIG_ENABLE_ARG_PARSER_VALIDITY_CHECKS +#define CHIP_CONFIG_ENABLE_ARG_PARSER_VALIDITY_CHECKS 1 #endif -/** - * @def CHIP_CONFIG_SUPPORT_LEGACY_ADD_NETWORK_MESSAGE - * - * @brief - * Enable (1) or disable (0) support for the depricated - * version of AddNetwork() message in the Network Provisioning - * profile. - * This option should be enabled to support pairing with CHIP - * legacy devices that don't have latest SW. - * - */ -#ifndef CHIP_CONFIG_SUPPORT_LEGACY_ADD_NETWORK_MESSAGE -#define CHIP_CONFIG_SUPPORT_LEGACY_ADD_NETWORK_MESSAGE 1 -#endif // CHIP_CONFIG_SUPPORT_LEGACY_ADD_NETWORK_MESSAGE - -/** - * @def CHIP_CONFIG_ALWAYS_USE_LEGACY_ADD_NETWORK_MESSAGE - * - * @brief - * Enable (1) or disable (0) the exclusive use of the depricated - * version of AddNetwork() message in the Network Provisioning - * profile. - * This option should be enabled when exclusively pairing with CHIP - * legacy devices that don't have latest SW. - * This option requires that - * CHIP_CONFIG_SUPPORT_LEGACY_ADD_NETWORK_MESSAGE is enabled. - * - */ -#ifndef CHIP_CONFIG_ALWAYS_USE_LEGACY_ADD_NETWORK_MESSAGE -#define CHIP_CONFIG_ALWAYS_USE_LEGACY_ADD_NETWORK_MESSAGE 0 -#endif // CHIP_CONFIG_ALWAYS_USE_LEGACY_ADD_NETWORK_MESSAGE - -/** - * @def CHIP_CONFIG_ENABLE_IFJ_SERVICE_FABRIC_JOIN - * - * @brief Enable the Service Provisioning profile message - * for notification of successful in-field joining of the - * chip fabric. - */ -#ifndef CHIP_CONFIG_ENABLE_IFJ_SERVICE_FABRIC_JOIN -#define CHIP_CONFIG_ENABLE_IFJ_SERVICE_FABRIC_JOIN 0 -#endif // CHIP_CONFIG_ENABLE_IFJ_SERVICE_FABRIC_JOIN - /** * @def CHIP_CONFIG_UNAUTHENTICATED_CONNECTION_POOL_SIZE * - * @brief Define the size of the pool used for tracking CHIP unauthenticated - * states. The entries in the pool are automatically rotated by LRU. The size + * @brief Define the size of the pool used for tracking Matter unauthenticated + * message states. The entries in the pool are automatically rotated by LRU. The size * of the pool limits how many PASE and CASE pairing sessions can be processed * simultaneously. */ @@ -1234,21 +677,6 @@ #define CHIP_PEER_CONNECTION_TIMEOUT_CHECK_FREQUENCY_MS 5000 #endif // CHIP_PEER_CONNECTION_TIMEOUT_CHECK_FREQUENCY_MS -/** - * @def CHIP_CONFIG_MAX_BINDINGS - * - * @brief - * Maximum number of simultaneously active bindings per WeaveExchangeManager - * The new single source TimeSync client takes one binding. - * Every WDM one-way subscription takes one binding. Mutual subscription counts as two one-way subscriptions. - * A reserved slot is needed to take an incoming subscription request. - * For a device with 2 mutual subscriptions, and one single source time sync client, it needs 2 x 2 + 1 = 5 bindings at least. - * At least six is needed if it still wants to take new WDM subscriptions under this load. - */ -#ifndef CHIP_CONFIG_MAX_BINDINGS -#define CHIP_CONFIG_MAX_BINDINGS 6 -#endif // CHIP_CONFIG_MAX_BINDINGS - /** * @def CHIP_CONFIG_MAX_FABRICS * @@ -1267,6 +695,7 @@ * @brief * Maximum number of Peer within a fabric that can send group data message to a device. * + * // TODO: Determine a better value for this */ #ifndef CHIP_CONFIG_MAX_GROUP_DATA_PEERS #define CHIP_CONFIG_MAX_GROUP_DATA_PEERS 15 @@ -1289,7 +718,7 @@ * includes development/testing features that should never be used in production contexts. */ #ifndef CHIP_NON_PRODUCTION_MARKER -#if (CHIP_CONFIG_SECURITY_TEST_MODE || (!CHIP_CONFIG_REQUIRE_AUTH) || CHIP_FUZZING_ENABLED) +#if (CHIP_CONFIG_SECURITY_TEST_MODE || CHIP_FUZZING_ENABLED) #define CHIP_NON_PRODUCTION_MARKER WARNING__DO_NOT_SHIP__CONTAINS_NON_PRODUCTION_CHIP_CODE #endif #endif @@ -1479,7 +908,12 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; /** * @def CHIP_CONFIG_DEVICE_MAX_ACTIVE_DEVICES * - * @brief Number of devices an end device can be simultaneously connected to + * @brief Number of devices to which the `Server` implementers will be able to + * concurrently connect over CASE and interact with. Relates to OTA + * requestor queries and bindings that can be operated. This is *global*, + * not *per fabric*. + * + * TODO: Determine how to better explain this. */ #ifndef CHIP_CONFIG_DEVICE_MAX_ACTIVE_DEVICES #define CHIP_CONFIG_DEVICE_MAX_ACTIVE_DEVICES 4 @@ -1632,19 +1066,12 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; "Please enable at least one of CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_FAST_COPY_SUPPORT or CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_FLEXIBLE_COPY_SUPPORT" #endif -/** - * @def CHIP_CONFIG_MAX_SESSION_RELEASE_DELEGATES - * - * @brief Defines the max number of SessionReleaseDelegate - */ -#ifndef CHIP_CONFIG_MAX_SESSION_RELEASE_DELEGATES -#define CHIP_CONFIG_MAX_SESSION_RELEASE_DELEGATES 4 -#endif - /** * @def CHIP_CONFIG_MAX_SESSION_RECOVERY_DELEGATES * * @brief Defines the max number of SessionRecoveryDelegate + * + * // TODO: Explain what this is for. */ #ifndef CHIP_CONFIG_MAX_SESSION_RECOVERY_DELEGATES #define CHIP_CONFIG_MAX_SESSION_RECOVERY_DELEGATES 4 @@ -1657,7 +1084,7 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; * Maximum number of CASE sessions that a device caches, that can be resumed */ #ifndef CHIP_CONFIG_CASE_SESSION_RESUME_CACHE_SIZE -#define CHIP_CONFIG_CASE_SESSION_RESUME_CACHE_SIZE 64 +#define CHIP_CONFIG_CASE_SESSION_RESUME_CACHE_SIZE (3 * CHIP_CONFIG_MAX_FABRICS) #endif /** diff --git a/src/lib/core/CHIPTimeConfig.h b/src/lib/core/CHIPTimeConfig.h deleted file mode 100644 index 003ac2ff2b6fda..00000000000000 --- a/src/lib/core/CHIPTimeConfig.h +++ /dev/null @@ -1,305 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2014-2017 Nest Labs, Inc. - * - * 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. - */ - -/** - * @file - * This file defines default compile-time configuration constants - * for the CHIP Time Services profile. - * - */ - -#pragma once - -/** - * @def CHIP_CONFIG_TIME - * - * @brief - * 1 (Default) If chip Time Services is needed/enabled. - * 0 If chip Time Services is not needed. Content of implementation files - * would be compiled out. - * - */ -#ifndef CHIP_CONFIG_TIME -#define CHIP_CONFIG_TIME 1 -#endif // CHIP_CONFIG_TIME - -/** - * @def CHIP_CONFIG_TIME_PROGRESS_LOGGING - * - * @brief - * Disabled: 0, Enabled: 1. If enabled, the messages at PROGRESS - * level would be available in the log. - * - */ -#ifndef CHIP_CONFIG_TIME_PROGRESS_LOGGING -#define CHIP_CONFIG_TIME_PROGRESS_LOGGING 1 -#endif // CHIP_CONFIG_TIME_PROGRESS_LOGGING - -/** - * @def CHIP_CONFIG_TIME_ENABLE_CLIENT - * - * @brief - * 1 (Default) Enable Client role in TimeSyncNode. Note that - * Coordinator also requires Client. - * 0 If not needed, Client-specific part would be compiled out. - * - */ -#ifndef CHIP_CONFIG_TIME_ENABLE_CLIENT -#define CHIP_CONFIG_TIME_ENABLE_CLIENT (CHIP_CONFIG_TIME) -#endif // CHIP_CONFIG_TIME_ENABLE_CLIENT - -/** - * @def CHIP_CONFIG_TIME_ENABLE_SERVER - * - * @brief - * 1 (Default) Enable Server role in TimeSyncNode. Note that - * Coordinator also requires Server. - * 0 If not needed, Server-specific part would be compiled out. - * - */ -#ifndef CHIP_CONFIG_TIME_ENABLE_SERVER -#define CHIP_CONFIG_TIME_ENABLE_SERVER (CHIP_CONFIG_TIME) -#endif // CHIP_CONFIG_TIME_ENABLE_SERVER - -/** - * @def CHIP_CONFIG_TIME_ENABLE_COORDINATOR - * - * @brief - * defined as combination of CHIP_CONFIG_TIME_ENABLE_SERVER and CHIP_CONFIG_TIME_ENABLE_CLIENT. - * if explicitly defined to be 1, set both CHIP_CONFIG_TIME_ENABLE_SERVER and - * CHIP_CONFIG_TIME_ENABLE_CLIENT to 1. - * - */ -#ifndef CHIP_CONFIG_TIME_ENABLE_COORDINATOR -#define CHIP_CONFIG_TIME_ENABLE_COORDINATOR ((CHIP_CONFIG_TIME_ENABLE_CLIENT) && (CHIP_CONFIG_TIME_ENABLE_SERVER)) -#endif // CHIP_CONFIG_TIME_ENABLE_COORDINATOR - -#if (CHIP_CONFIG_TIME_ENABLE_COORDINATOR && !((CHIP_CONFIG_TIME_ENABLE_CLIENT) && (CHIP_CONFIG_TIME_ENABLE_SERVER))) -#error Time Sync Coordinator requires both Server and Client to be enabled -#endif // CHIP_CONFIG_TIME_ENABLE_COORDINATOR - -/** - * @def CHIP_CONFIG_TIME_NUM_UTC_OFFSET_RECORD - * - * @brief - * Number of UTC offset records can be used for Time Zone calculation - * - */ -#ifndef CHIP_CONFIG_TIME_NUM_UTC_OFFSET_RECORD -#define CHIP_CONFIG_TIME_NUM_UTC_OFFSET_RECORD 4 -#endif // CHIP_CONFIG_TIME_NUM_UTC_OFFSET_RECORD - -/** - * @def CHIP_CONFIG_TIME_SERVER_TIMER_UNRELIABLE_AFTER_BOOT_MSEC - * - * @brief - * This only applies to Time Sync Server/Coordinator roles. This is - * 'timer_unreliable_after_boot' in design spec. Number of msec for - * the Server/Coordinator to consider its own system time as unreliable - * after program starts. Default is 30 seconds. - * - */ -#ifndef CHIP_CONFIG_TIME_SERVER_TIMER_UNRELIABLE_AFTER_BOOT_MSEC -#define CHIP_CONFIG_TIME_SERVER_TIMER_UNRELIABLE_AFTER_BOOT_MSEC (30 * 1000) -#endif // CHIP_CONFIG_TIME_SERVER_TIMER_UNRELIABLE_AFTER_BOOT_MSEC - -/** - * @def CHIP_CONFIG_TIME_CLIENT_SYNC_PERIOD_MSEC - * - * @brief - * This only applies to Time Sync Client/Coordinator roles. This is - * the variable 'timer_sync_period' in design spec. Default number of msec for - * the Client/Coordinator to perform another unicast time sync operation, - * if not specified in the init code. The default is 30 minutes. - * - */ -#ifndef CHIP_CONFIG_TIME_CLIENT_SYNC_PERIOD_MSEC -#define CHIP_CONFIG_TIME_CLIENT_SYNC_PERIOD_MSEC (30 * 60 * 1000) -#endif // CHIP_CONFIG_TIME_CLIENT_SYNC_PERIOD_MSEC - -/** - * @def CHIP_CONFIG_TIME_CLIENT_NOMINAL_DISCOVERY_PERIOD_MSEC - * - * @brief - * This only applies to Time Sync Client/Coordinator roles. This is - * the variable 'timer_nominal_discovery_period' in design spec. Default - * number of msec for the Client/Coordinator to perform another multicast - * discover operation, when there is no communication error, - * if not specified in the init code. Default is 12 hours. - * - */ -#ifndef CHIP_CONFIG_TIME_CLIENT_NOMINAL_DISCOVERY_PERIOD_MSEC -#define CHIP_CONFIG_TIME_CLIENT_NOMINAL_DISCOVERY_PERIOD_MSEC (12 * 3600 * 1000) -#endif // CHIP_CONFIG_TIME_CLIENT_NOMINAL_DISCOVERY_PERIOD_MSEC - -/** - * @def CHIP_CONFIG_TIME_CLIENT_MINIMUM_DISCOVERY_PERIOD_MSEC - * - * @brief - * This only applies to Time Sync Client/Coordinator roles. This is - * the variable 'timer_minimum_discovery_period' in design spec. Default - * number of msec for the Client/Coordinator to perform another multicast - * discover operation, when there is some communication error, - * if not specified in the init call. It is not recommended to perform - * discover operation faster than the default value. Default is 30 minutes. - * - */ -#ifndef CHIP_CONFIG_TIME_CLIENT_MINIMUM_DISCOVERY_PERIOD_MSEC -#define CHIP_CONFIG_TIME_CLIENT_MINIMUM_DISCOVERY_PERIOD_MSEC (30 * 60 * 1000) -#endif // CHIP_CONFIG_TIME_CLIENT_MINIMUM_DISCOVERY_PERIOD_MSEC - -/** - * @def CHIP_CONFIG_TIME_CLIENT_TIMER_MULTICAST_MSEC - * - * @brief - * This only applies to Time Sync Client/Coordinator roles. This is - * the variable 'timer_wait_for_multicast_response' in design spec. - * Number of msec before the Client/Coordinator quits waiting for - * responses to the multicasted sync request. Default is 2 seconds. - * - */ -#ifndef CHIP_CONFIG_TIME_CLIENT_TIMER_MULTICAST_MSEC -#define CHIP_CONFIG_TIME_CLIENT_TIMER_MULTICAST_MSEC (2 * 1000) -#endif // CHIP_CONFIG_TIME_CLIENT_TIMER_MULTICAST_MSEC - -/** - * @def CHIP_CONFIG_TIME_CLIENT_TIMER_UNICAST_MSEC - * - * @brief - * This only applies to Time Sync Client/Coordinator roles. This is - * the variable 'timer_wait_for_unicast_response' in design spec. - * Number of msec before the Client/Coordinator quits waiting for - * response to the unicasted sync request. Default is 2 seconds. - * - */ -#ifndef CHIP_CONFIG_TIME_CLIENT_TIMER_UNICAST_MSEC -#define CHIP_CONFIG_TIME_CLIENT_TIMER_UNICAST_MSEC (2 * 1000) -#endif // CHIP_CONFIG_TIME_CLIENT_TIMER_UNICAST_MSEC - -/** - * @def CHIP_CONFIG_TIME_CLIENT_TIMER_CLOUD_SERVICE_MSEC - * - * @brief - * This only applies to Time Sync Client/Coordinator roles. This is - * the variable 'timer_wait_for_service_response' in design spec. - * Number of msec before the Client/Coordinator quits waiting for - * response to the unicasted sync request going through TCP. - * Default is 5 seconds. - * - */ -#ifndef CHIP_CONFIG_TIME_CLIENT_TIMER_CLOUD_SERVICE_MSEC -#define CHIP_CONFIG_TIME_CLIENT_TIMER_CLOUD_SERVICE_MSEC (5 * 1000) -#endif // CHIP_CONFIG_TIME_CLIENT_TIMER_CLOUD_SERVICE_MSEC - -/** - * @def CHIP_CONFIG_TIME_CLIENT_MAX_RTT_USEC - * - * @brief - * This only applies to Time Sync Client/Coordinator roles. This is - * the 'max round trip time for usable response' in design spec. - * Number of usec for the longest round trip time a Client/Coordinator - * would consider a response as valid/useful. Default is 10 seconds. - * - */ -#ifndef CHIP_CONFIG_TIME_CLIENT_MAX_RTT_USEC -#define CHIP_CONFIG_TIME_CLIENT_MAX_RTT_USEC (10 * 1000000LL) -#endif // CHIP_CONFIG_TIME_CLIENT_MAX_RTT_USEC - -/** - * @def CHIP_CONFIG_TIME_CLIENT_MAX_NUM_CONTACTS - * - * @brief - * This only applies to Time Sync Client/Coordinator roles. This is - * the 'list of known Time Coordinators and Servers' in design spec. - * Number of unicast contacts a Client/Coordinator can remember. - * - */ -#ifndef CHIP_CONFIG_TIME_CLIENT_MAX_NUM_CONTACTS -#define CHIP_CONFIG_TIME_CLIENT_MAX_NUM_CONTACTS 4 -#endif // CHIP_CONFIG_TIME_CLIENT_MAX_NUM_CONTACTS - -/** - * @def CHIP_CONFIG_TIME_CLIENT_FABRIC_LOCAL_DISCOVERY - * - * @brief - * Disabled: 0, Enabled: 1. If enabled, the client would use - * UDP multicast to automatically discover available time servers - * and coordinators in the fabric. If disabled, contact information - * must be fed to the client through chip::Profiles::Time::TimeSyncNode::SyncWithNodes - * - */ -#ifndef CHIP_CONFIG_TIME_CLIENT_FABRIC_LOCAL_DISCOVERY -#define CHIP_CONFIG_TIME_CLIENT_FABRIC_LOCAL_DISCOVERY 1 -#endif // CHIP_CONFIG_TIME_CLIENT_FABRIC_LOCAL_DISCOVERY - -/** - * @def CHIP_CONFIG_TIME_CLIENT_CONNECTION_FOR_SERVICE - * - * @brief - * Disabled: 0, Enabled: 1. If enabled, the client provides an API - * to go through a chip connection for time sync. If disabled, - * contact to cloud service must be fed to the client through chip::Profiles::Time::TimeSyncNode::SyncWithNodes - * and the transport would be UDP. - * - */ -#ifndef CHIP_CONFIG_TIME_CLIENT_CONNECTION_FOR_SERVICE -#define CHIP_CONFIG_TIME_CLIENT_CONNECTION_FOR_SERVICE 1 -#endif // CHIP_CONFIG_TIME_CLIENT_CONNECTION_FOR_SERVICE - -/** - * @def CHIP_CONFIG_TIME_CLIENT_MIN_OFFSET_FROM_SERVER_USEC - * - * @brief - * This only applies to Time Sync Client/Coordinator roles. This is - * the 'min_time_offset_from_service' in design spec. If the absolute value - * of calculated correction from a Time Sync Server is smaller than this - * number of usec, the correction would be ignored. Default is 2 seconds. - * - */ -#ifndef CHIP_CONFIG_TIME_CLIENT_MIN_OFFSET_FROM_SERVER_USEC -#define CHIP_CONFIG_TIME_CLIENT_MIN_OFFSET_FROM_SERVER_USEC (2 * 1000000LL) -#endif // CHIP_CONFIG_TIME_CLIENT_MIN_OFFSET_FROM_SERVER_USEC - -/** - * @def CHIP_CONFIG_TIME_CLIENT_REASONABLE_TIME_SINCE_LAST_SYNC_MIN - * - * @brief - * This only applies to Time Sync Client/Coordinator roles. This is - * 'time since last sync for reliable response' in design spec. - * If a Server/Coordinator indicates that its system time has only been - * synced to some other reliable source longer than this number minutes - * ago, it would be counted as a stale/unreliable source. - * Default is 2 hours. - */ -#ifndef CHIP_CONFIG_TIME_CLIENT_REASONABLE_TIME_SINCE_LAST_SYNC_MIN -#define CHIP_CONFIG_TIME_CLIENT_REASONABLE_TIME_SINCE_LAST_SYNC_MIN 120 -#endif // CHIP_CONFIG_TIME_CLIENT_REASONABLE_TIME_SINCE_LAST_SYNC_MIN - -/** - * @def CHIP_CONFIG_TIME_COORDINATOR_THRESHOLD_TO_SEND_NOTIFICATION_USEC - * - * @brief - * This only applies to Time Sync Coordinator role. This specifies - * threshold to trigger sending out of time change notification. - * If the system time is corrected on a Coordinator for more than this - * number of usec, it would multicast a Time Change Notification. - * Default is 2 seconds. - */ -#ifndef CHIP_CONFIG_TIME_COORDINATOR_THRESHOLD_TO_SEND_NOTIFICATION_USEC -#define CHIP_CONFIG_TIME_COORDINATOR_THRESHOLD_TO_SEND_NOTIFICATION_USEC (2 * 1000000LL) -#endif // CHIP_CONFIG_TIME_COORDINATOR_THRESHOLD_TO_SEND_NOTIFICATION_USEC diff --git a/src/lib/support/CHIPArgParser.cpp b/src/lib/support/CHIPArgParser.cpp index e3102d4c09eee1..91b6dfefb8ab74 100644 --- a/src/lib/support/CHIPArgParser.cpp +++ b/src/lib/support/CHIPArgParser.cpp @@ -75,11 +75,11 @@ static void FindOptionById(OptionSet ** optSets, int optId, OptionSet *& optSet, static const char ** MakeUniqueHelpGroupNamesList(OptionSet * optSets[]); static void PutStringWithNewLine(FILE * s, const char * str); static void PutStringWithBlankLine(FILE * s, const char * str); -#if CHIP_CONFIG_ENABLE_ARG_PARSER_SANTIY_CHECK +#if CHIP_CONFIG_ENABLE_ARG_PARSER_VALIDITY_CHECKS static bool SanityCheckOptions(OptionSet * optSets[]); static bool HelpTextContainsLongOption(const char * optName, const char * helpText); static bool HelpTextContainsShortOption(char optChar, const char * helpText); -#endif // CHIP_CONFIG_ENABLE_ARG_PARSER_SANTIY_CHECK +#endif // CHIP_CONFIG_ENABLE_ARG_PARSER_VALIDITY_CHECKS static inline bool IsShortOptionChar(int ch) { @@ -313,7 +313,7 @@ bool ParseArgs(const char * progName, int argc, char * argv[], OptionSet * optSe // Set gActiveOptionSets to the current option set list. gActiveOptionSets = optSets; -#if CHIP_CONFIG_ENABLE_ARG_PARSER_SANTIY_CHECK +#if CHIP_CONFIG_ENABLE_ARG_PARSER_VALIDITY_CHECKS if (!SanityCheckOptions(optSets)) goto done; #endif @@ -1474,7 +1474,7 @@ static void PutStringWithBlankLine(FILE * s, const char * str) fputs("\n", s); } -#if CHIP_CONFIG_ENABLE_ARG_PARSER_SANTIY_CHECK +#if CHIP_CONFIG_ENABLE_ARG_PARSER_VALIDITY_CHECKS static bool SanityCheckOptions(OptionSet * optSets[]) { @@ -1558,7 +1558,7 @@ static bool HelpTextContainsShortOption(char optChar, const char * helpText) return false; } -#endif // CHIP_CONFIG_ENABLE_ARG_PARSER_SANTIY_CHECK +#endif // CHIP_CONFIG_ENABLE_ARG_PARSER_VALIDITY_CHECKS } // namespace ArgParser } // namespace chip diff --git a/src/lib/support/CHIPFaultInjection.h b/src/lib/support/CHIPFaultInjection.h index edc139946e0f2c..db9f5cbe66d00e 100644 --- a/src/lib/support/CHIPFaultInjection.h +++ b/src/lib/support/CHIPFaultInjection.h @@ -25,7 +25,6 @@ #include #include -#include #if CHIP_CONFIG_TEST && CHIP_WITH_NLFAULTINJECTION diff --git a/src/lib/support/tests/BUILD.gn b/src/lib/support/tests/BUILD.gn index 6a1615243933fb..95f93890f14384 100644 --- a/src/lib/support/tests/BUILD.gn +++ b/src/lib/support/tests/BUILD.gn @@ -60,10 +60,6 @@ chip_test_suite("tests") { if (current_os == "linux" || current_os == "mac") { # persisted counter unit test uses file-based persistent storage test_sources += [ "TestPersistedCounter.cpp" ] - sources += [ - "TestPersistedStorageImplementation.cpp", - "TestPersistedStorageImplementation.h", - ] } cflags = [ "-Wconversion" ] diff --git a/src/lib/support/tests/TestPersistedCounter.cpp b/src/lib/support/tests/TestPersistedCounter.cpp index d89901186d5126..7e67c2311977f4 100644 --- a/src/lib/support/tests/TestPersistedCounter.cpp +++ b/src/lib/support/tests/TestPersistedCounter.cpp @@ -27,6 +27,9 @@ #define __STDC_FORMAT_MACROS #endif +#include +#include + #include #include #include @@ -35,12 +38,159 @@ #include #include +#include +#include #include +#include #include #include +#include #include -#include "TestPersistedStorageImplementation.h" +namespace { + +constexpr size_t kMaxPersistedValueLengthSupported = 256; + +std::map sPersistentStore; + +FILE * sPersistentStoreFile = nullptr; + +} // namespace + +namespace chip { +namespace Platform { +namespace PersistedStorage { + +static void RemoveEndOfLineSymbol(char * str) +{ + size_t len = strlen(str) - 1; + if (str[len] == '\n') + str[len] = '\0'; +} + +static CHIP_ERROR GetCounterValueFromFile(const char * aKey, uint32_t & aValue) +{ + char key[CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH]; + char value[kMaxPersistedValueLengthSupported]; + + rewind(sPersistentStoreFile); + + while (fgets(key, sizeof(key), sPersistentStoreFile) != nullptr) + { + RemoveEndOfLineSymbol(key); + + if (strcmp(key, aKey) == 0) + { + if (fgets(value, sizeof(value), sPersistentStoreFile) == nullptr) + { + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + } + RemoveEndOfLineSymbol(value); + + if (!chip::ArgParser::ParseInt(value, aValue, 0)) + return CHIP_ERROR_PERSISTED_STORAGE_FAILED; + + return CHIP_NO_ERROR; + } + } + + return CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; +} + +static CHIP_ERROR SaveCounterValueToFile(const char * aKey, uint32_t aValue) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + int res; + char key[CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH]; + char value[kMaxPersistedValueLengthSupported]; + + snprintf(value, sizeof(value), "0x%08X\n", aValue); + + rewind(sPersistentStoreFile); + + // Find the stored counter value location in the file. + while (fgets(key, sizeof(key), sPersistentStoreFile) != nullptr) + { + RemoveEndOfLineSymbol(key); + + // If value is found in the file then override it. + if (strcmp(key, aKey) == 0) + { + res = fputs(value, sPersistentStoreFile); + VerifyOrExit(res != EOF, err = CHIP_ERROR_PERSISTED_STORAGE_FAILED); + + ExitNow(); + } + } + + // If value not found in the file then write the counter key and + // the counter value to the end of the file. + res = fputs(aKey, sPersistentStoreFile); + VerifyOrExit(res != EOF, err = CHIP_ERROR_PERSISTED_STORAGE_FAILED); + + res = fputs("\n", sPersistentStoreFile); + VerifyOrExit(res != EOF, err = CHIP_ERROR_PERSISTED_STORAGE_FAILED); + + res = fputs(value, sPersistentStoreFile); + VerifyOrExit(res != EOF, err = CHIP_ERROR_PERSISTED_STORAGE_FAILED); + +exit: + fflush(sPersistentStoreFile); + return err; +} + +CHIP_ERROR Read(const char * aKey, uint32_t & aValue) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + std::map::iterator it; + + VerifyOrReturnError(aKey != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(strlen(aKey) <= CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH, CHIP_ERROR_INVALID_STRING_LENGTH); + + if (sPersistentStoreFile) + { + err = GetCounterValueFromFile(aKey, aValue); + } + else + { + it = sPersistentStore.find(aKey); + VerifyOrReturnError(it != sPersistentStore.end(), CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + + size_t aValueLength = + Base64Decode(it->second.c_str(), static_cast(it->second.length()), reinterpret_cast(&aValue)); + VerifyOrReturnError(aValueLength == sizeof(uint32_t), CHIP_ERROR_PERSISTED_STORAGE_FAILED); + } + + return err; +} + +CHIP_ERROR Write(const char * aKey, uint32_t aValue) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + VerifyOrReturnError(aKey != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(strlen(aKey) <= CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH, CHIP_ERROR_INVALID_STRING_LENGTH); + + if (sPersistentStoreFile) + { + err = SaveCounterValueToFile(aKey, aValue); + } + else + { + char encodedValue[BASE64_ENCODED_LEN(sizeof(uint32_t)) + 1]; + + memset(encodedValue, 0, sizeof(encodedValue)); + Base64Encode(reinterpret_cast(&aValue), sizeof(aValue), encodedValue); + + sPersistentStore[aKey] = encodedValue; + } + + return err; +} + +} // namespace PersistedStorage +} // namespace Platform +} // namespace chip struct TestPersistedCounterContext { @@ -53,6 +203,7 @@ TestPersistedCounterContext::TestPersistedCounterContext() : mVerbose(false) {} static void InitializePersistedStorage(TestPersistedCounterContext * context) { sPersistentStore.clear(); + chip::DeviceLayer::SetConfigurationMgr(&chip::DeviceLayer::ConfigurationManagerImpl::GetDefaultInstance()); } static int TestSetup(void * inContext) @@ -72,7 +223,7 @@ static void CheckOOB(nlTestSuite * inSuite, void * inContext) CHIP_ERROR err = CHIP_NO_ERROR; chip::PersistedCounter counter; const char * testKey = "testcounter"; - char testValue[CHIP_CONFIG_PERSISTED_STORAGE_MAX_VALUE_LENGTH]; + char testValue[kMaxPersistedValueLengthSupported]; uint64_t value = 0; memset(testValue, 0, sizeof(testValue)); @@ -96,7 +247,7 @@ static void CheckReboot(nlTestSuite * inSuite, void * inContext) CHIP_ERROR err = CHIP_NO_ERROR; chip::PersistedCounter counter, counter2; const char * testKey = "testcounter"; - char testValue[CHIP_CONFIG_PERSISTED_STORAGE_MAX_VALUE_LENGTH]; + char testValue[kMaxPersistedValueLengthSupported]; uint64_t value = 0; memset(testValue, 0, sizeof(testValue)); @@ -127,7 +278,7 @@ static void CheckWriteNextCounterStart(nlTestSuite * inSuite, void * inContext) CHIP_ERROR err = CHIP_NO_ERROR; chip::PersistedCounter counter; const char * testKey = "testcounter"; - char testValue[CHIP_CONFIG_PERSISTED_STORAGE_MAX_VALUE_LENGTH]; + char testValue[kMaxPersistedValueLengthSupported]; uint64_t value = 0; memset(testValue, 0, sizeof(testValue)); diff --git a/src/lib/support/tests/TestPersistedStorageImplementation.cpp b/src/lib/support/tests/TestPersistedStorageImplementation.cpp deleted file mode 100644 index 41a1ab8ecae4c7..00000000000000 --- a/src/lib/support/tests/TestPersistedStorageImplementation.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2016-2017 Nest Labs, Inc. - * All rights reserved. - * - * 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. - */ - -/** - * @file - * Implementation of a simple std::map based persisted store. - * - */ - -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS -#endif - -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS -#endif - -#include -#include -#include - -#include -#include -#include -#include - -#include "TestPersistedStorageImplementation.h" - -using namespace chip::ArgParser; - -std::map sPersistentStore; - -FILE * sPersistentStoreFile = nullptr; - -namespace chip { -namespace Platform { -namespace PersistedStorage { - -static void RemoveEndOfLineSymbol(char * str) -{ - size_t len = strlen(str) - 1; - if (str[len] == '\n') - str[len] = '\0'; -} - -static CHIP_ERROR GetCounterValueFromFile(const char * aKey, uint32_t & aValue) -{ - char key[CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH]; - char value[CHIP_CONFIG_PERSISTED_STORAGE_MAX_VALUE_LENGTH]; - - rewind(sPersistentStoreFile); - - while (fgets(key, sizeof(key), sPersistentStoreFile) != nullptr) - { - RemoveEndOfLineSymbol(key); - - if (strcmp(key, aKey) == 0) - { - if (fgets(value, sizeof(value), sPersistentStoreFile) == nullptr) - { - return CHIP_ERROR_PERSISTED_STORAGE_FAILED; - } - RemoveEndOfLineSymbol(value); - - if (!ParseInt(value, aValue, 0)) - return CHIP_ERROR_PERSISTED_STORAGE_FAILED; - - return CHIP_NO_ERROR; - } - } - - return CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; -} - -static CHIP_ERROR SaveCounterValueToFile(const char * aKey, uint32_t aValue) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - int res; - char key[CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH]; - char value[CHIP_CONFIG_PERSISTED_STORAGE_MAX_VALUE_LENGTH]; - - snprintf(value, sizeof(value), "0x%08X\n", aValue); - - rewind(sPersistentStoreFile); - - // Find the stored counter value location in the file. - while (fgets(key, sizeof(key), sPersistentStoreFile) != nullptr) - { - RemoveEndOfLineSymbol(key); - - // If value is found in the file then override it. - if (strcmp(key, aKey) == 0) - { - res = fputs(value, sPersistentStoreFile); - VerifyOrExit(res != EOF, err = CHIP_ERROR_PERSISTED_STORAGE_FAILED); - - ExitNow(); - } - } - - // If value not found in the file then write the counter key and - // the counter value to the end of the file. - res = fputs(aKey, sPersistentStoreFile); - VerifyOrExit(res != EOF, err = CHIP_ERROR_PERSISTED_STORAGE_FAILED); - - res = fputs("\n", sPersistentStoreFile); - VerifyOrExit(res != EOF, err = CHIP_ERROR_PERSISTED_STORAGE_FAILED); - - res = fputs(value, sPersistentStoreFile); - VerifyOrExit(res != EOF, err = CHIP_ERROR_PERSISTED_STORAGE_FAILED); - -exit: - fflush(sPersistentStoreFile); - return err; -} - -CHIP_ERROR Read(const char * aKey, uint32_t & aValue) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - std::map::iterator it; - - VerifyOrReturnError(aKey != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(strlen(aKey) <= CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH, CHIP_ERROR_INVALID_STRING_LENGTH); - - if (sPersistentStoreFile) - { - err = GetCounterValueFromFile(aKey, aValue); - } - else - { - it = sPersistentStore.find(aKey); - VerifyOrReturnError(it != sPersistentStore.end(), CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); - - size_t aValueLength = - Base64Decode(it->second.c_str(), static_cast(it->second.length()), reinterpret_cast(&aValue)); - VerifyOrReturnError(aValueLength == sizeof(uint32_t), CHIP_ERROR_PERSISTED_STORAGE_FAILED); - } - - return err; -} - -CHIP_ERROR Write(const char * aKey, uint32_t aValue) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - VerifyOrReturnError(aKey != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(strlen(aKey) <= CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH, CHIP_ERROR_INVALID_STRING_LENGTH); - - if (sPersistentStoreFile) - { - err = SaveCounterValueToFile(aKey, aValue); - } - else - { - char encodedValue[BASE64_ENCODED_LEN(sizeof(uint32_t)) + 1]; - - memset(encodedValue, 0, sizeof(encodedValue)); - Base64Encode(reinterpret_cast(&aValue), sizeof(aValue), encodedValue); - - sPersistentStore[aKey] = encodedValue; - } - - return err; -} - -} // namespace PersistedStorage -} // namespace Platform -} // namespace chip diff --git a/src/lib/support/tests/TestPersistedStorageImplementation.h b/src/lib/support/tests/TestPersistedStorageImplementation.h deleted file mode 100644 index 4bdeb4c483c803..00000000000000 --- a/src/lib/support/tests/TestPersistedStorageImplementation.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2016-2017 Nest Labs, Inc. - * All rights reserved. - * - * 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. - */ - -#include -#include - -extern std::map sPersistentStore; - -extern FILE * sPersistentStoreFile; diff --git a/src/platform/Ameba/CHIPDevicePlatformConfig.h b/src/platform/Ameba/CHIPDevicePlatformConfig.h index 7392735fd9054d..f0bf671f2ec625 100644 --- a/src/platform/Ameba/CHIPDevicePlatformConfig.h +++ b/src/platform/Ameba/CHIPDevicePlatformConfig.h @@ -25,8 +25,6 @@ #pragma once // ==================== Platform Adaptations ==================== -#define CHIP_CONFIG_ERROR_CLASS 1 - #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 0 #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0 diff --git a/src/platform/Ameba/CHIPPlatformConfig.h b/src/platform/Ameba/CHIPPlatformConfig.h index 8b367b08492b24..594b7429270454 100644 --- a/src/platform/Ameba/CHIPPlatformConfig.h +++ b/src/platform/Ameba/CHIPPlatformConfig.h @@ -37,19 +37,12 @@ #define ASN1_CONFIG_ERROR_MIN 5000000 #define ASN1_CONFIG_ERROR_MAX 5000999 -#define CHIP_CONFIG_TIME_ENABLE_CLIENT 1 -#define CHIP_CONFIG_TIME_ENABLE_SERVER 0 - #define CHIP_CONFIG_ABORT() abort() // ==================== Security Adaptations ==================== // ==================== General Configuration Overrides ==================== -#ifndef CHIP_CONFIG_MAX_PEER_NODES -#define CHIP_CONFIG_MAX_PEER_NODES 16 -#endif // CHIP_CONFIG_MAX_PEER_NODES - #ifndef CHIP_CONFIG_MAX_FABRICS #define CHIP_CONFIG_MAX_FABRICS 5 #endif // CHIP_CONFIG_MAX_FABRICS diff --git a/src/platform/CYW30739/CHIPPlatformConfig.h b/src/platform/CYW30739/CHIPPlatformConfig.h index dd8571846c9dbd..345f3a5649e334 100644 --- a/src/platform/CYW30739/CHIPPlatformConfig.h +++ b/src/platform/CYW30739/CHIPPlatformConfig.h @@ -23,7 +23,6 @@ #pragma once -#define CHIP_CONFIG_PERSISTED_STORAGE_MAX_VALUE_LENGTH 2048 #define CHIP_CONFIG_MAX_FABRICS 4 #define CHIP_CONFIG_UNAUTHENTICATED_CONNECTION_POOL_SIZE 10 #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 diff --git a/src/platform/CYW30739/KeyValueStoreManagerImpl.cpp b/src/platform/CYW30739/KeyValueStoreManagerImpl.cpp index 439865f1a4e8d1..e89017b8c4adc6 100644 --- a/src/platform/CYW30739/KeyValueStoreManagerImpl.cpp +++ b/src/platform/CYW30739/KeyValueStoreManagerImpl.cpp @@ -27,6 +27,10 @@ #include #include +namespace { +constexpr size_t kMaxPersistedValueLengthSupported = 2048; +} // namespace + namespace chip { namespace DeviceLayer { namespace PersistedStorage { @@ -46,7 +50,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t const size_t keyLength = strnlen(key, CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH); VerifyOrExit(keyLength != 0 && keyLength <= CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH && - value_size <= CHIP_CONFIG_PERSISTED_STORAGE_MAX_VALUE_LENGTH, + value_size <= kMaxPersistedValueLengthSupported, err = CHIP_ERROR_INVALID_ARGUMENT); keyEntryStorage = new KeyEntryStorage(); @@ -80,7 +84,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, const size_t keyLength = strnlen(key, CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH + 1); VerifyOrExit(keyLength != 0 && keyLength <= CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH && - value_size <= CHIP_CONFIG_PERSISTED_STORAGE_MAX_VALUE_LENGTH, + value_size <= kMaxPersistedValueLengthSupported, err = CHIP_ERROR_INVALID_ARGUMENT); keyEntryStorage = new KeyEntryStorage(); diff --git a/src/platform/Darwin/CHIPPlatformConfig.h b/src/platform/Darwin/CHIPPlatformConfig.h index 0363747b4a16ac..00107122d27d34 100644 --- a/src/platform/Darwin/CHIPPlatformConfig.h +++ b/src/platform/Darwin/CHIPPlatformConfig.h @@ -27,13 +27,6 @@ #define CHIP_CONFIG_ABORT() abort() -// TODO:(#756) Add FabricState support -#define CHIP_CONFIG_ENABLE_FABRIC_STATE 0 - -#define CHIP_CONFIG_TIME_ENABLE_CLIENT 1 -#define CHIP_CONFIG_TIME_ENABLE_SERVER 0 - -#define CHIP_CONFIG_ERROR_CLASS 1 #define CHIP_CONFIG_ERROR_FORMAT_AS_STRING 1 #define CHIP_CONFIG_ERROR_SOURCE 1 @@ -45,10 +38,6 @@ // ==================== General Configuration Overrides ==================== -#ifndef CHIP_CONFIG_MAX_PEER_NODES -#define CHIP_CONFIG_MAX_PEER_NODES 16 -#endif // CHIP_CONFIG_MAX_PEER_NODES - #ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS #define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 8 #endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS @@ -57,14 +46,6 @@ #define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 8 #endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS -#ifndef CHIP_CONFIG_MAX_ACTIVE_CHANNELS -#define CHIP_CONFIG_MAX_ACTIVE_CHANNELS 16 -#endif // CHIP_CONFIG_MAX_ACTIVE_CHANNELS - -#ifndef CHIP_CONFIG_MAX_CHANNEL_HANDLES -#define CHIP_CONFIG_MAX_CHANNEL_HANDLES 32 -#endif // CHIP_CONFIG_MAX_CHANNEL_HANDLES - #ifndef CHIP_LOG_FILTERING #define CHIP_LOG_FILTERING 1 #endif // CHIP_LOG_FILTERING diff --git a/src/platform/EFR32/CHIPPlatformConfig.h b/src/platform/EFR32/CHIPPlatformConfig.h index b11a45fc8db344..192c181d70bbbb 100644 --- a/src/platform/EFR32/CHIPPlatformConfig.h +++ b/src/platform/EFR32/CHIPPlatformConfig.h @@ -37,9 +37,6 @@ #define CHIP_CONFIG_LIFETIIME_PERSISTED_COUNTER_KEY 0x01 #define CHIP_CONFIG_PERSISTED_STORAGE_KEY_GLOBAL_MESSAGE_COUNTER 0x2 -#define CHIP_CONFIG_TIME_ENABLE_CLIENT 1 -#define CHIP_CONFIG_TIME_ENABLE_SERVER 0 - // ==================== Security Adaptations ==================== // FIXME: EFR32 set to MBED-TLS (But this is third-party repo in CHIP, not SDK) @@ -48,10 +45,6 @@ // ==================== General Configuration Overrides ==================== -#ifndef CHIP_CONFIG_MAX_PEER_NODES -#define CHIP_CONFIG_MAX_PEER_NODES 16 -#endif // CHIP_CONFIG_MAX_PEER_NODES - #ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS #define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 8 #endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS @@ -60,14 +53,6 @@ #define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 8 #endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS -#ifndef CHIP_CONFIG_MAX_ACTIVE_CHANNELS -#define CHIP_CONFIG_MAX_ACTIVE_CHANNELS 8 -#endif // CHIP_CONFIG_MAX_ACTIVE_CHANNELS - -#ifndef CHIP_CONFIG_MAX_CHANNEL_HANDLES -#define CHIP_CONFIG_MAX_CHANNEL_HANDLES 16 -#endif // CHIP_CONFIG_MAX_CHANNEL_HANDLES - #ifndef CHIP_LOG_FILTERING #define CHIP_LOG_FILTERING 0 #endif // CHIP_LOG_FILTERING diff --git a/src/platform/ESP32/CHIPPlatformConfig.h b/src/platform/ESP32/CHIPPlatformConfig.h index b37b87dfa3daef..f401e6f1200f35 100644 --- a/src/platform/ESP32/CHIPPlatformConfig.h +++ b/src/platform/ESP32/CHIPPlatformConfig.h @@ -42,8 +42,6 @@ #define CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH 15 #define CHIP_LOG_FILTERING 0 -#define CHIP_CONFIG_TIME_ENABLE_CLIENT 1 -#define CHIP_CONFIG_TIME_ENABLE_SERVER 0 #define CHIP_CONFIG_ABORT() abort() @@ -53,15 +51,11 @@ // The following values are configured via the ESP-IDF Kconfig mechanism. -#define CHIP_CONFIG_MAX_CONNECTIONS CONFIG_MAX_CONNECTIONS -#define CHIP_CONFIG_MAX_PEER_NODES CONFIG_MAX_PEER_NODES #define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS #define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS CONFIG_MAX_EXCHANGE_CONTEXTS #define CHIP_CONFIG_MAX_SESSION_KEYS CONFIG_MAX_SESSION_KEYS #define CHIP_CONFIG_MAX_FABRICS CONFIG_MAX_FABRICS #define CHIP_CONFIG_SECURITY_TEST_MODE CONFIG_SECURITY_TEST_MODE -#define CHIP_CONFIG_REQUIRE_AUTH !CONFIG_DISABLE_PROVISIONING_AUTH -#define CHIP_CONFIG_DEFAULT_INCOMING_CONNECTION_IDLE_TIMEOUT CONFIG_DEFAULT_INCOMING_CONNECTION_IDLE_TIMEOUT #ifdef CONFIG_ENABLE_WIFI_STATION #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1 diff --git a/src/platform/Linux/CHIPPlatformConfig.h b/src/platform/Linux/CHIPPlatformConfig.h index b32dee36c246ef..4dcdd7d5418dd7 100644 --- a/src/platform/Linux/CHIPPlatformConfig.h +++ b/src/platform/Linux/CHIPPlatformConfig.h @@ -27,17 +27,11 @@ #define CHIP_CONFIG_ABORT() abort() -// TODO:(#756) Add FabricState support -#define CHIP_CONFIG_ENABLE_FABRIC_STATE 0 - using CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE = const char *; #define CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH 16 #define CHIP_CONFIG_LIFETIIME_PERSISTED_COUNTER_KEY "life-count" -#define CHIP_CONFIG_TIME_ENABLE_CLIENT 1 -#define CHIP_CONFIG_TIME_ENABLE_SERVER 0 - #define CHIP_CONFIG_ERROR_FORMAT_AS_STRING 1 #define CHIP_CONFIG_ERROR_SOURCE 1 @@ -49,10 +43,6 @@ using CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE = const char *; // ==================== General Configuration Overrides ==================== -#ifndef CHIP_CONFIG_MAX_PEER_NODES -#define CHIP_CONFIG_MAX_PEER_NODES 16 -#endif // CHIP_CONFIG_MAX_PEER_NODES - #ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS #define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 8 #endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS @@ -61,14 +51,6 @@ using CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE = const char *; #define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 8 #endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS -#ifndef CHIP_CONFIG_MAX_ACTIVE_CHANNELS -#define CHIP_CONFIG_MAX_ACTIVE_CHANNELS 16 -#endif // CHIP_CONFIG_MAX_ACTIVE_CHANNELS - -#ifndef CHIP_CONFIG_MAX_CHANNEL_HANDLES -#define CHIP_CONFIG_MAX_CHANNEL_HANDLES 32 -#endif // CHIP_CONFIG_MAX_CHANNEL_HANDLES - #ifndef CHIP_LOG_FILTERING #define CHIP_LOG_FILTERING 0 #endif // CHIP_LOG_FILTERING diff --git a/src/platform/P6/CHIPPlatformConfig.h b/src/platform/P6/CHIPPlatformConfig.h index 62aa40ee04799c..61b53348391aac 100644 --- a/src/platform/P6/CHIPPlatformConfig.h +++ b/src/platform/P6/CHIPPlatformConfig.h @@ -45,8 +45,6 @@ #define ASN1_CONFIG_ERROR_MAX 5000999 #define CHIP_LOG_FILTERING 0 -#define CHIP_CONFIG_TIME_ENABLE_CLIENT 1 -#define CHIP_CONFIG_TIME_ENABLE_SERVER 0 #define CHIP_CONFIG_ABORT() abort() diff --git a/src/platform/Tizen/CHIPPlatformConfig.h b/src/platform/Tizen/CHIPPlatformConfig.h index 1adc38a484d28c..5447624c0e05ef 100644 --- a/src/platform/Tizen/CHIPPlatformConfig.h +++ b/src/platform/Tizen/CHIPPlatformConfig.h @@ -28,19 +28,10 @@ #define CHIP_CONFIG_ABORT() abort() -#define CHIP_CONFIG_ENABLE_FABRIC_STATE 0 - -#define CHIP_CONFIG_TIME_ENABLE_CLIENT 1 -#define CHIP_CONFIG_TIME_ENABLE_SERVER 0 - // ==================== Security Adaptations ==================== // ==================== General Configuration Overrides ==================== -#ifndef CHIP_CONFIG_MAX_PEER_NODES -#define CHIP_CONFIG_MAX_PEER_NODES 16 -#endif // CHIP_CONFIG_MAX_PEER_NODES - #ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS #define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 16 #endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS diff --git a/src/platform/android/CHIPPlatformConfig.h b/src/platform/android/CHIPPlatformConfig.h index 183dd35c468ef8..245d61b0589c9d 100644 --- a/src/platform/android/CHIPPlatformConfig.h +++ b/src/platform/android/CHIPPlatformConfig.h @@ -27,17 +27,11 @@ #define CHIP_CONFIG_ABORT() abort() -// TODO:(#756) Add FabricState support -#define CHIP_CONFIG_ENABLE_FABRIC_STATE 0 - using CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE = const char *; #define CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH 16 #define CHIP_CONFIG_LIFETIIME_PERSISTED_COUNTER_KEY "life-count" -#define CHIP_CONFIG_TIME_ENABLE_CLIENT 1 -#define CHIP_CONFIG_TIME_ENABLE_SERVER 0 - #define CHIP_CONFIG_ERROR_FORMAT_AS_STRING 0 #define CHIP_CONFIG_ERROR_SOURCE 1 @@ -45,10 +39,6 @@ using CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE = const char *; // ==================== General Configuration Overrides ==================== -#ifndef CHIP_CONFIG_MAX_PEER_NODES -#define CHIP_CONFIG_MAX_PEER_NODES 16 -#endif // CHIP_CONFIG_MAX_PEER_NODES - #ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS #define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 8 #endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS @@ -57,14 +47,6 @@ using CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE = const char *; #define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 8 #endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS -#ifndef CHIP_CONFIG_MAX_ACTIVE_CHANNELS -#define CHIP_CONFIG_MAX_ACTIVE_CHANNELS 16 -#endif // CHIP_CONFIG_MAX_ACTIVE_CHANNELS - -#ifndef CHIP_CONFIG_MAX_CHANNEL_HANDLES -#define CHIP_CONFIG_MAX_CHANNEL_HANDLES 32 -#endif // CHIP_CONFIG_MAX_CHANNEL_HANDLES - #ifndef CHIP_LOG_FILTERING #define CHIP_LOG_FILTERING 0 #endif // CHIP_LOG_FILTERING diff --git a/src/platform/bouffalolab/BL602/CHIPPlatformConfig.h b/src/platform/bouffalolab/BL602/CHIPPlatformConfig.h index 7e427d48ad3cfa..c2a14d2b967143 100644 --- a/src/platform/bouffalolab/BL602/CHIPPlatformConfig.h +++ b/src/platform/bouffalolab/BL602/CHIPPlatformConfig.h @@ -47,9 +47,6 @@ #define CHIP_CONFIG_LIFETIIME_PERSISTED_COUNTER_KEY 0x01 //#define CHIP_CONFIG_PERSISTED_STORAGE_KEY_GLOBAL_MESSAGE_COUNTER 0x2 -#define CHIP_CONFIG_TIME_ENABLE_CLIENT 1 -#define CHIP_CONFIG_TIME_ENABLE_SERVER 0 - // ==================== Security Adaptations ==================== #define CHIP_CONFIG_USE_OPENSSL_ECC 0 @@ -89,10 +86,6 @@ // ==================== General Configuration Overrides ==================== -#ifndef CHIP_CONFIG_MAX_PEER_NODES -#define CHIP_CONFIG_MAX_PEER_NODES 16 -#endif // CHIP_CONFIG_MAX_PEER_NODES - #ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS #define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 8 #endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS @@ -101,14 +94,6 @@ #define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 8 #endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS -#ifndef CHIP_CONFIG_MAX_ACTIVE_CHANNELS -#define CHIP_CONFIG_MAX_ACTIVE_CHANNELS 8 -#endif // CHIP_CONFIG_MAX_ACTIVE_CHANNELS - -#ifndef CHIP_CONFIG_MAX_CHANNEL_HANDLES -#define CHIP_CONFIG_MAX_CHANNEL_HANDLES 16 -#endif // CHIP_CONFIG_MAX_CHANNEL_HANDLES - #ifndef CHIP_CONFIG_RMP_TIMER_DEFAULT_PERIOD_SHIFT #define CHIP_CONFIG_RMP_TIMER_DEFAULT_PERIOD_SHIFT 6 #endif // CHIP_CONFIG_RMP_TIMER_DEFAULT_PERIOD_SHIFT @@ -127,18 +112,10 @@ // ==================== Security Configuration Overrides ==================== -#ifndef CHIP_CONFIG_MAX_APPLICATION_GROUPS -#define CHIP_CONFIG_MAX_APPLICATION_GROUPS 4 -#endif // CHIP_CONFIG_MAX_APPLICATION_GROUPS - #ifndef CHIP_CONFIG_DEBUG_CERT_VALIDATION #define CHIP_CONFIG_DEBUG_CERT_VALIDATION 0 #endif // CHIP_CONFIG_DEBUG_CERT_VALIDATION -#ifndef CHIP_CONFIG_ENABLE_CASE_RESPONDER -#define CHIP_CONFIG_ENABLE_CASE_RESPONDER 1 -#endif // CHIP_CONFIG_ENABLE_CASE_RESPONDER - // ==================== FreeRTOS Configuration Overrides ==================== #ifndef CHIP_CONFIG_FREERTOS_USE_STATIC_TASK #define CHIP_CONFIG_FREERTOS_USE_STATIC_TASK 1 diff --git a/src/platform/cc13x2_26x2/CHIPPlatformConfig.h b/src/platform/cc13x2_26x2/CHIPPlatformConfig.h index e86c92a2183dff..99e68be9158693 100644 --- a/src/platform/cc13x2_26x2/CHIPPlatformConfig.h +++ b/src/platform/cc13x2_26x2/CHIPPlatformConfig.h @@ -47,10 +47,6 @@ // ==================== General Configuration Overrides ==================== -#ifndef CHIP_CONFIG_MAX_PEER_NODES -#define CHIP_CONFIG_MAX_PEER_NODES 16 -#endif // CHIP_CONFIG_MAX_PEER_NODES - #ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS #define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 8 #endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS @@ -59,14 +55,6 @@ #define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 8 #endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS -#ifndef CHIP_CONFIG_MAX_ACTIVE_CHANNELS -#define CHIP_CONFIG_MAX_ACTIVE_CHANNELS 8 -#endif // CHIP_CONFIG_MAX_ACTIVE_CHANNELS - -#ifndef CHIP_CONFIG_MAX_CHANNEL_HANDLES -#define CHIP_CONFIG_MAX_CHANNEL_HANDLES 16 -#endif // CHIP_CONFIG_MAX_CHANNEL_HANDLES - #ifndef CHIP_LOG_FILTERING #define CHIP_LOG_FILTERING 0 #endif // CHIP_LOG_FILTERING diff --git a/src/platform/mbed/CHIPPlatformConfig.h b/src/platform/mbed/CHIPPlatformConfig.h index c3a76c3eff2a58..432eacee7044e6 100644 --- a/src/platform/mbed/CHIPPlatformConfig.h +++ b/src/platform/mbed/CHIPPlatformConfig.h @@ -34,11 +34,6 @@ #define CHIP_CONFIG_PERSISTED_STORAGE_ENC_MSG_CNTR_ID 1 #define CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH 2 -#define CHIP_CONFIG_TIME_ENABLE_CLIENT 1 -#define CHIP_CONFIG_TIME_ENABLE_SERVER 0 - -#define CHIP_CONFIG_ERROR_CLASS 1 - // ==================== Security Adaptations ==================== // FIXME: EFR32 set to MBED-TLS (But this is third-party repo in CHIP, not SDK) @@ -47,10 +42,6 @@ // ==================== General Configuration Overrides ==================== -#ifndef CHIP_CONFIG_MAX_PEER_NODES -#define CHIP_CONFIG_MAX_PEER_NODES 16 -#endif // CHIP_CONFIG_MAX_PEER_NODES - #ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS #define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 16 #endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS diff --git a/src/platform/nrfconnect/CHIPPlatformConfig.h b/src/platform/nrfconnect/CHIPPlatformConfig.h index d95bcb3efb353e..2c5d298c3b332f 100644 --- a/src/platform/nrfconnect/CHIPPlatformConfig.h +++ b/src/platform/nrfconnect/CHIPPlatformConfig.h @@ -33,9 +33,6 @@ #define CHIP_CONFIG_LIFETIIME_PERSISTED_COUNTER_KEY "rc" #define CHIP_CONFIG_PERSISTED_STORAGE_KEY_GLOBAL_MESSAGE_COUNTER "mc" -#define CHIP_CONFIG_TIME_ENABLE_CLIENT 1 -#define CHIP_CONFIG_TIME_ENABLE_SERVER 0 - // ==================== Security Adaptations ==================== // Size of the statically allocated context for SHA256 operations in CryptoPAL @@ -48,10 +45,6 @@ // ==================== General Configuration Overrides ==================== -#ifndef CHIP_CONFIG_MAX_PEER_NODES -#define CHIP_CONFIG_MAX_PEER_NODES 16 -#endif // CHIP_CONFIG_MAX_PEER_NODES - #ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS #define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 8 #endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS @@ -60,14 +53,6 @@ #define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 8 #endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS -#ifndef CHIP_CONFIG_MAX_ACTIVE_CHANNELS -#define CHIP_CONFIG_MAX_ACTIVE_CHANNELS 8 -#endif // CHIP_CONFIG_MAX_ACTIVE_CHANNELS - -#ifndef CHIP_CONFIG_MAX_CHANNEL_HANDLES -#define CHIP_CONFIG_MAX_CHANNEL_HANDLES 16 -#endif // CHIP_CONFIG_MAX_CHANNEL_HANDLES - #ifndef CHIP_LOG_FILTERING #define CHIP_LOG_FILTERING 0 #endif // CHIP_LOG_FILTERING diff --git a/src/platform/nxp/k32w/k32w0/CHIPPlatformConfig.h b/src/platform/nxp/k32w/k32w0/CHIPPlatformConfig.h index edaaebc6fc463f..ec5ed6ce37a0c4 100644 --- a/src/platform/nxp/k32w/k32w0/CHIPPlatformConfig.h +++ b/src/platform/nxp/k32w/k32w0/CHIPPlatformConfig.h @@ -38,11 +38,6 @@ #define CHIP_CONFIG_LIFETIIME_PERSISTED_COUNTER_KEY 0x01 #define CHIP_CONFIG_PERSISTED_STORAGE_KEY_GLOBAL_MESSAGE_COUNTER 0x2 -#define CHIP_CONFIG_TIME_ENABLE_CLIENT 1 -#define CHIP_CONFIG_TIME_ENABLE_SERVER 0 - -#define CHIP_CONFIG_ERROR_CLASS 1 - #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE (512) #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE (512) @@ -53,10 +48,6 @@ // ==================== General Configuration Overrides ==================== -#ifndef CHIP_CONFIG_MAX_PEER_NODES -#define CHIP_CONFIG_MAX_PEER_NODES 16 -#endif // CHIP_CONFIG_MAX_PEER_NODES - #ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS #define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 8 #endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS @@ -65,14 +56,6 @@ #define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 8 #endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS -#ifndef CHIP_CONFIG_MAX_ACTIVE_CHANNELS -#define CHIP_CONFIG_MAX_ACTIVE_CHANNELS 8 -#endif // CHIP_CONFIG_MAX_ACTIVE_CHANNELS - -#ifndef CHIP_CONFIG_MAX_CHANNEL_HANDLES -#define CHIP_CONFIG_MAX_CHANNEL_HANDLES 16 -#endif // CHIP_CONFIG_MAX_CHANNEL_HANDLES - #ifndef CHIP_LOG_FILTERING #define CHIP_LOG_FILTERING 0 #endif // CHIP_LOG_FILTERING diff --git a/src/platform/qpg/CHIPPlatformConfig.h b/src/platform/qpg/CHIPPlatformConfig.h index bddfcc1fe4303e..23b53aaafbcbe6 100644 --- a/src/platform/qpg/CHIPPlatformConfig.h +++ b/src/platform/qpg/CHIPPlatformConfig.h @@ -38,17 +38,10 @@ #define CHIP_CONFIG_LIFETIIME_PERSISTED_COUNTER_KEY 0x01 #define CHIP_CONFIG_PERSISTED_STORAGE_KEY_GLOBAL_MESSAGE_COUNTER 0x2 -#define CHIP_CONFIG_TIME_ENABLE_CLIENT 1 -#define CHIP_CONFIG_TIME_ENABLE_SERVER 0 - // ==================== Security Adaptations ==================== // ==================== General Configuration Overrides ==================== -#ifndef CHIP_CONFIG_MAX_PEER_NODES -#define CHIP_CONFIG_MAX_PEER_NODES 16 -#endif // CHIP_CONFIG_MAX_PEER_NODES - #ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS #define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 8 #endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS @@ -57,14 +50,6 @@ #define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 8 #endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS -#ifndef CHIP_CONFIG_MAX_ACTIVE_CHANNELS -#define CHIP_CONFIG_MAX_ACTIVE_CHANNELS 8 -#endif // CHIP_CONFIG_MAX_ACTIVE_CHANNELS - -#ifndef CHIP_CONFIG_MAX_CHANNEL_HANDLES -#define CHIP_CONFIG_MAX_CHANNEL_HANDLES 16 -#endif // CHIP_CONFIG_MAX_CHANNEL_HANDLES - #ifndef CHIP_CONFIG_WRMP_TIMER_DEFAULT_PERIOD #define CHIP_CONFIG_WRMP_TIMER_DEFAULT_PERIOD 50 #endif // CHIP_CONFIG_WRMP_TIMER_DEFAULT_PERIOD diff --git a/src/platform/telink/CHIPPlatformConfig.h b/src/platform/telink/CHIPPlatformConfig.h index 790c7d54b2a07b..85cc1c85736c75 100644 --- a/src/platform/telink/CHIPPlatformConfig.h +++ b/src/platform/telink/CHIPPlatformConfig.h @@ -30,11 +30,6 @@ #define CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE const char * #define CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH 2 -#define CHIP_CONFIG_TIME_ENABLE_CLIENT 1 -#define CHIP_CONFIG_TIME_ENABLE_SERVER 0 - -#define CHIP_CONFIG_ERROR_CLASS 1 - /** * @def CHIP_CONFIG_MAX_FABRICS * @@ -51,10 +46,6 @@ // ==================== General Configuration Overrides ==================== -#ifndef CHIP_CONFIG_MAX_PEER_NODES -#define CHIP_CONFIG_MAX_PEER_NODES 16 -#endif // CHIP_CONFIG_MAX_PEER_NODES - #ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS #define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 16 #endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS diff --git a/src/platform/webos/CHIPPlatformConfig.h b/src/platform/webos/CHIPPlatformConfig.h index 56f591e74b9a72..f69f823be2044d 100644 --- a/src/platform/webos/CHIPPlatformConfig.h +++ b/src/platform/webos/CHIPPlatformConfig.h @@ -27,17 +27,11 @@ #define CHIP_CONFIG_ABORT() abort() -// TODO:(#756) Add FabricState support -#define CHIP_CONFIG_ENABLE_FABRIC_STATE 0 - using CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE = const char *; #define CHIP_CONFIG_PERSISTED_STORAGE_MAX_KEY_LENGTH 16 #define CHIP_CONFIG_LIFETIIME_PERSISTED_COUNTER_KEY "life-count" -#define CHIP_CONFIG_TIME_ENABLE_CLIENT 1 -#define CHIP_CONFIG_TIME_ENABLE_SERVER 0 - #define CHIP_CONFIG_ERROR_FORMAT_AS_STRING 1 #define CHIP_CONFIG_ERROR_SOURCE 1 @@ -78,10 +72,6 @@ using CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE = const char *; // ==================== General Configuration Overrides ==================== -#ifndef CHIP_CONFIG_MAX_PEER_NODES -#define CHIP_CONFIG_MAX_PEER_NODES 16 -#endif // CHIP_CONFIG_MAX_PEER_NODES - #ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS #define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 8 #endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS @@ -90,14 +80,6 @@ using CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE = const char *; #define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 8 #endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS -#ifndef CHIP_CONFIG_MAX_ACTIVE_CHANNELS -#define CHIP_CONFIG_MAX_ACTIVE_CHANNELS 16 -#endif // CHIP_CONFIG_MAX_ACTIVE_CHANNELS - -#ifndef CHIP_CONFIG_MAX_CHANNEL_HANDLES -#define CHIP_CONFIG_MAX_CHANNEL_HANDLES 32 -#endif // CHIP_CONFIG_MAX_CHANNEL_HANDLES - #ifndef CHIP_LOG_FILTERING #define CHIP_LOG_FILTERING 0 #endif // CHIP_LOG_FILTERING @@ -108,18 +90,10 @@ using CHIP_CONFIG_PERSISTED_STORAGE_KEY_TYPE = const char *; // ==================== Security Configuration Overrides ==================== -#ifndef CHIP_CONFIG_MAX_APPLICATION_GROUPS -#define CHIP_CONFIG_MAX_APPLICATION_GROUPS 4 -#endif // CHIP_CONFIG_MAX_APPLICATION_GROUPS - #ifndef CHIP_CONFIG_DEBUG_CERT_VALIDATION #define CHIP_CONFIG_DEBUG_CERT_VALIDATION 0 #endif // CHIP_CONFIG_DEBUG_CERT_VALIDATION -#ifndef CHIP_CONFIG_ENABLE_CASE_RESPONDER -#define CHIP_CONFIG_ENABLE_CASE_RESPONDER 1 -#endif // CHIP_CONFIG_ENABLE_CASE_RESPONDER - #ifndef CHIP_CONFIG_KVS_PATH #define CHIP_CONFIG_KVS_PATH "/tmp/chip_kvs" #endif // CHIP_CONFIG_KVS_PATH diff --git a/src/test_driver/efr32/include/CHIPProjectConfig.h b/src/test_driver/efr32/include/CHIPProjectConfig.h index a56813240790dd..a444e6f97d967a 100644 --- a/src/test_driver/efr32/include/CHIPProjectConfig.h +++ b/src/test_driver/efr32/include/CHIPProjectConfig.h @@ -40,7 +40,6 @@ // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. // #define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 /** * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID