Class ServerSSLOptions


  • public class ServerSSLOptions
    extends SSLOptions
    Server SSL options.
    • Field Detail

      • DEFAULT_CLIENT_AUTH

        public static final ClientAuth DEFAULT_CLIENT_AUTH
        Default value of whether client auth is required (SSL/TLS) = No
      • DEFAULT_SNI

        public static final boolean DEFAULT_SNI
        Default value of whether the server supports SNI = false
        See Also:
        Constant Field Values
    • Constructor Detail

      • ServerSSLOptions

        public ServerSSLOptions()
        Default constructor
      • ServerSSLOptions

        public ServerSSLOptions​(ServerSSLOptions other)
        Copy constructor
        Parameters:
        other - the options to copy
      • ServerSSLOptions

        public ServerSSLOptions​(JsonObject json)
        Create options from JSON
        Parameters:
        json - the JSON
    • Method Detail

      • getClientAuth

        public ClientAuth getClientAuth()
      • setClientAuth

        public ServerSSLOptions setClientAuth​(ClientAuth clientAuth)
        Set whether client auth is required
        Parameters:
        clientAuth - One of "NONE, REQUEST, REQUIRED". If it's set to "REQUIRED" then server will require the SSL cert to be presented otherwise it won't accept the request. If it's set to "REQUEST" then it won't mandate the certificate to be presented, basically make it optional.
        Returns:
        a reference to this, so the API can be used fluently
      • isSni

        public boolean isSni()
        Returns:
        whether the server supports Server Name Indication
      • setSni

        public ServerSSLOptions setSni​(boolean sni)
        Set whether the server supports Server Name Indiciation
        Returns:
        a reference to this, so the API can be used fluently
      • setUseAlpn

        public ServerSSLOptions 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 ServerSSLOptions 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 ServerSSLOptions 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 ServerSSLOptions 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 ServerSSLOptions 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
      • addEnabledSecureTransportProtocol

        public ServerSSLOptions addEnabledSecureTransportProtocol​(String protocol)
        Description copied from class: SSLOptions
        Add an enabled SSL/TLS protocols, appended to the ordered protocols.
        Overrides:
        addEnabledSecureTransportProtocol in class SSLOptions
        Parameters:
        protocol - the SSL/TLS protocol to enable
        Returns:
        a reference to this, so the API can be used fluently