Skip to content

Commit bd0422b

Browse files
Clear Aliro credentials when ClearCredential for all credentials happens. (#33796)
We were not clearing credentials of the Aliro types in this situation.
1 parent b29c1de commit bd0422b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/app/clusters/door-lock-server/door-lock-server.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -3038,6 +3038,24 @@ Status DoorLockServer::clearCredentials(chip::EndpointId endpointId, chip::Fabri
30383038
ChipLogProgress(Zcl, "[clearCredentials] All face credentials were cleared [endpointId=%d]", endpointId);
30393039
}
30403040

3041+
if (SupportsAliroProvisioning(endpointId))
3042+
{
3043+
for (auto & credentialType :
3044+
{ CredentialTypeEnum::kAliroEvictableEndpointKey, CredentialTypeEnum::kAliroCredentialIssuerKey,
3045+
CredentialTypeEnum::kAliroNonEvictableEndpointKey })
3046+
{
3047+
auto status = clearCredentials(endpointId, modifier, sourceNodeId, credentialType);
3048+
if (Status::Success != status)
3049+
{
3050+
ChipLogError(Zcl,
3051+
"[clearCredentials] Unable to clear all Aliro credentials [endpointId=%d,credentialType=%d,status=%d]",
3052+
endpointId, to_underlying(credentialType), to_underlying(status));
3053+
return status;
3054+
}
3055+
}
3056+
ChipLogProgress(Zcl, "[clearCredentials] All Aliro credentials were cleared [endpointId=%d]", endpointId);
3057+
}
3058+
30413059
return Status::Success;
30423060
}
30433061

0 commit comments

Comments
 (0)