From 3502138aee0499ee0f87469674304c5b0ea0f433 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 9 May 2023 14:03:58 -0400 Subject: [PATCH] Fix use of certificate validity policy in CHIPDeviceController. (#26405) In CHIPDeviceControllerFactory we were using the provided validity policy for our CASE server (i.e. when acting as a CASE responder), but not for our CASE client (i.e. not when acting as CASE initiator). As a result, when acting as a CASE client we ended up using the default validity policy for the NOC provided by the other side, instead of using the one that was passed in via the FactoryInitParams. --- src/controller/CHIPDeviceControllerFactory.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index 100801c7db9566..6ae3b72464ddd1 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -249,12 +249,13 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) stateParams.caseClientPool = Platform::New(); CASEClientInitParams sessionInitParams = { - .sessionManager = stateParams.sessionMgr, - .sessionResumptionStorage = stateParams.sessionResumptionStorage.get(), - .exchangeMgr = stateParams.exchangeMgr, - .fabricTable = stateParams.fabricTable, - .groupDataProvider = stateParams.groupDataProvider, - .mrpLocalConfig = GetLocalMRPConfig(), + .sessionManager = stateParams.sessionMgr, + .sessionResumptionStorage = stateParams.sessionResumptionStorage.get(), + .certificateValidityPolicy = stateParams.certificateValidityPolicy, + .exchangeMgr = stateParams.exchangeMgr, + .fabricTable = stateParams.fabricTable, + .groupDataProvider = stateParams.groupDataProvider, + .mrpLocalConfig = GetLocalMRPConfig(), }; CASESessionManagerConfig sessionManagerConfig = {