Skip to content

fix(client): apply TLS renegotiation without certificate - #1747

Open
jackwalkerlabs wants to merge 1 commit into
TwiN:masterfrom
jackwalkerlabs:fix/tls-renegotiation-config
Open

fix(client): apply TLS renegotiation without certificate#1747
jackwalkerlabs wants to merge 1 commit into
TwiN:masterfrom
jackwalkerlabs:fix/tls-renegotiation-config

Conversation

@jackwalkerlabs

Copy link
Copy Markdown

Summary

  • apply client TLS options whenever a TLS block is present, rather than only when it contains a client certificate pair
  • allow renegotiation-only TLS configuration while preserving optional mTLS certificates
  • reject half-configured certificate pairs during normal configuration validation instead of silently ignoring them

Fixes #1736.

Root cause

HasTLSConfig only returned true when both certificate paths were present. That gate was shared by HTTP, WebSocket, and gRPC, so configureTLS never saw a certificate-free renegotiation setting.

Regression coverage

The new HTTP transport regression uses renegotiation: freely without certificate paths. On unchanged master it failed with RenegotiateNever; with this change it receives RenegotiateFreelyAsClient. Because the gate and configurator are shared, the same configuration path is used by HTTP, WebSocket, and gRPC.

Validation

  • go test ./client -count=1
  • make test
  • go test ./... -race
  • go build
  • go vet ./...
  • git diff --check

Agent disclosure

This pull request was made by the OpenAI Codex agent (GPT-5). All reported reproduction and validation commands were run against the submitted code.

Allow client TLS options to be configured independently of an optional client certificate pair, while rejecting incomplete certificate pairs during validation.

AI-Agent: OpenAI Codex (GPT-5)
@github-actions github-actions Bot added the bug Something isn't working label Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

client.tls.renegotiation is silently ignored unless certificate-file and private-key-file are also set

1 participant