@@ -324,8 +324,9 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams
324
324
325
325
// Initialize device attestation verifier
326
326
const Credentials::AttestationTrustStore * trustStore;
327
- if (startupParams.paaCerts ) {
328
- _attestationTrustStoreBridge = new MTRAttestationTrustStoreBridge (startupParams.paaCerts );
327
+ if (startupParams.productAttestationAuthorityCertificates ) {
328
+ _attestationTrustStoreBridge
329
+ = new MTRAttestationTrustStoreBridge (startupParams.productAttestationAuthorityCertificates );
329
330
if (_attestationTrustStoreBridge == nullptr ) {
330
331
MTR_LOG_ERROR (" Error: %@" , kErrorAttestationTrustStoreInit );
331
332
errorCode = CHIP_ERROR_NO_MEMORY;
@@ -343,15 +344,15 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams
343
344
return ;
344
345
}
345
346
346
- if (startupParams.cdCerts ) {
347
+ if (startupParams.certificationDeclarationCertificates ) {
347
348
auto cdTrustStore = _deviceAttestationVerifier->GetCertificationDeclarationTrustStore ();
348
349
if (cdTrustStore == nullptr ) {
349
350
MTR_LOG_ERROR (" Error: %@" , kErrorCDCertStoreInit );
350
351
errorCode = CHIP_ERROR_INCORRECT_STATE;
351
352
return ;
352
353
}
353
354
354
- for (NSData * cdSigningCert in startupParams.cdCerts ) {
355
+ for (NSData * cdSigningCert in startupParams.certificationDeclarationCertificates ) {
355
356
errorCode = cdTrustStore->AddTrustedKey (AsByteSpan (cdSigningCert));
356
357
if (errorCode != CHIP_NO_ERROR) {
357
358
MTR_LOG_ERROR (" Error: %@" , kErrorCDCertStoreInit );
@@ -771,8 +772,8 @@ - (instancetype)initWithStorage:(id<MTRStorage>)storage
771
772
772
773
_storage = storage;
773
774
_otaProviderDelegate = nil ;
774
- _paaCerts = nil ;
775
- _cdCerts = nil ;
775
+ _productAttestationAuthorityCertificates = nil ;
776
+ _certificationDeclarationCertificates = nil ;
776
777
_port = nil ;
777
778
_shouldStartServer = NO ;
778
779
@@ -845,4 +846,24 @@ - (void)setStartServer:(BOOL)startServer
845
846
self.shouldStartServer = startServer;
846
847
}
847
848
849
+ - (nullable NSArray <NSData *> *)paaCerts
850
+ {
851
+ return self.productAttestationAuthorityCertificates ;
852
+ }
853
+
854
+ - (void )setPaaCerts : (nullable NSArray <NSData *> *)paaCerts
855
+ {
856
+ self.productAttestationAuthorityCertificates = paaCerts;
857
+ }
858
+
859
+ - (nullable NSArray <NSData *> *)cdCerts
860
+ {
861
+ return self.certificationDeclarationCertificates ;
862
+ }
863
+
864
+ - (void )setCdCerts : (nullable NSArray <NSData *> *)cdCerts
865
+ {
866
+ self.certificationDeclarationCertificates = cdCerts;
867
+ }
868
+
848
869
@end
0 commit comments