@@ -257,7 +257,11 @@ void TlsCertificateManagementServer::HandleProvisionRootCertificate(HandlerConte
257257 }
258258
259259 VerifyOrDieWithMsg (response.caid <= kMaxRootCertId , NotSpecified, " Spec requires CAID to be < kMaxRootCertId" );
260+
260261 ctx.mCommandHandler .AddResponse (ctx.mRequestPath , response);
262+
263+ MatterReportingAttributeChangeCallback (ctx.mRequestPath .mEndpointId , TlsCertificateManagement::Id,
264+ TlsCertificateManagement::Attributes::ProvisionedRootCertificates::Id);
261265}
262266
263267void TlsCertificateManagementServer::HandleFindRootCertificate (HandlerContext & ctx, const FindRootCertificate::DecodableType & req)
@@ -338,6 +342,13 @@ void TlsCertificateManagementServer::HandleRemoveRootCertificate(HandlerContext
338342 ctx.mCommandHandler .AddStatus (ctx.mRequestPath , Status::InvalidInState));
339343
340344 auto result = mDelegate .RemoveRootCert (ctx.mRequestPath .mEndpointId , ctx.mCommandHandler .GetAccessingFabricIndex (), req.caid );
345+
346+ if (result == Status::Success)
347+ {
348+ MatterReportingAttributeChangeCallback (ctx.mRequestPath .mEndpointId , TlsCertificateManagement::Id,
349+ TlsCertificateManagement::Attributes::ProvisionedRootCertificates::Id);
350+ }
351+
341352 ctx.mCommandHandler .AddStatus (ctx.mRequestPath , result);
342353}
343354
@@ -412,6 +423,13 @@ void TlsCertificateManagementServer::HandleProvisionClientCertificate(HandlerCon
412423 ctx.mCommandHandler .AddStatus (ctx.mRequestPath , Status::NotFound));
413424
414425 auto status = mDelegate .ProvisionClientCert (ctx.mRequestPath .mEndpointId , fabric, req);
426+
427+ if (status == Status::Success)
428+ {
429+ MatterReportingAttributeChangeCallback (ctx.mRequestPath .mEndpointId , TlsCertificateManagement::Id,
430+ TlsCertificateManagement::Attributes::ProvisionedClientCertificates::Id);
431+ }
432+
415433 ctx.mCommandHandler .AddStatus (ctx.mRequestPath , status);
416434}
417435
@@ -498,6 +516,13 @@ void TlsCertificateManagementServer::HandleRemoveClientCertificate(HandlerContex
498516
499517 auto result =
500518 mDelegate .RemoveClientCert (ctx.mRequestPath .mEndpointId , ctx.mCommandHandler .GetAccessingFabricIndex (), req.ccdid );
519+
520+ if (result == Status::Success)
521+ {
522+ MatterReportingAttributeChangeCallback (ctx.mRequestPath .mEndpointId , TlsCertificateManagement::Id,
523+ TlsCertificateManagement::Attributes::ProvisionedClientCertificates::Id);
524+ }
525+
501526 ctx.mCommandHandler .AddStatus (ctx.mRequestPath , result);
502527}
503528
0 commit comments