Package io.strimzi.kafka.oauth.common
Class SSLUtil
java.lang.Object
io.strimzi.kafka.oauth.common.SSLUtil
A class containing helper methods that deal with SSL / TLS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HostnameVerifierCreate a new instance of HostnameVerifier that accepts any hostnamestatic SSLSocketFactorycreateSSLFactory(String truststore, String truststoreData, String password, String type, String rnd) Create a new SSL Factory from given configuration arguments
-
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 iftypeis set topempassword- 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
Create a new instance of HostnameVerifier that accepts any hostname- Returns:
- A new HostnameVerifier instance
-