28
28
#pragma once
29
29
30
30
constexpr const char kIdentityAlpha [] = " alpha" ;
31
- constexpr const char kIdentityBeta [] = " beta" ;
31
+ constexpr const char kIdentityBeta [] = " beta" ;
32
32
constexpr const char kIdentityGamma [] = " gamma" ;
33
33
34
- class CHIPCommandBridge : public Command
35
- {
34
+ class CHIPCommandBridge : public Command {
36
35
public:
37
- CHIPCommandBridge (const char * commandName) : Command (commandName) { AddArgument (" commissioner-name" , &mCommissionerName); }
36
+ CHIPCommandBridge (const char * commandName)
37
+ : Command (commandName)
38
+ {
39
+ AddArgument (" commissioner-name" , &mCommissionerName);
40
+ AddArgument (" paa-trust-store-path" , &mPaaTrustStorePath,
41
+ " Path to directory holding PAA certificate information. Can be absolute or relative to the current working "
42
+ " directory." );
43
+ }
38
44
39
45
// ///////// Command Interface /////////
40
46
CHIP_ERROR Run () override;
@@ -100,8 +106,8 @@ class CHIPCommandBridge : public Command
100
106
void RestartCommissioners ();
101
107
102
108
private:
103
- CHIP_ERROR InitializeCommissioner (std::string key, chip::FabricId fabricId,
104
- const chip::Credentials::AttestationTrustStore * trustStore);
109
+ CHIP_ERROR InitializeCommissioner (
110
+ std::string key, chip::FabricId fabricId, const chip::Credentials::AttestationTrustStore * trustStore);
105
111
void ShutdownCommissioner ();
106
112
uint16_t CurrentCommissionerIndex ();
107
113
@@ -113,6 +119,8 @@ class CHIPCommandBridge : public Command
113
119
CHIP_ERROR MaybeSetUpStack ();
114
120
void MaybeTearDownStack ();
115
121
122
+ CHIP_ERROR GetPAACertsFromFolder (NSArray <NSData *> * __autoreleasing * paaCertsResult);
123
+
116
124
// Our three controllers: alpha, beta, gamma.
117
125
static std::map<std::string, MTRDeviceController *> mControllers;
118
126
@@ -122,6 +130,7 @@ class CHIPCommandBridge : public Command
122
130
std::condition_variable cvWaitingForResponse;
123
131
std::mutex cvWaitingForResponseMutex;
124
132
chip::Optional<char *> mCommissionerName;
125
- bool mWaitingForResponse{ true };
133
+ bool mWaitingForResponse { true };
126
134
static dispatch_queue_t mOTAProviderCallbackQueue;
135
+ chip::Optional<char *> mPaaTrustStorePath;
127
136
};
0 commit comments