Skip to content

fix(s7commplus): probe family-only session keys - #887

Closed
gijzelaerr wants to merge 1 commit into
masterfrom
fix/834-family-key-fallback
Closed

gijzelaerr wants to merge 1 commit into
masterfrom
fix/834-family-key-fallback

Conversation

@gijzelaerr

Copy link
Copy Markdown
Owner

Closes gijzelaerr/s7commplus#3

Some legacy PLCs advertise only a SessionKey family such as 00, 01, or 03. This adds a bounded fallback that:

  • keeps complete-fingerprint selection unchanged
  • enumerates only bundled keys from the reported family
  • tries every candidate on a fresh transport/session
  • treats setup rejection or setup-time disconnect as a rejected candidate
  • caches a confirmed key by PLC host and port
  • supports allow_legacy_key_fallback=False for deterministic no-probing operation
  • keeps missing authentication dependencies as an immediate hard failure
  • logs key identifiers, never key material

Validation:

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

@gijzelaerr

Copy link
Copy Markdown
Owner Author

This S7CommPlus work is now tracked in gijzelaerr/s7commplus#18. Pull requests cannot be transferred between repositories, so this PR is being closed in favor of the new-repository tracking issue.

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.

Support family-only fingerprints with legacy public-key fallback

1 participant