Class SSLParametersUtil

java.lang.Object
org.newsclub.net.unix.ssl.SSLParametersUtil

public final class SSLParametersUtil extends Object
Utility class to work with SSLParameters.
Author:
Christian Kohlschütter
  • Method Details

    • disableProtocols

      public static void disableProtocols(SSLParameters params, String... protocols)
      Removes the given protocols from the set of protocols specified in an SSLParameters instance.
      Parameters:
      params - The parameters instance to configure.
      protocols - The protocols to disable.
    • disableCipherSuites

      public static void disableCipherSuites(SSLParameters params, String... cipherSuites)
      Removes the given cipher suites from the set of cipher suites specified in an SSLParameters instance.
      Parameters:
      params - The parameters instance to configure.
      cipherSuites - The protocols to disable.
    • setSNIMatcher

      public static void setSNIMatcher(SSLSocket s, SNIMatcher matcher)
      Sets an SNIMatcher instance with the parameters of the given SSLSocket (which should be in server mode).
      Parameters:
      s - The socket to modify.
      matcher - The matcher.
    • setSNIServerName

      public static void setSNIServerName(SSLSocket s, SNIServerName name)
      Sets the desired SNI server name with the parameters of the given SSLSocket (which should be in client mode).
      Parameters:
      s - The socket to modify.
      name - The name.