diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 59a4c338fc4af6..8b34769b09ecea 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -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; } diff --git a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h index b3dfd2419186f4..63499f024bb277 100644 --- a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h +++ b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h @@ -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, @@ -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; diff --git a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm index 887fd20dba9e1f..7e5282eca51a52 100644 --- a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm +++ b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm @@ -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()) {