Address two issues#461
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a UtcTime enum to distinguish between reliable and unreliable (Last-Known-Good) clock states, updating certificate verification logic to skip NotBefore checks when the clock is unreliable. It also refines session expiration handling to allow ongoing exchanges to complete before a session is fully reclaimed, specifically addressing scenarios like the RemoveFabric command. Additionally, the SessionNotFound status code is updated to not require the reliability flag in secure channel communications, and various components are updated to utilize the new time-tracking API. I have no feedback to provide.
|
PR #461: Size comparison from b23a6ab to 3e7c20d Full report (8 builds for (core), dimmable-light, onoff-light, onoff-light-bt, speaker)
|
3e7c20d to
b4c53f8
Compare
b4c53f8 to
2fc1e65
Compare
|
PR #461: Size comparison from b23a6ab to 2fc1e65 Full report (8 builds for (core), dimmable-light, onoff-light, onoff-light-bt, speaker)
|
This PR is containing two commits, each addressing a separate bug:
Commit 1 (f5f7a0d)
The recently-introduced "expired"
Sessionstate is currently treated too "drastically".What I mean by that is that if we receive a message on an already active exchange (say, an innocent ACK), if that's for an expired session we'll claim that this session does not exist.
That's too drastic because e.g. - when the "remove fabric" command on the NOC cluster is invoked by a peer - our own command response to that command cannot complete, because - according to the above logic - we never receive the ACK reply ffrom the peer for our command response and therefore we keep re-trying the sending!
The fix is to only not allow expired sessions for new exchanges on that session, which are about to be created. For on-going exchanges, the fact that the session is expired is not considered a show-stopper anymore.
Commit 2 (3e7c20d)
This is addressing #459 .
The bug here is that if we don't have a reliable wall clock UTC timestamp, but only a "last known good UTC timestamp" - like the one we automatically get during
rs-matterbuild-time - we cannot use the lkgut value to check the validity start of a certificate because the certificate might actually be generated AFTER the build of rs-matter had happened.