Skip to content

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

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

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

Conversation

@gijzelaerr

Copy link
Copy Markdown
Owner

Closes #834

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

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