- Enclosing class:
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A provider for SNI names to send to the server during the TLS handshake.
By default, the OpenJDK TLS implementation does not send SNI names when
they are IP addresses, following what currently specified in
or when they are non-domain strings such as
If you need to send custom SNI, such as a non-domain SNI or an IP address SNI,
you can set your own SNI provider or use
NON_DOMAIN_SNI_PROVIDERstatic final SslContextFactory.Client.SniProvider NON_DOMAIN_SNI_PROVIDER
An SNI provider that, if the given
serverNameslist is empty, retrieves the host via
SSLEngine.getPeerHost(), converts it to ASCII bytes, and sends it as SNI.
This allows to send non-domain SNI such as
"localhost"or IP addresses.
Provides the SNI names to send to the server.
Currently, RFC 6066 allows for different types of server names, but defines only one of type "host_name".
As such, the input
serverNameslist and the list to be returned contain at most one element.
sslEngine- the SSLEngine that processes the TLS handshake
serverNames- the non-null immutable list of server names computed by implementation
- either the same
serverNameslist passed as parameter, or a new list containing the server names to send to the server