Skip to content

Commit

Permalink
Remove unused storage member from MTROperationalCredentialsDelegate. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Dec 6, 2023
1 parent effb7d8 commit 2643681
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/darwin/Framework/CHIP/MTRDeviceController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams
}
signingKeypair = &_signingKeypairBridge;
}
errorCode = _operationalCredentialsDelegate->Init(_factory.storageDelegateBridge, signingKeypair, startupParams.ipk,
startupParams.rootCertificate, startupParams.intermediateCertificate);
errorCode = _operationalCredentialsDelegate->Init(
signingKeypair, startupParams.ipk, startupParams.rootCertificate, startupParams.intermediateCertificate);
if ([self checkForStartError:errorCode logMsg:kErrorOperationalCredentialsInit]) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ class MTROperationalCredentialsDelegate : public chip::Controller::OperationalCr
MTROperationalCredentialsDelegate(MTRDeviceController * deviceController);
~MTROperationalCredentialsDelegate() {}

CHIP_ERROR Init(MTRPersistentStorageDelegateBridge * storage, ChipP256KeypairPtr nocSigner, NSData * ipk, NSData * rootCert,
NSData * _Nullable icaCert);
CHIP_ERROR Init(ChipP256KeypairPtr nocSigner, NSData * ipk, NSData * rootCert, NSData * _Nullable icaCert);

CHIP_ERROR GenerateNOCChain(const chip::ByteSpan & csrElements, const chip::ByteSpan & csrNonce,
const chip::ByteSpan & attestationSignature, const chip::ByteSpan & attestationChallenge, const chip::ByteSpan & DAC,
Expand Down Expand Up @@ -137,8 +136,6 @@ class MTROperationalCredentialsDelegate : public chip::Controller::OperationalCr

chip::Crypto::IdentityProtectionKey mIPK;

MTRPersistentStorageDelegateBridge * mStorage;

chip::NodeId mDeviceBeingPaired = chip::kUndefinedNodeId;

chip::NodeId mNextRequestedNodeId = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,13 @@
{
}

CHIP_ERROR MTROperationalCredentialsDelegate::Init(MTRPersistentStorageDelegateBridge * storage, ChipP256KeypairPtr nocSigner,
NSData * ipk, NSData * rootCert, NSData * _Nullable icaCert)
CHIP_ERROR MTROperationalCredentialsDelegate::Init(
ChipP256KeypairPtr nocSigner, NSData * ipk, NSData * rootCert, NSData * _Nullable icaCert)
{
if (storage == nil || ipk == nil || rootCert == nil) {
if (ipk == nil || rootCert == nil) {
return CHIP_ERROR_INVALID_ARGUMENT;
}

mStorage = storage;

mIssuerKey = nocSigner;

if ([ipk length] != mIPK.Length()) {
Expand Down

0 comments on commit 2643681

Please sign in to comment.