java.lang.Object
com.github.hypfvieh.util.SslTlsUtil
Helper class to setup SSL/TLS related settings.
- Since:
- 2016-10-14
- Author:
- hypfvieh
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetStoreTypeByFileName(File _file) Get the key/trust store 'type' by analyzing the filename extension.static KeyManager[]initializeKeyManagers(File _keyStoreFile, String _keyStorePassword, String _keyPassword) Initialization of keyStoreManager used to provide access to the configured keyStore.static TrustManager[]initializeTrustManagers(File _trustStoreFile, String _trustStorePassword) Initialization of trustStoreManager used to provide access to the configured trustStore.
-
Method Details
-
initializeTrustManagers
public static TrustManager[] initializeTrustManagers(File _trustStoreFile, String _trustStorePassword) throws IOException Initialization of trustStoreManager used to provide access to the configured trustStore.- Parameters:
_trustStoreFile- trust store file_trustStorePassword- trust store password- Returns:
- TrustManager array or null
- Throws:
IOException- on error
-
initializeKeyManagers
public static KeyManager[] initializeKeyManagers(File _keyStoreFile, String _keyStorePassword, String _keyPassword) throws IOException Initialization of keyStoreManager used to provide access to the configured keyStore.- Parameters:
_keyStoreFile- key store file_keyStorePassword- key store password_keyPassword- key password- Returns:
- KeyManager array or null
- Throws:
IOException- on error
-
getStoreTypeByFileName
Get the key/trust store 'type' by analyzing the filename extension.- Parameters:
_file- file- Returns:
- store type as string, defaults to JKS
-