Package io.vertx.core.net

## Class ClientSSLOptions

- java.lang.Object
- - io.vertx.core.net.SSLOptions
  - - io.vertx.core.net.ClientSSLOptions

-     public class ClientSSLOptions
      extends SSLOptions

  Client SSL options.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM` | Default value to determine hostname verification algorithm hostname verification (for SSL/TLS) = null
    `static boolean` | `DEFAULT_TRUST_ALL` | The default value of whether all servers (SSL/TLS) should be trusted = false

    - ### Fields inherited from class io.vertx.core.net.SSLOptions

      `DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS, DEFAULT_SSL_HANDSHAKE_TIMEOUT, DEFAULT_SSL_HANDSHAKE_TIMEOUT_TIME_UNIT, DEFAULT_USE_ALPN`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ClientSSLOptions()` | Default constructor
    `ClientSSLOptions​(JsonObject json)` | Create options from JSON
    `ClientSSLOptions​(ClientSSLOptions other)` | Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ClientSSLOptions` | `copy()` |
    `String` | `getHostnameVerificationAlgorithm()` |
    `protected void` | `init()` |
    `boolean` | `isTrustAll()` |
    `ClientSSLOptions` | `setApplicationLayerProtocols​(List<String> protocols)` | Set the list of application-layer protocols to provide to the server during the Application-Layer Protocol Negotiation.
    `ClientSSLOptions` | `setEnabledSecureTransportProtocols​(Set<String> enabledSecureTransportProtocols)` | Sets the list of enabled SSL/TLS protocols.
    `ClientSSLOptions` | `setHostnameVerificationAlgorithm​(String hostnameVerificationAlgorithm)` | Set the hostname verification algorithm interval
    `ClientSSLOptions` | `setKeyCertOptions​(KeyCertOptions options)` | Set the key/cert options.
    `ClientSSLOptions` | `setSslHandshakeTimeout​(long sslHandshakeTimeout)` | Set the SSL handshake timeout, default time unit is seconds.
    `ClientSSLOptions` | `setSslHandshakeTimeoutUnit​(TimeUnit sslHandshakeTimeoutUnit)` | Set the SSL handshake timeout unit.
    `ClientSSLOptions` | `setTrustAll​(boolean trustAll)` | Set whether all server certificates should be trusted
    `ClientSSLOptions` | `setTrustOptions​(TrustOptions options)` | Set the trust options.
    `ClientSSLOptions` | `setUseAlpn​(boolean useAlpn)` | Set the ALPN usage.
    `JsonObject` | `toJson()` | Convert to JSON

    - ### Methods inherited from class io.vertx.core.net.SSLOptions

      `addCrlPath, addCrlValue, addEnabledCipherSuite, addEnabledSecureTransportProtocol, equals, getApplicationLayerProtocols, getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getKeyCertOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTrustOptions, hashCode, isUseAlpn, removeEnabledCipherSuite, removeEnabledSecureTransportProtocol`

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

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

- - ### Field Detail

    - #### DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM

          public static final String DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM

      Default value to determine hostname verification algorithm hostname verification (for SSL/TLS) = null

    - #### DEFAULT_TRUST_ALL

          public static final boolean DEFAULT_TRUST_ALL

      The default value of whether all servers (SSL/TLS) should be trusted = false
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ClientSSLOptions

          public ClientSSLOptions()

      Default constructor

    - #### ClientSSLOptions

          public ClientSSLOptions​(ClientSSLOptions other)

      Copy constructor
      Parameters:
        `other` - the options to copy

    - #### ClientSSLOptions

          public ClientSSLOptions​(JsonObject json)

      Create options from JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### init

          protected void init()

      Overrides:
        `init` in class `SSLOptions`

    - #### copy

          public ClientSSLOptions copy()

      Overrides:
        `copy` in class `SSLOptions`

    - #### getHostnameVerificationAlgorithm

          public String getHostnameVerificationAlgorithm()

      Returns:
        the value of the hostname verification algorithm

    - #### setHostnameVerificationAlgorithm

          public ClientSSLOptions setHostnameVerificationAlgorithm​(String hostnameVerificationAlgorithm)

      Set the hostname verification algorithm interval
      Parameters:
        `hostnameVerificationAlgorithm` - should be HTTPS, LDAPS or a `null`
      Returns:
        a reference to this, so the API can be used fluently

    - #### isTrustAll

          public boolean isTrustAll()

      Returns:
        `true` if all server certificates should be trusted

    - #### setTrustAll

          public ClientSSLOptions setTrustAll​(boolean trustAll)

      Set whether all server certificates should be trusted
      Parameters:
        `trustAll` - `true` if all should be trusted
      Returns:
        a reference to this, so the API can be used fluently

    - #### setKeyCertOptions

          public ClientSSLOptions setKeyCertOptions​(KeyCertOptions options)

      Description copied from class: `SSLOptions`
      Set the key/cert options.
      Overrides:
        `setKeyCertOptions` in class `SSLOptions`
      Parameters:
        `options` - the key store options
      Returns:
        a reference to this, so the API can be used fluently

    - #### setTrustOptions

          public ClientSSLOptions setTrustOptions​(TrustOptions options)

      Description copied from class: `SSLOptions`
      Set the trust options.
      Overrides:
        `setTrustOptions` in class `SSLOptions`
      Parameters:
        `options` - the trust options
      Returns:
        a reference to this, so the API can be used fluently

    - #### setUseAlpn

          public ClientSSLOptions setUseAlpn​(boolean useAlpn)

      Description copied from class: `SSLOptions`
      Set the ALPN usage.
      Overrides:
        `setUseAlpn` in class `SSLOptions`
      Parameters:
        `useAlpn` - true when Application-Layer Protocol Negotiation should be used

    - #### setSslHandshakeTimeout

          public ClientSSLOptions setSslHandshakeTimeout​(long sslHandshakeTimeout)

      Description copied from class: `SSLOptions`
      Set the SSL handshake timeout, default time unit is seconds.
      Overrides:
        `setSslHandshakeTimeout` in class `SSLOptions`
      Parameters:
        `sslHandshakeTimeout` - the SSL handshake timeout to set, in milliseconds
      Returns:
        a reference to this, so the API can be used fluently

    - #### setSslHandshakeTimeoutUnit

          public ClientSSLOptions setSslHandshakeTimeoutUnit​(TimeUnit sslHandshakeTimeoutUnit)

      Description copied from class: `SSLOptions`
      Set the SSL handshake timeout unit. If not specified, default is seconds.
      Overrides:
        `setSslHandshakeTimeoutUnit` in class `SSLOptions`
      Parameters:
        `sslHandshakeTimeoutUnit` - specify time unit.
      Returns:
        a reference to this, so the API can be used fluently

    - #### setEnabledSecureTransportProtocols

          public ClientSSLOptions setEnabledSecureTransportProtocols​(Set<String> enabledSecureTransportProtocols)

      Description copied from class: `SSLOptions`
      Sets the list of enabled SSL/TLS protocols.
      Overrides:
        `setEnabledSecureTransportProtocols` in class `SSLOptions`
      Parameters:
        `enabledSecureTransportProtocols` - the SSL/TLS protocols to enable
      Returns:
        a reference to this, so the API can be used fluently

    - #### setApplicationLayerProtocols

          public ClientSSLOptions setApplicationLayerProtocols​(List<String> protocols)

      Description copied from class: `SSLOptions`
      Set the list of application-layer protocols to provide to the server during the Application-Layer Protocol Negotiation.
      Overrides:
        `setApplicationLayerProtocols` in class `SSLOptions`
      Parameters:
        `protocols` - the protocols
      Returns:
        a reference to this, so the API can be used fluently

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Overrides:
        `toJson` in class `SSLOptions`
      Returns:
        the JSON