Skip to content

The internal SSL utility classes (SslContext, JdkSslContext, `Pem…#3878

Merged
jknack merged 1 commit intomainfrom
3877
Mar 14, 2026
Merged

The internal SSL utility classes (SslContext, JdkSslContext, `Pem…#3878
jknack merged 1 commit intomainfrom
3877

Conversation

@jknack
Copy link
Member

@jknack jknack commented Mar 14, 2026

…Reader`) currently rely on legacy defaults and need to be modernized to fully leverage Java 21 standards.

These classes are essential for zero-dependency PEM parsing and SSL configuration across supported servers, but they currently default to the outdated JKS keystore format, prioritize older TLS versions, and utilize legacy cipher suites.

  • Prioritize TLS 1.3: Update the protocol fallback logic in JdkSslContext to prioritize TLSv1.3 and drop deprecated protocols.
  • Modernize Ciphers: Remove outdated ciphers (e.g., 3DES) and ensure high-security TLS 1.3 ciphers are at the top of the preference list.
  • Update Keystore Format: Replace hardcoded "JKS" instances with KeyStore.getDefaultType() to utilize the modern PKCS12 standard.
  • Optimize PEM Parsing: Refactor PemReader to use Base64.getMimeDecoder() for native, efficient handling of line breaks, replacing the manual regex string manipulation.
  • Syntax Cleanup: Apply the diamond operator (<>) across all files to clean up legacy generics.

fix #3877

…Reader`) currently rely on legacy defaults and need to be modernized to fully leverage Java 21 standards.

These classes are essential for zero-dependency PEM parsing and SSL configuration across supported servers, but they currently default to the outdated `JKS` keystore format, prioritize older TLS versions, and utilize legacy cipher suites.

* **Prioritize TLS 1.3:** Update the protocol fallback logic in `JdkSslContext` to prioritize `TLSv1.3` and drop deprecated protocols.
* **Modernize Ciphers:** Remove outdated ciphers (e.g., 3DES) and ensure high-security TLS 1.3 ciphers are at the top of the preference list.
* **Update Keystore Format:** Replace hardcoded `"JKS"` instances with `KeyStore.getDefaultType()` to utilize the modern PKCS12 standard.
* **Optimize PEM Parsing:** Refactor `PemReader` to use `Base64.getMimeDecoder()` for native, efficient handling of line breaks, replacing the manual regex string manipulation.
* **Syntax Cleanup:** Apply the diamond operator (`<>`) across all files to clean up legacy generics.

fix #3877
@jknack jknack added this to the 4.1.0 milestone Mar 14, 2026
@jknack jknack merged commit 076d333 into main Mar 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modernize internal X509 and SSL utilities for Java 21 and TLS 1.3

1 participant