Package org.wso2.carbon.utils.security
Class KeystoreUtils
- java.lang.Object
-
- org.wso2.carbon.utils.security.KeystoreUtils
-
public class KeystoreUtils extends Object
A collection of key store and trust store related utility methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKeystoreUtils.StoreFileTypeA collection of file type extensions against the store file type.
-
Constructor Summary
Constructors Constructor Description KeystoreUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetExtensionByFileType(String fileType)Get the file extension for give store file type (ex: .jks, .p12).static StringgetFileTypeByExtension(String extension)Get the file type for give store file extension (ex: JKS, PKCS12).static StringgetKeyStoreFileExtension(String tenantDomain)Retrieve keystore file extension (ex: .jks, .p12).static StringgetKeyStoreFileLocation(String tenantDomain)Retrieve keystore file location.static StringgetKeyStoreFileType(String tenantDomain)Retrieve keystore file type (ex: JKS, PKCS12).static StringgetTrustStoreFileExtension()Retrieve truststore file extension (ex: .jks, .p12).static StringgetTrustStoreFileLocation()Retrieve truststore file location.static StringgetTrustStoreFileType()Retrieve truststore file type (ex: JKS, PKCS12).
-
-
-
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.
-
-