Skip to content

Commit

Permalink
Updating OpCredsBinding C++ module:
Browse files Browse the repository at this point in the history
- Removed rcacByteSpan var as not needed in order to convert data before passing data to python3
  • Loading branch information
j-ororke committed Dec 6, 2024
1 parent e3bf1ba commit 9556f5e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/controller/python/OpCredsBinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,11 @@ class TestCommissioner : public chip::Controller::AutoCommissioner
{

auto nocChain = report.Get<chip::Controller::NocChain>().rcac;
MutableByteSpan rcacSpan(const_cast<uint8_t *>(nocChain.data()), nocChain.size());
chip::ByteSpan rcacByteSpan(rcacSpan.data(), rcacSpan.size());

// Convert RCAC to CHIP cert format to be deciphered by TLV later in python3
std::vector<uint8_t> chipRcac(Credentials::kMaxCHIPCertLength);
MutableByteSpan chipRcacSpan(chipRcac.data(), chipRcac.size());
chip::Credentials::ConvertX509CertToChipCert(rcacByteSpan, chipRcacSpan);
chip::Credentials::ConvertX509CertToChipCert(nocChain, chipRcacSpan);

mCHIPRCACData.assign(chipRcacSpan.data(), chipRcacSpan.data() + chipRcacSpan.size());

Expand Down

0 comments on commit 9556f5e

Please sign in to comment.