Class SSLHelper


  • public class SSLHelper
    extends Object
    Helper class to deal with SSL related setup
    Author:
    eduard
    • Field Detail

      • supportedKeys

        public static final List supportedKeys
        use this to indicate which cipher suites we support
    • Method Detail

      • getSupportedKeys

        public static String[] getSupportedKeys()
      • needAuth

        public static boolean needAuth​(String keystore)
        Parameters:
        keystore -
        Returns:
        true when filename arguments can be read
      • needAuth

        public static boolean needAuth()
        calls needAuth(java.lang.String) with System.getProperty("javax.net.ssl.keyStore") as argument
        Returns:
      • createContext

        public static SSLContext createContext​(String keystore,
                                               String passphrase)
                                        throws ICPException
        Parameters:
        keystore - will be used if javax.net.ssl.keyStore is not set
        passphrase - will be used if javax.net.ssl.keyStorePassword is not set
        Returns:
        Throws:
        ICPException
      • createContextNoAuth

        public static SSLContext createContextNoAuth()
                                              throws ICPException
        creates a SSLContext without a keystore or truststore
        Returns:
        Throws:
        ICPException
      • createContextWithAuth

        public static SSLContext createContextWithAuth()
                                                throws ICPException
        creates a SSLContext with a keystore, no truststore is used
        Returns:
        Throws:
        ICPException