public final class SSLParamConfigurator extends Object
SSLParameters.
To be reused in connectors.| Modifier and Type | Class and Description |
|---|---|
static class |
SSLParamConfigurator.Builder
Builder of the
SSLParamConfigurator instance. |
| Modifier and Type | Method and Description |
|---|---|
static SSLParamConfigurator.Builder |
builder()
Create a new instance of TlsSupport class
|
String |
getSNIHostName()
Get the host name either set by the request URI or by
HttpHeaders.HOST header if it differs from HTTP request host name. |
URI |
getSNIUri()
Get the request URI or altered by
HttpHeaders.HOST header. |
boolean |
isSNIRequired()
Return true iff SNI is to be set, i.e.
|
void |
setEndpointIdentificationAlgorithm(SSLEngine sslEngine)
Set setEndpointIdentificationAlgorithm to HTTPS.
|
void |
setSNIServerName(SSLEngine sslEngine)
Set
SNIServerName for the SSLParameters when SNI should be used
(i.e. |
void |
setSNIServerName(SSLSocket sslSocket)
Set
SNIServerName for the SSLParameters when SNI should be used
(i.e. |
URI |
toIPRequestUri()
Replaces hostname within the
ClientRequest uri with a resolved IP address. |
public static SSLParamConfigurator.Builder builder()
public String getSNIHostName()
HttpHeaders.HOST header if it differs from HTTP request host name.SSLEngine is to use.public URI toIPRequestUri()
ClientRequest uri with a resolved IP address. Should the hostname be not known,
the original request URI is returned. The purpose of this method is to replace the host with the IP so that
{code HttpUrlConnection} does not replace user defined SNIHostName with the host from the request
uri.public boolean isSNIRequired()
HttpHeaders.HOST header if it differs from HTTP request host name.true when SNIHostName is to be set.public URI getSNIUri()
HttpHeaders.HOST header.getSNIHostName()public void setSNIServerName(SSLEngine sslEngine)
SNIServerName for the SSLParameters when SNI should be used
(i.e. HttpHeaders.HOST differs from HTTP request host name)sslEngine - the SSLEngine the SSLParameters are set for.public void setSNIServerName(SSLSocket sslSocket)
SNIServerName for the SSLParameters when SNI should be used
(i.e. HttpHeaders.HOST differs from HTTP request host name)sslSocket - the SSLSocket the SSLParameters are set for.public void setEndpointIdentificationAlgorithm(SSLEngine sslEngine)
sslEngine - the SSLEngine the algorithm is set for.SSLParameters.setEndpointIdentificationAlgorithm(String)Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.