Skip to content

Commit 9095405

Browse files
authored
ESP32: enable GetRotatingDeviceIdUniqueId() only when device instance info provider is enabled (#40399) (#40448)
Guard the GetRotatingDeviceIdUniqueId() API behind the device instance info provider config. Without this, referencing the API without enabling the config may lead to compilation failures.
1 parent 1b2b3fd commit 9095405

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/platform/ESP32/ESP32SecureCertDataProvider.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ CHIP_ERROR ESP32SecureCertDataProvider::GetSpake2pVerifier(MutableByteSpan & ver
131131
return CHIP_NO_ERROR;
132132
}
133133

134+
#if CHIP_DEVICE_CONFIG_ENABLE_DEVICE_INSTANCE_INFO_PROVIDER
134135
CHIP_ERROR ESP32SecureCertDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan)
135136
{
136137
#if CHIP_ENABLE_ROTATING_DEVICE_ID
@@ -140,6 +141,7 @@ CHIP_ERROR ESP32SecureCertDataProvider::GetRotatingDeviceIdUniqueId(MutableByteS
140141
return CHIP_ERROR_NOT_IMPLEMENTED;
141142
#endif // CHIP_ENABLE_ROTATING_DEVICE_ID
142143
}
144+
#endif // CHIP_DEVICE_CONFIG_ENABLE_DEVICE_INSTANCE_INFO_PROVIDER
143145

144146
} // namespace DeviceLayer
145147
} // namespace chip

src/platform/ESP32/ESP32SecureCertDataProvider.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ class ESP32SecureCertDataProvider : public ESP32FactoryDataProvider
4343
CHIP_ERROR GetSpake2pSalt(MutableByteSpan & saltBuf) override;
4444
CHIP_ERROR GetSpake2pVerifier(MutableByteSpan & verifierBuf, size_t & verifierLen) override;
4545

46+
#if CHIP_DEVICE_CONFIG_ENABLE_DEVICE_INSTANCE_INFO_PROVIDER
4647
// GetRotatingDeviceIdUniqueId from GenericDeviceInstanceInfoProvider
4748
CHIP_ERROR GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) override;
49+
#endif // CHIP_DEVICE_CONFIG_ENABLE_DEVICE_INSTANCE_INFO_PROVIDER
4850
};
4951

5052
} // namespace DeviceLayer

0 commit comments

Comments
 (0)