Skip to content

Support passphrase and ssl_ca with ssl_capath - #263

Merged
quinnj-bot[bot] merged 1 commit into
mainfrom
claude/mysql-key-passphrase
Nov 16, 2026
Merged

quinnj-bot[bot] merged 1 commit into
mainfrom
claude/mysql-key-passphrase

Conversation

@quinnj-bot

@quinnj-bot quinnj-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Why

Two TLS settings that Connector/C users rely on are rejected today:

  • passphrase raises "not available in MySQL.jl 2.0", so a client certificate with an encrypted private key cannot be used.
  • ssl_ca and ssl_capath together raise an ArgumentError, because Reseau used to take only one trust source.

Reseau now supports both. Reseau 1.7.0 added key_passphrase (JuliaServices/Reseau.jl#240), and ca_dir is trusted together with ca_file (JuliaServices/Reseau.jl#164).

Change

  • passphrase unlocks an encrypted ssl_key. It is stored in TLSOptions.key_passphrase and passed to Reseau's TLS.Config. show for TLSOptions prints "…" in its place, and ConnectOptions never printed TLS details.
  • With both ssl_ca and ssl_capath, the bundle and the directory are trusted together. Either one alone works as before.
  • The trim-safe tls_config chain narrows the passphrase and the CA directory to concrete types before its single positional Config call, as it already did for the other optional settings.
  • Reseau compat is now 1.7.
  • Docs: the options table gains passphrase. The migration guide no longer lists passphrase as unavailable and shows ssl_ca + ssl_capath as applied together.
  • Behavior manifest row 180 now expects TLSNegotiationError. With both settings honored, its nonexistent paths fail the TLS handshake instead of failing option validation.

Verification

New fake-peer tests in test/protocol/tls_tests.jl:

  • A server that requires a client certificate accepts client-encrypted.key (PKCS#8, AES-256-CBC) with the right passphrase. With a wrong passphrase, or none, the connection fails with TLSNegotiationError.
  • With ssl_ca naming an unrelated root and ssl_capath holding the server's CA, :verify_ca succeeds. The same ssl_ca alone fails, so the directory is what made it pass.

test/protocol/native_tests.jl checks the parsed options and that show does not reveal the passphrase. certs/gen.sh regenerates the encrypted key.

🤖 Generated with Claude Code

passphrase unlocks an encrypted ssl_key, and ssl_ca and ssl_capath are
trusted together, now that Reseau 1.7 exposes key_passphrase and ca_dir.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@quinnj quinnj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving. passphrase unlocks an encrypted client key, and ssl_ca with ssl_capath are trusted together. An independent review checked:

  • the positional Reseau.TLS.Config arguments against Reseau 1.7.0
  • that the passphrase never appears in show or error output
  • the trim build
  • behavior manifest row 180 against mysql:8.4

The full suite passed locally (1917/1917), and CI is green.

[review generated via AI]

@quinnj-bot
quinnj-bot Bot merged commit 9a56e7d into main Nov 16, 2026
17 checks passed
@quinnj-bot
quinnj-bot Bot deleted the claude/mysql-key-passphrase branch November 16, 2026 20:33
This was referenced Nov 16, 2026
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