Skip to content

Commit

Permalink
[ota-provider-app] Set device attestation credentials provider (#10003)
Browse files Browse the repository at this point in the history
* When device attestation config is not initialized, the OTA provider app cannot be commissioned
  • Loading branch information
carol-apple authored and pull[bot] committed Nov 24, 2021
1 parent 5b3c71b commit fb937e3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/ota-provider-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include <app/clusters/ota-provider/ota-provider.h>
#include <app/server/Server.h>
#include <app/util/util.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <credentials/examples/DeviceAttestationCredsExample.h>
#include <lib/core/CHIPError.h>
#include <lib/support/CHIPArgParser.hpp>
#include <lib/support/CHIPMem.h>
Expand Down Expand Up @@ -122,6 +124,9 @@ int main(int argc, char * argv[])
chip::DeviceLayer::ConfigurationMgr().LogDeviceConfig();
chip::Server::GetInstance().Init();

// Initialize device attestation config
SetDeviceAttestationCredentialsProvider(chip::Credentials::Examples::GetExampleDACProvider());

err = chip::Server::GetInstance().GetExchangeManager().RegisterUnsolicitedMessageHandlerForProtocol(chip::Protocols::BDX::Id,
&bdxServer);
if (err != CHIP_NO_ERROR)
Expand Down

0 comments on commit fb937e3

Please sign in to comment.