Package com.tangosol.net.ssl
Interface KeyStoreLoader
- All Known Implementing Classes:
AbstractKeyStoreLoader
,EmptyKeyStoreLoader
,URLKeyStoreLoader
public interface KeyStoreLoader
A class that can create a
KeyStore
.- Since:
- 22.06
- Author:
- Jonathan Knight 2020.01.25
-
Method Summary
Modifier and TypeMethodDescriptiondefault KeyStore
createKeyStore
(String sType) Create aKeyStore
of the specified type.default boolean
default boolean
Returntrue
if theKeyStore
loaded previously by this loader should be refreshed.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 Details
-
load
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
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
-