Class SSLUtil

java.lang.Object
io.strimzi.kafka.oauth.common.SSLUtil

public class SSLUtil extends Object
A class containing helper methods that deal with SSL / TLS
  • Constructor Details

    • SSLUtil

      public SSLUtil()
  • Method Details

    • createSSLFactory

      public static SSLSocketFactory createSSLFactory(String truststore, String truststoreData, String password, String type, String rnd)
      Create a new SSL Factory from given configuration arguments
      Parameters:
      truststore - A path to truststore file (used by default)
      truststoreData - A PEM string containing a chain of X.509 certificates. Used if type is set to pem
      password - A password for the truststore file (optional)
      type - A truststore type (e.g. PKCS12, JKS, or PEM) (optional)
      rnd - A random number generator to use (optional)
      Returns:
      A new SSLSocketFactory instance
    • createAnyHostHostnameVerifier

      public static HostnameVerifier createAnyHostHostnameVerifier()
      Create a new instance of HostnameVerifier that accepts any hostname
      Returns:
      A new HostnameVerifier instance