Class KeystoreUtils


  • public class KeystoreUtils
    extends Object
    A collection of key store and trust store related utility methods.
    • Constructor Detail

      • KeystoreUtils

        public KeystoreUtils()
    • Method Detail

      • getExtensionByFileType

        public static String getExtensionByFileType​(String fileType)
        Get the file extension for give store file type (ex: .jks, .p12).
        Returns:
        File extension.
      • getFileTypeByExtension

        public static String getFileTypeByExtension​(String extension)
                                             throws CarbonException
        Get the file type for give store file extension (ex: JKS, PKCS12).
        Returns:
        File type.
        Throws:
        CarbonException
      • getKeyStoreFileLocation

        public static String getKeyStoreFileLocation​(String tenantDomain)
        Retrieve keystore file location.
        Returns:
        File location.
      • getKeyStoreFileType

        public static String getKeyStoreFileType​(String tenantDomain)
        Retrieve keystore file type (ex: JKS, PKCS12).
        Parameters:
        tenantDomain - Tenant domain the keystore need to be resolved.
        Returns:
        File type.
      • getKeyStoreFileExtension

        public static String getKeyStoreFileExtension​(String tenantDomain)
        Retrieve keystore file extension (ex: .jks, .p12).
        Returns:
        File extension.
      • getTrustStoreFileLocation

        public static String getTrustStoreFileLocation()
        Retrieve truststore file location.
        Returns:
        File location.
      • getTrustStoreFileType

        public static String getTrustStoreFileType()
        Retrieve truststore file type (ex: JKS, PKCS12).
        Returns:
        File type.
      • getTrustStoreFileExtension

        public static String getTrustStoreFileExtension()
        Retrieve truststore file extension (ex: .jks, .p12).
        Returns:
        File extension.