Package com.helger.security.keystore
Interface IKeyStoreType
-
- All Superinterfaces:
com.helger.commons.id.IHasID<String>
- All Known Implementing Classes:
EKeyStoreType
public interface IKeyStoreType extends com.helger.commons.id.IHasID<String>
Base interface for the different types of key stores (like JKS or PKCS12).- Since:
- 9.0.0
- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default KeyStoregetKeyStore()default KeyStoregetKeyStore(String sProvider)default KeyStoregetKeyStore(Provider aProvider)default booleanisKeyStorePathRequired()Determines, if a key store path is required for loading the key store.
-
-
-
Method Detail
-
getKeyStore
@Nonnull default KeyStore getKeyStore() throws KeyStoreException
- Returns:
- A Key store object of this type. Never
null. - Throws:
KeyStoreException- if no Provider supports a KeyStoreSpi implementation for the specified type.
-
isKeyStorePathRequired
default boolean isKeyStorePathRequired()
Determines, if a key store path is required for loading the key store. Note: the default value is only contained to be backwards compatible.- Returns:
true, if a path must be present- Since:
- 11.0.3
-
getKeyStore
@Nonnull default KeyStore getKeyStore(@Nonnull @Nonempty String sProvider) throws KeyStoreException, NoSuchProviderException
- Parameters:
sProvider- Security provider to be used. E.g. for BouncyCastle. May neither benullnor empty.- Returns:
- A Key store object of this type. Never
null. - Throws:
KeyStoreException- if no Provider supports a KeyStoreSpi implementation for the specified type.NoSuchProviderException- if the specified provider is not registered in the security provider list.
-
getKeyStore
@Nonnull default KeyStore getKeyStore(@Nonnull Provider aProvider) throws KeyStoreException
- Parameters:
aProvider- Security provider to be used. E.g. for BouncyCastle. May not benull.- Returns:
- A Key store object of this type. Never
null. - Throws:
KeyStoreException- if no Provider supports a KeyStoreSpi implementation for the specified type.
-
-