Class SSLClientHelper

    • Constructor Detail

      • SSLClientHelper

        public SSLClientHelper​(java.lang.String serverFQDN,
                               int serverPort,
                               SSLClientHelper.Callback callback)
    • Method Detail

      • setTruststoreDetails

        @Deprecated
        public static void setTruststoreDetails​(java.lang.String absPathToTruststore,
                                                char[] tsPassword)
                                         throws java.lang.IllegalArgumentException,
                                                EncryptedObjectException
        Sets the details about the trust store to be used.
        Parameters:
        absPathToTruststore - Absolute path to the trust store file
        tsPassword - Trust store password as char array.
        Throws:
        java.lang.IllegalArgumentException - if the trust store path is null or empty
        EncryptedObjectException - if the EncryptedObject for the password encounters some problem
      • setKeystoreDetails

        @Deprecated
        public static void setKeystoreDetails​(java.lang.String absPathToKeystore,
                                              char[] ksPassword)
                                       throws java.lang.IllegalArgumentException,
                                              EncryptedObjectException
        Sets the details about the client key store to be used. Note that the password array will be cleared before this method returns.
        Parameters:
        absPathToKeystore - Absolute path to the key store file
        ksPassword - Key store password as char array. Will be cleared before this method returns
        Throws:
        java.lang.IllegalArgumentException - if the key store path is null or empty
        EncryptedObjectException - if the EncryptedObject for the password encounters some problem
      • validatePath

        public static boolean validatePath()
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • clientConnectToServer

        public void clientConnectToServer()
        Helper method to determine whether a secure connection can be made to a server at a specified port. Connection details are provided during instantiation. Note that this method does not automatically connect to the server. It requires a callback instance to report success or failure.