Package com.tangosol.net.ssl
Interface KeyStoreLoader
-
- All Known Implementing Classes:
AbstractKeyStoreLoader
,EmptyKeyStoreLoader
,URLKeyStoreLoader
public interface KeyStoreLoader
A class that can create aKeyStore
.- Since:
- 22.06
- Author:
- Jonathan Knight 2020.01.25
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default KeyStore
createKeyStore(String sType)
Create aKeyStore
of the specified type.default boolean
isEnabled()
default boolean
isRefreshable()
Returntrue
if theKeyStore
loaded previously by this loader should be refreshed.KeyStore
load(String sType, PasswordProvider password)
Load a namedKeyStore
.default KeyStore
load(String sType, PasswordProvider password, Certificate[] aCert)
default KeyStore
load(String sType, PasswordProvider password, PrivateKey key, PasswordProvider keyPassword, Certificate[] aCert)
-
-
-
Method Detail
-
load
KeyStore load(String sType, PasswordProvider password) throws GeneralSecurityException, IOException
Load a namedKeyStore
.- Parameters:
sType
- theKeyStore
typepassword
- an optionalPasswordProvider
for theKeyStore
password- Returns:
- the
KeyStore
ornull
if no key could be loaded - Throws:
GeneralSecurityException
IOException
-
isEnabled
default boolean isEnabled()
- Returns:
true
if thisKeyStoreLoader
is enabled, orfalse
ifKeyStoreLoader
should not be used
-
isRefreshable
default boolean isRefreshable()
Returntrue
if theKeyStore
loaded previously by this loader should be refreshed.- Returns:
- the default implementation always returns
true
-
createKeyStore
default KeyStore createKeyStore(String sType) throws GeneralSecurityException, IOException
Create aKeyStore
of the specified type.- Parameters:
sType
- the type of theKeyStore
to create- Returns:
- a
KeyStore
of the specified type - Throws:
GeneralSecurityException
IOException
-
load
default KeyStore load(String sType, PasswordProvider password, PrivateKey key, PasswordProvider keyPassword, Certificate[] aCert) throws GeneralSecurityException, IOException
- Parameters:
sType
- theKeyStore
typepassword
- an optionalPasswordProvider
for theKeyStore
passwordkey
- an optionalPrivateKey
to load into theKeyStore
keyPassword
- an optionalPasswordProvider
for thePrivateKey
passwordaCert
- an optional array ofcerts
to load into theKeyStore
- Returns:
- the
KeyStore
ornull
if no key could be loaded - Throws:
GeneralSecurityException
IOException
-
load
default KeyStore load(String sType, PasswordProvider password, Certificate[] aCert) throws GeneralSecurityException, IOException
- Parameters:
sType
- theKeyStore
typepassword
- an optionalPasswordProvider
for theKeyStore
passwordaCert
- an array ofcerts
to load into theKeyStore
- Returns:
- the
KeyStore
ornull
if no key could be loaded - Throws:
GeneralSecurityException
IOException
-
-