Skip to content

Commit

Permalink
Remove TestIdentity (#11482)
Browse files Browse the repository at this point in the history
  • Loading branch information
kghost authored and pull[bot] committed Jan 26, 2022
1 parent 77eb8cc commit 1353984
Show file tree
Hide file tree
Showing 27 changed files with 0 additions and 263 deletions.
11 changes: 0 additions & 11 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -717,17 +717,6 @@ menu "CHIP Device Layer"

menu "Testing Options"

config ENABLE_TEST_DEVICE_IDENTITY
int "Use Test Device Identity"
range 0 256
default 1
help
Enables the use of a hard-coded CHIP device id and credentials if no device id is
found in CHIP NV storage. The value specifies which of 256 identities, numbered 1
through 256, is to be used. A value of 0 disables use of a test identity.

This option is for testing only and should not be enabled in production releases.

config USE_TEST_SERIAL_NUMBER
string "Use Test Serial Number"
default "TEST_SN"
Expand Down
2 changes: 0 additions & 2 deletions config/python/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@

#define CHIP_CONFIG_DATA_MANAGEMENT_CLIENT_EXPERIMENTAL 1

#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 1

/* TODO: Ideally, these #defines should be enabled by default for Linux
AND the python tool would provide runtime options to enable/disable them */
#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY 1
Expand Down
2 changes: 0 additions & 2 deletions config/standalone/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,4 @@

#define CHIP_CONFIG_DATA_MANAGEMENT_CLIENT_EXPERIMENTAL 1

#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 1

#endif /* CHIPPROJECTCONFIG_H */
10 changes: 0 additions & 10 deletions examples/all-clusters-app/p6/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@

#pragma once

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default Chip device id and credentials if no device id
* is found in Chip NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34

// Use a default pairing code if one hasn't been provisioned in flash.
#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
Expand Down
10 changes: 0 additions & 10 deletions examples/lighting-app/efr32/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@

#pragma once

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default Chip device id and credentials if no device id
* is found in Chip NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34

// Use a default pairing code if one hasn't been provisioned in flash.
#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
Expand Down
10 changes: 0 additions & 10 deletions examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
#define CHIP_CONFIG_REQUIRE_AUTH 0

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default CHIP device id and credentials if no device id
* is found in CHIP NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
//#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34

// Use a default setup PIN code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
Expand Down
10 changes: 0 additions & 10 deletions examples/lock-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,6 @@
#define CHIP_CONFIG_SECURITY_TEST_MODE 1
#define CHIP_CONFIG_REQUIRE_AUTH 0

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default CHIP device id and credentials if no device id
* is found in CHIP NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34

// Use a default pairing code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
Expand Down
10 changes: 0 additions & 10 deletions examples/lock-app/efr32/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@

#pragma once

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default Chip device id and credentials if no device id
* is found in Chip NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34

// Use a default pairing code if one hasn't been provisioned in flash.
#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
Expand Down
10 changes: 0 additions & 10 deletions examples/lock-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
#define CHIP_CONFIG_REQUIRE_AUTH 0

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default CHIP device id and credentials if no device id
* is found in CHIP NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
//#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34

// Use a default setup PIN code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
Expand Down
10 changes: 0 additions & 10 deletions examples/lock-app/p6/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@

#pragma once

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default Chip device id and credentials if no device id
* is found in Chip NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34

// Use a default pairing code if one hasn't been provisioned in flash.
#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,6 @@
#define CHIP_CONFIG_SECURITY_TEST_MODE 1
#define CHIP_CONFIG_REQUIRE_AUTH 0

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default CHIP device id and credentials if no device id
* is found in CHIP NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34

// Use a default pairing code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
Expand Down
10 changes: 0 additions & 10 deletions examples/persistent-storage/efr32/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@

#pragma once

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default Chip device id and credentials if no device id
* is found in Chip NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34

// Use a default pairing code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
Expand Down
10 changes: 0 additions & 10 deletions examples/pigweed-app/efr32/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@

#pragma once

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default Chip device id and credentials if no device id
* is found in Chip NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34

// Use a default pairing code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
Expand Down
10 changes: 0 additions & 10 deletions examples/platform/qpg/project_include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@

#pragma once

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default Chip device id and credentials if no device id
* is found in Chip NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34

// Use a default setup PIN code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
Expand Down
10 changes: 0 additions & 10 deletions examples/pump-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@

#else // development build

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default CHIP device id and credentials if no device id
* is found in CHIP NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34

// Use a default pairing code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@

#else // development build

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default CHIP device id and credentials if no device id
* is found in CHIP NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34

// Use a default pairing code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
Expand Down
10 changes: 0 additions & 10 deletions examples/shell/efr32/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@

#pragma once

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default Chip device id and credentials if no device id
* is found in Chip NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34

// Use a default pairing code if one hasn't been provisioned in flash.
#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
Expand Down
10 changes: 0 additions & 10 deletions examples/shell/mbed/main/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,3 @@
// Use a default pairing code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default Chip device id and credentials if no device id
* is found in Chip NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34
10 changes: 0 additions & 10 deletions examples/shell/nxp/k32w/k32w0/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@
#define CHIP_CONFIG_SECURITY_TEST_MODE 0
#define CHIP_CONFIG_REQUIRE_AUTH 0

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default CHIP device id and credentials if no device id
* is found in CHIP NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
//#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34

// Use a default setup PIN code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
Expand Down
10 changes: 0 additions & 10 deletions examples/window-app/efr32/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@

#pragma once

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default Chip device id and credentials if no device id
* is found in Chip NV storage.
*
* This option is for testing only and should be disabled in production releases.
*/
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34

// Use a default pairing code if one hasn't been provisioned in flash.
#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 12345678
Expand Down
15 changes: 0 additions & 15 deletions src/include/platform/CHIPDeviceConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -759,21 +759,6 @@
#define CHIP_DEVICE_CONFIG_ENABLE_TRAIT_MANAGER 0
#endif

// -------------------- Test Configuration --------------------

/**
* CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
*
* Enables the use of a hard-coded default chip device id and credentials if no device id
* is found in chip NV storage. The value specifies which of 10 identities, numbered 1 through 10,
* is to be used. A value of 0 disables use of a default identity.
*
* This option is for testing only and should be disabled in production releases.
*/
#ifndef CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 0
#endif

// -------------------- Network Telemetry Configuration --------------------

/**
Expand Down
11 changes: 0 additions & 11 deletions src/include/platform/internal/CHIPDeviceLayerInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,6 @@ namespace Internal {

extern const char * const TAG;

#if CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
extern const uint64_t TestDeviceId;
extern const uint64_t TestFabricId;
extern const uint8_t TestDeviceCert[];
extern const uint8_t TestDeviceIntermediateCACert[];
extern const uint8_t TestDevicePrivateKey[];
extern const uint16_t TestDeviceCertLength;
extern const uint16_t TestDeviceIntermediateCACertLength;
extern const uint16_t TestDevicePrivateKeyLength;
#endif // CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY

} // namespace Internal
} // namespace DeviceLayer
} // namespace chip
1 change: 0 additions & 1 deletion src/platform/Ameba/CHIPDevicePlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,4 @@
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00

#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34
#define CONFIG_RENDEZVOUS_MODE 6
1 change: 0 additions & 1 deletion src/platform/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ if (chip_device_platform != "none") {
"LockTracker.cpp",
"PersistedStorage.cpp",
"PlatformEventSupport.cpp",
"TestIdentity.cpp",
]

cflags = [ "-Wconversion" ]
Expand Down
1 change: 0 additions & 1 deletion src/platform/ESP32/CHIPDevicePlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
#define CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_ENDPOINT_ID CONFIG_SERVICE_PROVISIONING_ENDPOINT_ID
#define CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_CONNECTIVITY_TIMEOUT CONFIG_SERVICE_PROVISIONING_CONNECTIVITY_TIMEOUT
#define CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_REQUEST_TIMEOUT CONFIG_SERVICE_PROVISIONING_REQUEST_TIMEOUT
#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY CONFIG_ENABLE_TEST_DEVICE_IDENTITY
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE CONFIG_USE_TEST_SETUP_PIN_CODE
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR CONFIG_USE_TEST_SETUP_DISCRIMINATOR
#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER CONFIG_USE_TEST_SERIAL_NUMBER
Expand Down
Loading

0 comments on commit 1353984

Please sign in to comment.