Class SSLUtil

java.lang.Object
io.deephaven.enterprise.resolver.SSLUtil

public final class SSLUtil extends Object
Utility class containing SSL related helper methods.
  • 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 name
      truststorePath - 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 algorithms
      IOException - 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 name
      truststorePath - 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 algorithms
      IOException - if the file can't be accessed or is invalid in some way