public interface SslSocketConfigurator
SSLSocket
parameters (e.g., named groups, cipher suites, application protocols) before the TLS handshake
starts.
Exposing this hook allows users to customize advanced TLS capabilities that are not configurable via standard JVM system properties, or require custom security provider APIs (e.g., Conscrypt or BouncyCastle). Typical use cases include:
SSLParameters.setNamedGroups(String[])), as shown in the JDK 20+ example
below.
{@code
builder.setSslSocketConfigurator(new SslSocketConfigurator() {| Modifier and Type | Method and Description |
|---|---|
void |
configure(SSLSocket sslSocket)
Configures the active TLS socket parameters before the handshake starts.
|
void configure(SSLSocket sslSocket)
sslSocket - the newly created SSLSocket connectionCopyright © 2011–2026 Google. All rights reserved.