Skip to content

add optional TCP MD5 Signature RFC2385#25

Merged
senid231 merged 1 commit into
masterfrom
tcp-md5-signature
May 29, 2026
Merged

add optional TCP MD5 Signature RFC2385#25
senid231 merged 1 commit into
masterfrom
tcp-md5-signature

Conversation

@senid231

@senid231 senid231 commented May 29, 2026

Copy link
Copy Markdown
Member

TCP MD5 Signature (RFC2385)

Both clients accept tcp_md5_pass: to enable per-connection authentication via the TCP MD5 Signature option.
The kernel signs and verifies every TCP segment with MD5(key + segment + addresses/ports);
a peer with a mismatched or absent key has its segments silently dropped, so the handshake never completes.

@senid231 senid231 requested a review from Copilot May 29, 2026 13:42
@senid231 senid231 self-assigned this May 29, 2026
@senid231 senid231 changed the title RFC2385 TCP MD5 Signature add optional TCP MD5 Signature RFC2385 May 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds optional support for RFC2385 TCP MD5 Signature to the TCP transport, exposing it as a tcp_md5_pass: option for clients/transports and documenting/testing the behavior.

Changes:

  • Add tcp_md5_pass: option plumbing in the transport base and implement TCP_MD5SIG setsockopt in JRPC::Transport::Tcp before connect.
  • Add RSpec coverage for MD5-signed connections (match/mismatch, unsupported platform, overlong key) plus support helpers.
  • Document the new option in README and CHANGELOG.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
spec/transport/tcp_spec.rb Adds integration-style specs covering TCP MD5 signature success/failure paths.
spec/support/tcp_md5_helpers.rb Introduces helpers to probe kernel support and configure an MD5-signing test server socket.
README.md Documents tcp_md5_pass: and explains platform limitations/behavior.
lib/jrpc/transport/tcp.rb Implements RFC2385 key installation on sockets via TCP_MD5SIG.
lib/jrpc/transport/base.rb Adds @tcp_md5_pass option storage for transports.
CHANGELOG.md Notes the new optional TCP MD5 signature feature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/jrpc/transport/tcp.rb
@senid231 senid231 force-pushed the tcp-md5-signature branch from 3bdc391 to 4f10ba2 Compare May 29, 2026 13:50
@github-actions

Copy link
Copy Markdown
Package Line Rate Branch Rate Complexity Health
jrpc 92% 81% 0
Summary 92% (626 / 682) 81% (204 / 251) 0

@senid231 senid231 merged commit 158a4d1 into master May 29, 2026
2 checks passed
@senid231 senid231 deleted the tcp-md5-signature branch May 29, 2026 13:57
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.

2 participants