diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index 3842130aa356f1..43a044d0c4b9ec 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -900,6 +900,21 @@ void DoorLockServer::getCredentialStatusCommandHandler(chip::app::CommandHandler credentialExists); } +namespace { +bool IsAliroCredentialType(CredentialTypeEnum credentialType) +{ + switch (credentialType) + { + case CredentialTypeEnum::kAliroCredentialIssuerKey: + case CredentialTypeEnum::kAliroEvictableEndpointKey: + case CredentialTypeEnum::kAliroNonEvictableEndpointKey: + return true; + default: + return false; + } +} +} // anonymous namespace + void DoorLockServer::sendGetCredentialResponse(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, CredentialTypeEnum credentialType, uint16_t credentialIndex, @@ -921,10 +936,18 @@ void DoorLockServer::sendGetCredentialResponse(chip::app::CommandHandler * comma { response.lastModifiedFabricIndex.SetNonNull(credentialInfo->lastModifiedBy); } + if (IsAliroCredentialType(credentialType)) + { + response.credentialData.Emplace(credentialInfo->credentialData); + } } else { response.userIndex.SetNull(); + if (IsAliroCredentialType(credentialType)) + { + response.credentialData.Emplace(NullNullable); + } } uint16_t nextCredentialIndex = 0; if (findOccupiedCredentialSlot(commandPath.mEndpointId, credentialType, static_cast(credentialIndex + 1), diff --git a/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml index 8ebb31df118d92..b25cd549d90091 100644 --- a/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml @@ -491,6 +491,7 @@ limitations under the License. + diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index a8d32569d1aa92..d614364056443e 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -9801,6 +9801,10 @@ - GlobalEchoResponse - StringEchoRequest - StringEchoResponse + command fields: + DoorLock: + GetCredentialStatusResponse: + - credentialData structs: AccessControl: # Targeting 1.4