@@ -345,7 +345,20 @@ class DLL_EXPORT SessionManager : public TransportMgrDelegate, public FabricTabl
345
345
return CHIP_NO_ERROR;
346
346
}
347
347
348
+ /* *
349
+ * Expire all sessions for a given peer, as identified by a specific fabric
350
+ * index and node ID.
351
+ */
348
352
void ExpireAllSessions (const ScopedNodeId & node);
353
+
354
+ /* *
355
+ * Expire all sessions associated with the given fabric index.
356
+ *
357
+ * *NOTE* This is generally all sessions for a given fabric _EXCEPT_ if there are multiple
358
+ * FabricInfo instances in the FabricTable that collide on the same logical fabric (i.e
359
+ * root public key + fabric ID tuple). This can ONLY happen if multiple controller
360
+ * instances on the same fabric is permitted and each is assigned a unique fabric index.
361
+ */
349
362
void ExpireAllSessionsForFabric (FabricIndex fabricIndex);
350
363
351
364
/* *
@@ -376,6 +389,12 @@ class DLL_EXPORT SessionManager : public TransportMgrDelegate, public FabricTabl
376
389
377
390
void ExpireAllPASESessions ();
378
391
392
+ /* *
393
+ * Expire all secure sessions. See documentation for Shutdown on when it's
394
+ * appropriate to use this.
395
+ */
396
+ void ExpireAllSecureSessions ();
397
+
379
398
/* *
380
399
* @brief
381
400
* Marks all active sessions that match provided arguments as defunct.
@@ -422,6 +441,15 @@ class DLL_EXPORT SessionManager : public TransportMgrDelegate, public FabricTabl
422
441
* @brief
423
442
* Shutdown the Secure Session Manager. This terminates this instance
424
443
* of the object and reset it's state.
444
+ *
445
+ * The proper order of shutdown for SessionManager is as follows:
446
+ *
447
+ * 1) Call ExpireAllSecureSessions() on the SessionManager, and ensure that any unauthenticated
448
+ * sessions (e.g. CASEServer and CASESessionManager instances, or anything that does PASE
449
+ * handshakes) are released.
450
+ * 2) Shut down the exchange manager, so that it's no longer referencing
451
+ * the to-be-shut-down SessionManager.
452
+ * 3) Shut down the SessionManager.
425
453
*/
426
454
void Shutdown ();
427
455
0 commit comments