Class SecurityManagerProviderImpl
java.lang.Object
com.github.toolarium.security.keystore.impl.SecurityManagerProviderImpl
- All Implemented Interfaces:
ISecurityManagerProvider
Implements
ISecurityManagerProvider.-
Constructor Summary
ConstructorsConstructorDescriptionSecurityManagerProviderImpl(KeyStore trustManagerStore, KeyStore keyManagerStore, com.github.toolarium.common.security.ISecuredValue<String> keyManagerStorePassword) Constructor for SecurityManagerImpl -
Method Summary
Modifier and TypeMethodDescriptionprotected KeyManager[]createKeyManager(KeyStore keyStore, com.github.toolarium.common.security.ISecuredValue<String> storePassword) Create aKeyManagerfor the given key storeprotected TrustManager[]createTrustManagers(KeyStore keyStore) Create aTrustManagerfor the given key store.Returns the key manager.Returns the trust manager.
-
Constructor Details
-
SecurityManagerProviderImpl
public SecurityManagerProviderImpl(KeyStore trustManagerStore, KeyStore keyManagerStore, com.github.toolarium.common.security.ISecuredValue<String> keyManagerStorePassword) Constructor for SecurityManagerImpl- Parameters:
trustManagerStore- the trust manager storekeyManagerStore- the key manager storekeyManagerStorePassword- the key manager store password- Throws:
IllegalArgumentException- In case of an invalid key manager store or password
-
-
Method Details
-
getTrustManagers
Description copied from interface:ISecurityManagerProviderReturns the trust manager.- Specified by:
getTrustManagersin interfaceISecurityManagerProvider- Returns:
- the trust managers
- Throws:
GeneralSecurityException- if it can not be initialized.- See Also:
-
getKeyManagers
Description copied from interface:ISecurityManagerProviderReturns the key manager.- Specified by:
getKeyManagersin interfaceISecurityManagerProvider- Returns:
- the key managers
- Throws:
GeneralSecurityException- if it can not be initialized.- See Also:
-
createKeyManager
protected KeyManager[] createKeyManager(KeyStore keyStore, com.github.toolarium.common.security.ISecuredValue<String> storePassword) throws GeneralSecurityException Create aKeyManagerfor the given key store- Parameters:
keyStore- The key storestorePassword- the store password- Returns:
- The key managers in the given key store
- Throws:
GeneralSecurityException- if the key store could not be loaded
-
createTrustManagers
Create aTrustManagerfor the given key store.- Parameters:
keyStore- The key store- Returns:
- The trust manager
- Throws:
GeneralSecurityException- if the creation failed
-