Skip to content

Commit

Permalink
Clear Aliro credentials when ClearCredential for all credentials happ…
Browse files Browse the repository at this point in the history
…ens. (project-chip#33796)

We were not clearing credentials of the Aliro types in this situation.
  • Loading branch information
bzbarsky-apple authored and Alami-Amine committed Jun 12, 2024
1 parent 5475d63 commit 0e2e189
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/app/clusters/door-lock-server/door-lock-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3038,6 +3038,24 @@ Status DoorLockServer::clearCredentials(chip::EndpointId endpointId, chip::Fabri
ChipLogProgress(Zcl, "[clearCredentials] All face credentials were cleared [endpointId=%d]", endpointId);
}

if (SupportsAliroProvisioning(endpointId))
{
for (auto & credentialType :
{ CredentialTypeEnum::kAliroEvictableEndpointKey, CredentialTypeEnum::kAliroCredentialIssuerKey,
CredentialTypeEnum::kAliroNonEvictableEndpointKey })
{
auto status = clearCredentials(endpointId, modifier, sourceNodeId, credentialType);
if (Status::Success != status)
{
ChipLogError(Zcl,
"[clearCredentials] Unable to clear all Aliro credentials [endpointId=%d,credentialType=%d,status=%d]",
endpointId, to_underlying(credentialType), to_underlying(status));
return status;
}
}
ChipLogProgress(Zcl, "[clearCredentials] All Aliro credentials were cleared [endpointId=%d]", endpointId);
}

return Status::Success;
}

Expand Down

0 comments on commit 0e2e189

Please sign in to comment.