Skip to content

Commit 39cbb2f

Browse files
Add a lint for toplevel "using namespace" in headers.
We had all sorts of things using the wrong namespaces because everything was being imported into multiple namespaces if things happened to include certain headers. Remove the "using namespace" bits in core headers, fix the resulting compile issues, add a lint so people stop doing that.
1 parent ef01670 commit 39cbb2f

File tree

43 files changed

+131
-105
lines changed

Some content is hidden

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

43 files changed

+131
-105
lines changed

.github/workflows/lint.yml

+15
Original file line numberDiff line numberDiff line change
@@ -285,3 +285,18 @@ jobs:
285285
if: always()
286286
run: |
287287
git grep -I -n 'SuccessOrExit([^=)]*(' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
288+
289+
# git grep exits with 0 if it finds a match, but we want
290+
# to fail (exit nonzero) on match.
291+
- name: Check for use of "using namespace" outside of a class/function in headers.
292+
if: always()
293+
run: |
294+
# Various platforms have `using namespace chip::Ble` in their BLEManager* headers; just exclude those for now.
295+
#
296+
# Exclude platform openiotsdk bits that do this in their persistent storage header.
297+
#
298+
# Also exclude examples (for now) and third_party, which have various instances of this.
299+
#
300+
# Ignore uses of `System::Clock::Literals`, because that's the only way to have things using _ms32 or whatnot
301+
# in a header file.
302+
git grep -I -n -e '^using namespace' --and --not -e 'System::Clock::Literals' -- './**/*.h' ':(exclude)src/platform/*/BLEManager*.h' ':(exclude)src/platform/openiotsdk/KVPsaPsStore.h' ':(exclude)./examples' ':(exclude)./third_party' && exit 1 || exit 0

examples/chip-tool/commands/pairing/IssueNOCChainCommand.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class IssueNOCChainCommand : public CHIPCommand
4646

4747
static void OnDeviceNOCChainGeneration(void * context, CHIP_ERROR status, const chip::ByteSpan & noc,
4848
const chip::ByteSpan & icac, const chip::ByteSpan & rcac,
49-
chip::Optional<chip::IdentityProtectionKeySpan> ipk,
49+
chip::Optional<chip::Crypto::IdentityProtectionKeySpan> ipk,
5050
chip::Optional<chip::NodeId> adminSubject)
5151
{
5252
auto command = static_cast<IssueNOCChainCommand *>(context);

examples/chip-tool/commands/pairing/OpenCommissioningWindowCommand.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ class OpenCommissioningWindowCommand : public CHIPCommand
3636
"1 to use Enhanced Commissioning Method.\n 0 to use Basic Commissioning Method.");
3737
AddArgument("window-timeout", 0, UINT16_MAX, &mCommissioningWindowTimeout,
3838
"Time, in seconds, before the commissioning window closes.");
39-
AddArgument("iteration", chip::kSpake2p_Min_PBKDF_Iterations, chip::kSpake2p_Max_PBKDF_Iterations, &mIteration,
40-
"Number of PBKDF iterations to use to derive the verifier. Ignored if 'option' is 0.");
39+
AddArgument("iteration", chip::Crypto::kSpake2p_Min_PBKDF_Iterations, chip::Crypto::kSpake2p_Max_PBKDF_Iterations,
40+
&mIteration, "Number of PBKDF iterations to use to derive the verifier. Ignored if 'option' is 0.");
4141
AddArgument("discriminator", 0, 4096, &mDiscriminator, "Discriminator to use for advertising. Ignored if 'option' is 0.");
4242
AddArgument("timeout", 0, UINT16_MAX, &mTimeout, "Time, in seconds, before this command is considered to have timed out.");
4343
}

examples/common/pigweed/rpc_services/Device.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "platform/ConfigurationManager.h"
3232
#include "platform/DiagnosticDataProvider.h"
3333
#include "platform/PlatformManager.h"
34+
#include <crypto/CHIPCryptoPAL.h>
3435
#include <platform/DeviceInstanceInfoProvider.h>
3536
#include <setup_payload/QRCodeSetupPayloadGenerator.h>
3637

@@ -188,9 +189,9 @@ class CommissionableDataProviderRpcWrapper : public DeviceLayer::CommissionableD
188189
private:
189190
std::optional<uint16_t> mDiscriminatorOverride;
190191
std::optional<uint32_t> mPasscodeOverride;
191-
Spake2pVerifierSerialized mVerifierBuf;
192+
Crypto::Spake2pVerifierSerialized mVerifierBuf;
192193
std::optional<ByteSpan> mVerifierOverride;
193-
uint8_t mSaltBuf[kSpake2p_Max_PBKDF_Salt_Length];
194+
uint8_t mSaltBuf[Crypto::kSpake2p_Max_PBKDF_Salt_Length];
194195
std::optional<ByteSpan> mSaltOverride;
195196
std::optional<uint32_t> mIterationCountOverride;
196197
DeviceLayer::CommissionableDataProvider * mCommissionableDataProvider = nullptr;

examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ using namespace chip::app;
2626
using namespace chip::app::DataModel;
2727
using namespace chip::app::Clusters;
2828
using namespace chip::app::Clusters::ElectricalPowerMeasurement;
29+
using namespace chip::app::Clusters::ElectricalPowerMeasurement::Attributes;
30+
using namespace chip::app::Clusters::ElectricalPowerMeasurement::Structs;
2931

3032
CHIP_ERROR ElectricalPowerMeasurementInstance::Init()
3133
{

examples/platform/linux/CommissionerMain.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ using namespace chip::DeviceLayer;
7171
using namespace chip::Inet;
7272
using namespace chip::Transport;
7373
using namespace chip::app::Clusters;
74+
using namespace chip::Protocols::UserDirectedCommissioning;
7475

7576
using namespace ::chip::Messaging;
7677
using namespace ::chip::Controller;

examples/tv-app/android/java/TVApp-JNI.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ using namespace chip::app;
4949
using namespace chip::app::Clusters;
5050
using namespace chip::AppPlatform;
5151
using namespace chip::Credentials;
52+
using namespace chip::Protocols::UserDirectedCommissioning;
5253

5354
#define JNI_METHOD(RETURN, METHOD_NAME) extern "C" JNIEXPORT RETURN JNICALL Java_com_matter_tv_server_tvapp_TvApp_##METHOD_NAME
5455

examples/tv-app/tv-common/src/AppTv.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ extern CommissionerDiscoveryController * GetCommissionerDiscoveryController();
5252
using namespace chip;
5353
using namespace chip::AppPlatform;
5454
using namespace chip::app::Clusters;
55+
using namespace chip::Protocols::UserDirectedCommissioning;
5556

5657
#if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE
5758
class MyUserPrompter : public UserPrompter

src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ using namespace chip::app;
4242
using namespace chip::app::Clusters;
4343
using namespace chip::app::Clusters::AdministratorCommissioning;
4444
using namespace chip::Protocols;
45+
using namespace chip::Crypto;
4546
using chip::Protocols::InteractionModel::Status;
4647

4748
class AdministratorCommissioningAttrAccess : public AttributeAccessInterface

src/app/clusters/device-energy-management-server/device-energy-management-server.h

+15-17
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ namespace app {
3434
namespace Clusters {
3535
namespace DeviceEnergyManagement {
3636

37-
using namespace chip::app::Clusters::DeviceEnergyManagement::Attributes;
38-
3937
class Delegate
4038
{
4139
public:
@@ -160,24 +158,24 @@ class Delegate
160158

161159
// ------------------------------------------------------------------
162160
// Get attribute methods
163-
virtual ESATypeEnum GetESAType() = 0;
164-
virtual bool GetESACanGenerate() = 0;
165-
virtual ESAStateEnum GetESAState() = 0;
166-
virtual int64_t GetAbsMinPower() = 0;
167-
virtual int64_t GetAbsMaxPower() = 0;
168-
virtual PowerAdjustmentCapability::TypeInfo::Type GetPowerAdjustmentCapability() = 0;
169-
virtual DataModel::Nullable<Structs::ForecastStruct::Type> GetForecast() = 0;
170-
virtual OptOutStateEnum GetOptOutState() = 0;
161+
virtual ESATypeEnum GetESAType() = 0;
162+
virtual bool GetESACanGenerate() = 0;
163+
virtual ESAStateEnum GetESAState() = 0;
164+
virtual int64_t GetAbsMinPower() = 0;
165+
virtual int64_t GetAbsMaxPower() = 0;
166+
virtual Attributes::PowerAdjustmentCapability::TypeInfo::Type GetPowerAdjustmentCapability() = 0;
167+
virtual DataModel::Nullable<Structs::ForecastStruct::Type> GetForecast() = 0;
168+
virtual OptOutStateEnum GetOptOutState() = 0;
171169

172170
// ------------------------------------------------------------------
173171
// Set attribute methods
174-
virtual CHIP_ERROR SetESAType(ESATypeEnum) = 0;
175-
virtual CHIP_ERROR SetESACanGenerate(bool) = 0;
176-
virtual CHIP_ERROR SetESAState(ESAStateEnum) = 0;
177-
virtual CHIP_ERROR SetAbsMinPower(int64_t) = 0;
178-
virtual CHIP_ERROR SetAbsMaxPower(int64_t) = 0;
179-
virtual CHIP_ERROR SetPowerAdjustmentCapability(PowerAdjustmentCapability::TypeInfo::Type) = 0;
180-
virtual CHIP_ERROR SetForecast(DataModel::Nullable<Structs::ForecastStruct::Type>) = 0;
172+
virtual CHIP_ERROR SetESAType(ESATypeEnum) = 0;
173+
virtual CHIP_ERROR SetESACanGenerate(bool) = 0;
174+
virtual CHIP_ERROR SetESAState(ESAStateEnum) = 0;
175+
virtual CHIP_ERROR SetAbsMinPower(int64_t) = 0;
176+
virtual CHIP_ERROR SetAbsMaxPower(int64_t) = 0;
177+
virtual CHIP_ERROR SetPowerAdjustmentCapability(Attributes::PowerAdjustmentCapability::TypeInfo::Type) = 0;
178+
virtual CHIP_ERROR SetForecast(DataModel::Nullable<Structs::ForecastStruct::Type>) = 0;
181179

182180
protected:
183181
EndpointId mEndpointId = 0;

src/app/clusters/electrical-power-measurement-server/electrical-power-measurement-server.h

-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ namespace app {
2929
namespace Clusters {
3030
namespace ElectricalPowerMeasurement {
3131

32-
using namespace chip::app::Clusters::ElectricalPowerMeasurement::Attributes;
33-
using namespace chip::app::Clusters::ElectricalPowerMeasurement::Structs;
34-
3532
class Delegate
3633
{
3734
public:

src/app/clusters/operational-credentials-server/operational-credentials-server.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ using namespace chip::app;
5555
using namespace chip::app::Clusters;
5656
using namespace chip::app::Clusters::OperationalCredentials;
5757
using namespace chip::Credentials;
58+
using namespace chip::Crypto;
5859
using namespace chip::Protocols::InteractionModel;
5960

6061
namespace {

src/app/icd/client/CheckInHandler.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737

3838
#include <protocols/secure_channel/Constants.h>
3939

40+
using namespace chip::Protocols::SecureChannel;
41+
4042
namespace chip {
4143
namespace app {
4244

src/app/icd/client/DefaultCheckInDelegate.h

-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
namespace chip {
2525
namespace app {
2626

27-
using namespace std;
28-
2927
class InteractionModelEngine;
3028

3129
/// Callbacks for check in protocol

src/app/icd/client/DefaultICDClientStorage.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ CHIP_ERROR DefaultICDClientStorage::DeleteAllEntries(FabricIndex fabricIndex)
463463
}
464464

465465
CHIP_ERROR DefaultICDClientStorage::ProcessCheckInPayload(const ByteSpan & payload, ICDClientInfo & clientInfo,
466-
CounterType & counter)
466+
Protocols::SecureChannel::CounterType & counter)
467467
{
468468
uint8_t appDataBuffer[kAppDataLength];
469469
MutableByteSpan appData(appDataBuffer);

src/app/icd/client/DefaultICDClientStorage.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ class DefaultICDClientStorage : public ICDClientStorage
117117
*/
118118
CHIP_ERROR DeleteAllEntries(FabricIndex fabricIndex);
119119

120-
CHIP_ERROR ProcessCheckInPayload(const ByteSpan & payload, ICDClientInfo & clientInfo, CounterType & counter) override;
120+
CHIP_ERROR ProcessCheckInPayload(const ByteSpan & payload, ICDClientInfo & clientInfo,
121+
Protocols::SecureChannel::CounterType & counter) override;
121122

122123
protected:
123124
enum class ClientInfoTag : uint8_t

src/app/icd/client/ICDClientStorage.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
namespace chip {
3232
namespace app {
3333

34-
using namespace Protocols::SecureChannel;
3534
/**
3635
* The ICDClientStorage class is an abstract interface that defines the operations
3736
* for storing, retrieving and deleting ICD client information in persistent storage.
@@ -81,7 +80,8 @@ class ICDClientStorage
8180
* @param[out] clientInfo retrieved matched clientInfo from storage
8281
* @param[out] counter counter value received in the check-in message
8382
*/
84-
virtual CHIP_ERROR ProcessCheckInPayload(const ByteSpan & payload, ICDClientInfo & clientInfo, CounterType & counter) = 0;
83+
virtual CHIP_ERROR ProcessCheckInPayload(const ByteSpan & payload, ICDClientInfo & clientInfo,
84+
Protocols::SecureChannel::CounterType & counter) = 0;
8585

8686
// 4 bytes for counter + 2 bytes for ActiveModeThreshold
8787
static inline constexpr uint8_t kAppDataLength = 6;

src/app/server/CommissioningWindowManager.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
using namespace chip::app::Clusters;
3333
using namespace chip::System::Clock;
34+
using namespace chip::Crypto;
3435

3536
using AdministratorCommissioning::CommissioningWindowStatusEnum;
3637
using chip::app::DataModel::MakeNullable;

src/app/server/CommissioningWindowManager.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <app/data-model/Nullable.h>
2121
#include <app/server/AppDelegate.h>
2222
#include <app/server/CommissioningModeProvider.h>
23+
#include <crypto/CHIPCryptoPAL.h>
2324
#include <lib/core/CHIPVendorIdentifiers.hpp>
2425
#include <lib/core/ClusterEnums.h>
2526
#include <lib/core/DataModelTypes.h>
@@ -93,7 +94,7 @@ class CommissioningWindowManager : public Messaging::UnsolicitedMessageHandler,
9394
FabricIndex fabricIndex, VendorId vendorId);
9495

9596
CHIP_ERROR OpenEnhancedCommissioningWindow(System::Clock::Seconds16 commissioningTimeout, uint16_t discriminator,
96-
Spake2pVerifier & verifier, uint32_t iterations, chip::ByteSpan salt,
97+
Crypto::Spake2pVerifier & verifier, uint32_t iterations, chip::ByteSpan salt,
9798
FabricIndex fabricIndex, VendorId vendorId);
9899

99100
void CloseCommissioningWindow();
@@ -204,7 +205,7 @@ class CommissioningWindowManager : public Messaging::UnsolicitedMessageHandler,
204205
uint8_t mFailedCommissioningAttempts = 0;
205206

206207
bool mUseECM = false;
207-
Spake2pVerifier mECMPASEVerifier;
208+
Crypto::Spake2pVerifier mECMPASEVerifier;
208209
uint16_t mECMDiscriminator = 0;
209210
// mListeningForPASE is true only when we are listening for
210211
// PBKDFParamRequest messages or when we're in the middle of a PASE
@@ -214,7 +215,7 @@ class CommissioningWindowManager : public Messaging::UnsolicitedMessageHandler,
214215
bool mCommissioningTimeoutTimerArmed = false;
215216
uint32_t mECMIterations = 0;
216217
uint32_t mECMSaltLength = 0;
217-
uint8_t mECMSalt[kSpake2p_Max_PBKDF_Salt_Length];
218+
uint8_t mECMSalt[Crypto::kSpake2p_Max_PBKDF_Salt_Length];
218219

219220
// For tests only, so that we can test the commissioning window timeout
220221
// without having to wait 3 minutes.

src/app/tests/TestCommissionManager.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232

3333
#include <nlunit-test.h>
3434

35+
using namespace chip::Crypto;
36+
3537
using chip::CommissioningWindowAdvertisement;
3638
using chip::CommissioningWindowManager;
3739
using chip::Server;
@@ -328,9 +330,9 @@ void CheckCommissioningWindowManagerEnhancedWindowTask(intptr_t context)
328330
CHIP_ERROR err = chip::DeviceLayer::GetCommissionableDataProvider()->GetSetupDiscriminator(originDiscriminator);
329331
NL_TEST_ASSERT(suite, err == CHIP_NO_ERROR);
330332
uint16_t newDiscriminator = static_cast<uint16_t>(originDiscriminator + 1);
331-
chip::Spake2pVerifier verifier;
332-
constexpr uint32_t kIterations = chip::kSpake2p_Min_PBKDF_Iterations;
333-
uint8_t salt[chip::kSpake2p_Min_PBKDF_Salt_Length];
333+
Spake2pVerifier verifier;
334+
constexpr uint32_t kIterations = kSpake2p_Min_PBKDF_Iterations;
335+
uint8_t salt[kSpake2p_Min_PBKDF_Salt_Length];
334336
chip::ByteSpan saltData(salt);
335337

336338
NL_TEST_ASSERT(suite, !sWindowStatusDirty);

src/controller/AutoCommissioner.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ namespace chip {
2929
namespace Controller {
3030

3131
using namespace chip::app::Clusters;
32+
using namespace chip::Crypto;
3233
using chip::app::DataModel::MakeNullable;
3334
using chip::app::DataModel::NullNullable;
3435

src/controller/AutoCommissioner.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <controller/CommissioneeDeviceProxy.h>
2020
#include <controller/CommissioningDelegate.h>
2121
#include <credentials/DeviceAttestationConstructor.h>
22+
#include <crypto/CHIPCryptoPAL.h>
2223
#include <protocols/secure_channel/RendezvousParameters.h>
2324

2425
namespace chip {
@@ -70,7 +71,8 @@ class AutoCommissioner : public CommissioningDelegate
7071
ByteSpan GetDAC() const { return ByteSpan(mDAC, mDACLen); }
7172
ByteSpan GetPAI() const { return ByteSpan(mPAI, mPAILen); }
7273

73-
CHIP_ERROR NOCChainGenerated(ByteSpan noc, ByteSpan icac, ByteSpan rcac, IdentityProtectionKeySpan ipk, NodeId adminSubject);
74+
CHIP_ERROR NOCChainGenerated(ByteSpan noc, ByteSpan icac, ByteSpan rcac, Crypto::IdentityProtectionKeySpan ipk,
75+
NodeId adminSubject);
7476
EndpointId GetEndpoint(const CommissioningStage & stage) const;
7577
CommissioningStage GetNextCommissioningStageInternal(CommissioningStage currentStage, CHIP_ERROR & lastErr);
7678

src/controller/CHIPDeviceController.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ using namespace chip::System;
7777
using namespace chip::Transport;
7878
using namespace chip::Credentials;
7979
using namespace chip::app::Clusters;
80+
using namespace chip::Crypto;
8081

8182
namespace chip {
8283
namespace Controller {

src/controller/CHIPDeviceController.h

+9-7
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#include <credentials/FabricTable.h>
4747
#include <credentials/attestation_verifier/DeviceAttestationDelegate.h>
4848
#include <credentials/attestation_verifier/DeviceAttestationVerifier.h>
49+
#include <crypto/CHIPCryptoPAL.h>
4950
#include <inet/InetInterface.h>
5051
#include <lib/core/CHIPConfig.h>
5152
#include <lib/core/CHIPCore.h>
@@ -79,8 +80,6 @@ namespace chip {
7980

8081
namespace Controller {
8182

82-
using namespace chip::Protocols::UserDirectedCommissioning;
83-
8483
inline constexpr uint16_t kNumMaxActiveDevices = CHIP_CONFIG_CONTROLLER_MAX_ACTIVE_DEVICES;
8584

8685
struct ControllerInitParams
@@ -272,7 +271,7 @@ class DLL_EXPORT DeviceController : public AbstractDnssdDiscoveryController
272271
* @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error
273272
*/
274273
CHIP_ERROR ComputePASEVerifier(uint32_t iterations, uint32_t setupPincode, const ByteSpan & salt,
275-
Spake2pVerifier & outVerifier);
274+
Crypto::Spake2pVerifier & outVerifier);
276275

277276
void RegisterDeviceDiscoveryDelegate(DeviceDiscoveryDelegate * delegate) { mDeviceDiscoveryDelegate = delegate; }
278277

@@ -720,7 +719,10 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController,
720719
* Return the UDC Server instance
721720
*
722721
*/
723-
UserDirectedCommissioningServer * GetUserDirectedCommissioningServer() { return mUdcServer; }
722+
Protocols::UserDirectedCommissioning::UserDirectedCommissioningServer * GetUserDirectedCommissioningServer()
723+
{
724+
return mUdcServer;
725+
}
724726
#endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY
725727

726728
/**
@@ -785,7 +787,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController,
785787
ObjectPool<CommissioneeDeviceProxy, kNumMaxActiveDevices> mCommissioneeDevicePool;
786788

787789
#if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY // make this commissioner discoverable
788-
UserDirectedCommissioningServer * mUdcServer = nullptr;
790+
Protocols::UserDirectedCommissioning::UserDirectedCommissioningServer * mUdcServer = nullptr;
789791
// mUdcTransportMgr is for insecure communication (ex. user directed commissioning)
790792
UdcTransportMgr * mUdcTransportMgr = nullptr;
791793
uint16_t mUdcListenPort = CHIP_UDC_PORT;
@@ -821,7 +823,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController,
821823
The function does not hold a reference to the device object.
822824
*/
823825
CHIP_ERROR SendOperationalCertificate(DeviceProxy * device, const ByteSpan & nocCertBuf, const Optional<ByteSpan> & icaCertBuf,
824-
IdentityProtectionKeySpan ipk, NodeId adminSubject,
826+
Crypto::IdentityProtectionKeySpan ipk, NodeId adminSubject,
825827
Optional<System::Clock::Timeout> timeout);
826828
/* This function sends the trusted root certificate to the device.
827829
The function does not hold a reference to the device object.
@@ -886,7 +888,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController,
886888
Credentials::AttestationVerificationResult result);
887889

888890
static void OnDeviceNOCChainGeneration(void * context, CHIP_ERROR status, const ByteSpan & noc, const ByteSpan & icac,
889-
const ByteSpan & rcac, Optional<IdentityProtectionKeySpan> ipk,
891+
const ByteSpan & rcac, Optional<Crypto::IdentityProtectionKeySpan> ipk,
890892
Optional<NodeId> adminSubject);
891893
static void OnArmFailSafe(void * context,
892894
const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & data);

0 commit comments

Comments
 (0)