SSLParameters (Java Platform SE 8 ) (original) (raw)
Returns a List containing all SNIServerNames of the Server Name Indication (SNI) parameter, or null if none has been set.
This method is only useful to SSLSockets or SSLEngines operating in client mode.
For SSL/TLS connections, the underlying SSL/TLS provider may specify a default value for a certain server name type. In client mode, it is recommended that, by default, providers should include the server name indication whenever the server can be located by a supported server name type.
It is recommended that providers initialize default Server Name Indications when creating SSLSocket
/SSLEngine
s. In the following examples, the server name could be represented by an instance of SNIHostName which has been initialized with the hostname "www.example.com" and typeStandardConstants.SNI_HOST_NAME.
Socket socket =
sslSocketFactory.createSocket("www.example.com", 443);
or
SSLEngine engine =
sslContext.createSSLEngine("www.example.com", 443);