Skip to content

fix(s7commplus): renew legacy session keys - #888

Open
gijzelaerr wants to merge 2 commits into
fix/832-response-integrityfrom
fix/835-session-key-renewal
Open

gijzelaerr wants to merge 2 commits into
fix/832-response-integrityfrom
fix/835-session-key-renewal

Conversation

@gijzelaerr

Copy link
Copy Markdown
Owner

Closes #835

Summary

  • renew legacy SessionKeys every 25 minutes by default, with a configurable/disableable interval
  • serialize the challenge and SecurityKey exchange with application requests
  • keep the old key active through response-HMAC verification, then switch atomically
  • close the connection and surface a stable error when renewal fails
  • cancel renewal activity during disconnect and document the lifecycle

Testing

  • pre-commit run --all-files
  • uv run pytest -q --tb=short (2104 passed, 82 skipped)
  • uv build --quiet

Dependency

This is stacked on #884 because renewal must verify the PLC response with the old SessionKey before installing the new key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant