Class SSLParametersConfiguration

java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.net.ssl.SSLParametersConfiguration
All Implemented Interfaces:
ContextAware

public class SSLParametersConfiguration extends ContextAwareBase
A configuration of SSL parameters for an SSLEngine.
  • Field Details

    • includedProtocols

      private String includedProtocols
    • excludedProtocols

      private String excludedProtocols
    • includedCipherSuites

      private String includedCipherSuites
    • excludedCipherSuites

      private String excludedCipherSuites
    • needClientAuth

      private Boolean needClientAuth
    • wantClientAuth

      private Boolean wantClientAuth
    • enabledProtocols

      private String[] enabledProtocols
    • enabledCipherSuites

      private String[] enabledCipherSuites
    • hostnameVerification

      private Boolean hostnameVerification
  • Constructor Details

    • SSLParametersConfiguration

      public SSLParametersConfiguration()
  • Method Details

    • configure

      public void configure(SSLConfigurable socket)
      Configures SSL parameters on an SSLConfigurable.
      Parameters:
      socket - the subject configurable
    • getHostnameVerification

      public boolean getHostnameVerification()
    • setHostnameVerification

      public void setHostnameVerification(boolean hostnameVerification)
    • enabledProtocols

      private String[] enabledProtocols(String[] supportedProtocols, String[] defaultProtocols)
      Gets the set of enabled protocols based on the configuration.
      Parameters:
      supportedProtocols - protocols supported by the SSL engine
      defaultProtocols - default protocols enabled by the SSL engine
      Returns:
      enabled protocols
    • enabledCipherSuites

      private String[] enabledCipherSuites(String[] supportedCipherSuites, String[] defaultCipherSuites)
      Gets the set of enabled cipher suites based on the configuration.
      Parameters:
      supportedCipherSuites - cipher suites supported by the SSL engine
      defaultCipherSuites - default cipher suites enabled by the SSL engine
      Returns:
      enabled cipher suites
    • includedStrings

      private String[] includedStrings(String[] defaults, String included, String excluded)
      Applies include and exclude patterns to an array of default string values to produce an array of strings included by the patterns.
      Parameters:
      defaults - default list of string values
      included - comma-separated patterns that identity values to include
      excluded - comma-separated patterns that identity string to exclude
      Returns:
      an array of strings containing those strings from defaults that match at least one pattern in included that are not matched by any pattern in excluded
    • stringToArray

      private String[] stringToArray(String s)
      Splits a string containing comma-separated values into an array.
      Parameters:
      s - the subject string
      Returns:
      array of values contained in s
    • getIncludedProtocols

      public String getIncludedProtocols()
      Gets the JSSE secure transport protocols to include.
      Returns:
      a string containing comma-separated JSSE secure transport protocol names (e.g. TLSv1)
    • setIncludedProtocols

      public void setIncludedProtocols(String protocols)
      Sets the JSSE secure transport protocols to include.
      Parameters:
      protocols - a string containing comma-separated JSSE secure transport protocol names
      See Also:
      • invalid reference
        Cryptography Architecture Standard Algorithm Name Documentation
    • getExcludedProtocols

      public String getExcludedProtocols()
      Gets the JSSE secure transport protocols to exclude.
      Returns:
      a string containing comma-separated JSSE secure transport protocol names (e.g. TLSv1)
    • setExcludedProtocols

      public void setExcludedProtocols(String protocols)
      Sets the JSSE secure transport protocols to exclude.
      Parameters:
      protocols - a string containing comma-separated JSSE secure transport protocol names
      See Also:
      • invalid reference
        Cryptography Architecture Standard Algorithm Name Documentation
    • getIncludedCipherSuites

      public String getIncludedCipherSuites()
      Gets the JSSE cipher suite names to include.
      Returns:
      a string containing comma-separated JSSE cipher suite names (e.g. TLS_DHE_RSA_WITH_AES_256_CBC_SHA)
    • setIncludedCipherSuites

      public void setIncludedCipherSuites(String cipherSuites)
      Sets the JSSE cipher suite names to include.
      Parameters:
      cipherSuites - a string containing comma-separated JSSE cipher suite names
      See Also:
      • invalid reference
        Cryptography Architecture Standard Algorithm Name Documentation
    • getExcludedCipherSuites

      public String getExcludedCipherSuites()
      Gets the JSSE cipher suite names to exclude.
      Returns:
      a string containing comma-separated JSSE cipher suite names (e.g. TLS_DHE_RSA_WITH_AES_256_CBC_SHA)
    • setExcludedCipherSuites

      public void setExcludedCipherSuites(String cipherSuites)
      Sets the JSSE cipher suite names to exclude.
      Parameters:
      cipherSuites - a string containing comma-separated JSSE cipher suite names
      See Also:
      • invalid reference
        Cryptography Architecture Standard Algorithm Name Documentation
    • isNeedClientAuth

      public Boolean isNeedClientAuth()
      Gets a flag indicating whether client authentication is required.
      Returns:
      flag state
    • setNeedClientAuth

      public void setNeedClientAuth(Boolean needClientAuth)
      Sets a flag indicating whether client authentication is required.
      Parameters:
      needClientAuth - the flag state to set
    • isWantClientAuth

      public Boolean isWantClientAuth()
      Gets a flag indicating whether client authentication is desired.
      Returns:
      flag state
    • setWantClientAuth

      public void setWantClientAuth(Boolean wantClientAuth)
      Sets a flag indicating whether client authentication is desired.
      Parameters:
      wantClientAuth - the flag state to set