Package io.deephaven.enterprise.resolver
Class SSLUtil
java.lang.Object
io.deephaven.enterprise.resolver.SSLUtil
Utility class containing SSL related helper methods.
-
Method Summary
Modifier and TypeMethodDescriptionstatic KeyStorecreateKeyStore(String pkcs12TruststoreFile, String truststorePath) Create and return an instance of pkcs12 keystore that is loaded with the named pkcs12 trust store.static SSLContextcreateSSLContext(String pkcs12TruststoreFile, String truststorePath) Create and return an instance of SSLContext that is loaded with the named pkcs12 trust store.
-
Method Details
-
createSSLContext
public static SSLContext createSSLContext(String pkcs12TruststoreFile, String truststorePath) throws GeneralSecurityException, IOException Create and return an instance of SSLContext that is loaded with the named pkcs12 trust store.- Parameters:
pkcs12TruststoreFile- the truststore file nametruststorePath- the password for the truststore file- Returns:
- a new SSLContext instance, loaded with provided truststore
- Throws:
GeneralSecurityException- if any errors occur related to file types and available algorithmsIOException- if the file can't be accessed or is invalid in some way
-
createKeyStore
public static KeyStore createKeyStore(String pkcs12TruststoreFile, String truststorePath) throws GeneralSecurityException, IOException Create and return an instance of pkcs12 keystore that is loaded with the named pkcs12 trust store.- Parameters:
pkcs12TruststoreFile- the truststore file nametruststorePath- the password for the truststore file- Returns:
- a new Keystore instance of type PKCS12, loaded with provided truststore
- Throws:
GeneralSecurityException- if any errors occur related to file types and available algorithmsIOException- if the file can't be accessed or is invalid in some way
-