locka99 / opcua

A client and server implementation of the OPC UA specification written in Rust
Mozilla Public License 2.0
501 stars 131 forks source link

Make the logic to ignore clock skew more robust #191

Closed svanharmelen closed 2 years ago

svanharmelen commented 2 years ago

We encounted a Heuft OPC server that didn’t send a timestamp in the OpenSecureChannelResponse message.

Yet it did send the correct timestamp in all other responses, so by adding a few more checks and also updating the offset on session creation fixes the problem.

And at the same time it can help to prevent new clock skew in cases where the channel is kept alive very long and new sessions are created within the existing channel.