Class CertificateUtilities


  • public class CertificateUtilities
    extends Object
    Class containing some certificate utilities methods
    • Constructor Detail

      • CertificateUtilities

        public CertificateUtilities()
    • Method Detail

      • getSecurityCertificates

        public static Certificate[] getSecurityCertificates​(String host,
                                                            String port)
        Parameters:
        host - the host
        port - the port
        Returns:
        array with all server-side certificates obtained from direct socket connection
      • createKeyStoreFile

        public static Properties createKeyStoreFile​(Certificate cert,
                                                    String fullKeyStorePath,
                                                    String keyStorePassword,
                                                    String keyStoreType)
        Create keystore file
        Parameters:
        cert - the needed certificate for creating the keystore
        keyStoreFullPath - the full path where the keystore file will be located
        keyStoreType - the type of the keystore file
        keyStorePassword - the the password for the keystore TIP: if the keystoreFullPath, keyStoreType, keyStorePassword are empty we will set the default
        Returns:
        Properties object with the keyStore location, type and password