Package org.apache.cxf.configuration.jsse

# Class TLSClientParameters

java.lang.Object
org.apache.cxf.configuration.jsse.TLSParameterBase
org.apache.cxf.configuration.jsse.TLSClientParameters

public class TLSClientParameters extends TLSParameterBase
This class extends `TLSParameterBase` with client-specific SSL/TLS parameters.

- ## Field Summary

  ### Fields inherited from class org.apache.cxf.configuration.jsse.TLSParameterBase

  `certAlias, certConstraints, cipherSuiteFilters, ciphersuites, DEFAULT_HTTPS_PROTOCOLS, keyManagers, protocol, provider, secureRandom, trustManagers`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TLSClientParameters()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `HostnameVerifier`
  `getHostnameVerifier()`
  Get custom HostnameVerifier
  `static String[]`
  `getPreferredClientProtocols()`
  `List<String>`
  `getServerNames()`
  Returns SNI server names
  `int`
  `getSslCacheTimeout()`
  Returns the SSL cache timeout in seconds if it has been configured or the default value
  `SSLContext`
  `getSslContext()`
  Get the SSLContext parameter to use (if it has been set)
  `final SSLSocketFactory`
  `getSSLSocketFactory()`
  Returns the SSLSocketFactory to be used, or null if none has been set.
  `int`
  `hashCode()`
  `boolean`
  `isDisableCNCheck()`
  Returns whether or not JSSE omits checking if the host name specified in the URL matches that of the Common Name (CN) on the server's certificate.
  `boolean`
  `isUseHttpsURLConnectionDefaultHostnameVerifier()`
  Returns whether or not `HttpsURLConnection.getDefaultHostnameVerifier()` should be used to create https connections.
  `boolean`
  `isUseHttpsURLConnectionDefaultSslSocketFactory()`
  Returns whether or not `HttpsURLConnection.getDefaultSSLSocketFactory()` should be used to create https connections.
  `void`
  `setDisableCNCheck(boolean disableCNCheck)`
  Set whether or not JSEE should omit checking if the host name specified in the URL matches that of the Common Name (CN) on the server's certificate.
  `void`
  `setHostnameVerifier(HostnameVerifier verifier)`
  Set custom HostnameVerifier
  `void`
  `setServerNames(List<String> serverNames)`
  Sets SNI server names
  `void`
  `setSslCacheTimeout(int sslCacheTimeout)`
  This sets the SSL Session Cache timeout value in seconds for client sessions handled by CXF
  `void`
  `setSslContext(SSLContext sslContext)`
  Set an SSLContext parameter to use to create https connections
  `final void`
  `setSSLSocketFactory(SSLSocketFactory factory)`
  This sets the SSLSocketFactory to use, causing all other properties of this bean (and its superclass) to get ignored (this takes precendence).
  `void`
  `setUseHttpsURLConnectionDefaultHostnameVerifier(boolean useHttpsURLConnectionDefaultHostnameVerifier)`
  Sets whether or not `HttpsURLConnection.getDefaultHostnameVerifier()` should be used to create https connections.
  `void`
  `setUseHttpsURLConnectionDefaultSslSocketFactory(boolean useHttpsURLConnectionDefaultSslSocketFactory)`
  Sets whether or not `HttpsURLConnection.getDefaultSSLSocketFactory()` should be used to create https connections.

  ### Methods inherited from class org.apache.cxf.configuration.jsse.TLSParameterBase

  `getCertAlias, getCertConstraints, getCipherSuites, getCipherSuitesFilter, getJsseProvider, getKeyManagers, getSecureRandom, getSecureSocketProtocol, getTrustManagers, setCertAlias, setCertConstraints, setCipherSuites, setCipherSuitesFilter, setJsseProvider, setKeyManagers, setSecureRandom, setSecureSocketProtocol, setTrustManagers`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TLSClientParameters

    public TLSClientParameters()

- ## Method Details

  - ### setHostnameVerifier

    public void setHostnameVerifier(HostnameVerifier verifier)
    Set custom HostnameVerifier
    Parameters:
      `verifier` - hostname verifier

  - ### getHostnameVerifier

    public HostnameVerifier getHostnameVerifier()
    Get custom HostnameVerifier
    Returns:
      hostname verifier

  - ### setDisableCNCheck

    public void setDisableCNCheck(boolean disableCNCheck)
    Set whether or not JSEE should omit checking if the host name specified in the URL matches that of the Common Name (CN) on the server's certificate. Default is false; this attribute should not be set to true during production use.

  - ### isDisableCNCheck

    public boolean isDisableCNCheck()
    Returns whether or not JSSE omits checking if the host name specified in the URL matches that of the Common Name (CN) on the server's certificate.

  - ### setSSLSocketFactory

    public final void setSSLSocketFactory(SSLSocketFactory factory)
    This sets the SSLSocketFactory to use, causing all other properties of this bean (and its superclass) to get ignored (this takes precendence).

  - ### getSSLSocketFactory

    public final SSLSocketFactory getSSLSocketFactory()
    Returns the SSLSocketFactory to be used, or null if none has been set.

  - ### getSslCacheTimeout

    public int getSslCacheTimeout()
    Returns the SSL cache timeout in seconds if it has been configured or the default value

  - ### setSslCacheTimeout

    public void setSslCacheTimeout(int sslCacheTimeout)
    This sets the SSL Session Cache timeout value in seconds for client sessions handled by CXF

  - ### isUseHttpsURLConnectionDefaultSslSocketFactory

    public boolean isUseHttpsURLConnectionDefaultSslSocketFactory()
    Returns whether or not `HttpsURLConnection.getDefaultSSLSocketFactory()` should be used to create https connections. If `true` , `TLSParameterBase.getJsseProvider()` , `TLSParameterBase.getSecureSocketProtocol()`, `TLSParameterBase.getTrustManagers()`, `TLSParameterBase.getKeyManagers()`, `TLSParameterBase.getSecureRandom()`, `TLSParameterBase.getCipherSuites()` and `TLSParameterBase.getCipherSuitesFilter()` are ignored.

  - ### setUseHttpsURLConnectionDefaultSslSocketFactory

    public void setUseHttpsURLConnectionDefaultSslSocketFactory(boolean useHttpsURLConnectionDefaultSslSocketFactory)
    Sets whether or not `HttpsURLConnection.getDefaultSSLSocketFactory()` should be used to create https connections.
    See Also:
      - `isUseHttpsURLConnectionDefaultSslSocketFactory()`

  - ### isUseHttpsURLConnectionDefaultHostnameVerifier

    public boolean isUseHttpsURLConnectionDefaultHostnameVerifier()
    Returns whether or not `HttpsURLConnection.getDefaultHostnameVerifier()` should be used to create https connections. If `true`, `isDisableCNCheck()` is ignored.

  - ### setUseHttpsURLConnectionDefaultHostnameVerifier

    public void setUseHttpsURLConnectionDefaultHostnameVerifier(boolean useHttpsURLConnectionDefaultHostnameVerifier)
    Sets whether or not `HttpsURLConnection.getDefaultHostnameVerifier()` should be used to create https connections.
    See Also:
      - `isUseHttpsURLConnectionDefaultHostnameVerifier()`

  - ### setServerNames

    public void setServerNames(List<String> serverNames)
    Sets SNI server names
    Parameters:
      `serverNames` - SNI server names

  - ### getServerNames

    public List<String> getServerNames()
    Returns SNI server names

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### getSslContext

    public SSLContext getSslContext()
    Get the SSLContext parameter to use (if it has been set)

  - ### setSslContext

    public void setSslContext(SSLContext sslContext)
    Set an SSLContext parameter to use to create https connections

  - ### getPreferredClientProtocols

    public static String[] getPreferredClientProtocols()