@@ -48,7 +48,8 @@ enum class PairingNetworkType
48
48
49
49
class PairingCommand : public CHIPCommand ,
50
50
public chip::Controller::DevicePairingDelegate,
51
- public chip::Controller::DeviceDiscoveryDelegate
51
+ public chip::Controller::DeviceDiscoveryDelegate,
52
+ public chip::Credentials::DeviceAttestationDelegate
52
53
{
53
54
public:
54
55
PairingCommand (const char * commandName, PairingMode mode, PairingNetworkType networkType,
@@ -60,6 +61,9 @@ class PairingCommand : public CHIPCommand,
60
61
mCurrentFabricRemoveCallback (OnCurrentFabricRemove, this )
61
62
{
62
63
AddArgument (" node-id" , 0 , UINT64_MAX, &mNodeId );
64
+ AddArgument (" bypass-attestation-verifier" , 0 , 1 , &mBypassAttestationVerifier ,
65
+ " Bypass the attestation verifier. If not provided or false, the attestation verifier is not bypassed."
66
+ " If true, the commissioning will continue in case of attestation verification failure." );
63
67
64
68
switch (networkType)
65
69
{
@@ -158,6 +162,12 @@ class PairingCommand : public CHIPCommand,
158
162
void OnDiscoveredDevice (const chip::Dnssd::DiscoveredNodeData & nodeData) override ;
159
163
bool IsDiscoverOnce () { return mDiscoverOnce .ValueOr (false ); }
160
164
165
+ // ///////// DeviceAttestationDelegate /////////
166
+ chip::Optional<uint16_t > FailSafeExpiryTimeoutSecs () const override ;
167
+ void OnDeviceAttestationCompleted (chip::Controller::DeviceCommissioner * deviceCommissioner, chip::DeviceProxy * device,
168
+ const chip::Credentials::DeviceAttestationVerifier::AttestationDeviceInfo & info,
169
+ chip::Credentials::AttestationVerificationResult attestationResult) override ;
170
+
161
171
private:
162
172
CHIP_ERROR RunInternal (NodeId remoteId);
163
173
CHIP_ERROR Pair (NodeId remoteId, PeerAddress address);
@@ -177,6 +187,7 @@ class PairingCommand : public CHIPCommand,
177
187
chip::Optional<bool > mUseOnlyOnNetworkDiscovery ;
178
188
chip::Optional<bool > mPaseOnly ;
179
189
chip::Optional<bool > mSkipCommissioningComplete ;
190
+ chip::Optional<bool > mBypassAttestationVerifier ;
180
191
uint16_t mRemotePort ;
181
192
uint16_t mDiscriminator ;
182
193
uint32_t mSetupPINCode ;
0 commit comments