Skip to content

feat: Add Modbus TCP TLS support - #146

Merged
sanny32 merged 7 commits into
devfrom
feature/modbus-tcp-security
Nov 6, 2026
Merged

sanny32 merged 7 commits into
devfrom
feature/modbus-tcp-security

Conversation

@sanny32

@sanny32 sanny32 commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Adds optional TLS 1.2+ for Modbus TCP servers. The connection dialog provides a TLS switch and selects port 802 when the default TCP port is used; RTU over TCP keeps its existing behavior.

  • Generate a self-signed server certificate automatically on first startup and manage regeneration and public certificate export in Modbus Definitions → Certificates.
  • Store the certificate and private key atomically in pki/own/OpenModSim@<hostname>.pem, with owner-only permissions on Unix.
  • Accept TLS clients without requiring client certificates. Clients can verify the server certificate; plaintext connections to a TLS listener are rejected. This implements server-authenticated TLS, without mutual client authentication or certificate role enforcement.
  • Persist TLS selection in connection settings and projects, add build and packaging support for a single matching OpenSSL version (1.1.1 for Qt 5, 3 for Qt 6), and update translations and documentation.
  • Keep certificate settings compact, abbreviate long DNS lists, and give the settings content area a separate background on macOS.

Validation: macOS Qt 6 application build succeeded; all 37 CTest suites passed. Coverage includes certificate generation and persistence, first-run generation, existing/corrupt identities, TLS connections, settings serialization, and translated UI layout in light/dark palettes. Windows and Linux builds were not run locally.

Closes #139.

@sanny32
sanny32 merged commit 1de87d3 into dev Nov 6, 2026
6 checks passed
@sanny32
sanny32 deleted the feature/modbus-tcp-security branch November 6, 2026 02:02
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