Package org.wildfly.security.keystore
Class FilteringKeyStore
- java.lang.Object
-
- java.security.KeyStore
-
- org.wildfly.security.keystore.FilteringKeyStore
-
public class FilteringKeyStore extends KeyStore
AKeyStoreimplementation that can wrap another key store instance and filter which aliases can actually be returned.- Author:
- Darran Lofthouse
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.security.KeyStore
KeyStore.Builder, KeyStore.CallbackHandlerProtection, KeyStore.Entry, KeyStore.LoadStoreParameter, KeyStore.PasswordProtection, KeyStore.PrivateKeyEntry, KeyStore.ProtectionParameter, KeyStore.SecretKeyEntry, KeyStore.TrustedCertificateEntry
-
-
Constructor Summary
Constructors Modifier Constructor Description privateFilteringKeyStore(KeyStoreSpi keyStoreSpi, Provider provider, String type)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KeyStorefilteringKeyStore(KeyStore toWrap, Predicate<String> aliasPredicate)Wrap an existing initialisedKeyStorewith an wrapper to filter which aliases can be returned.-
Methods inherited from class java.security.KeyStore
aliases, containsAlias, deleteEntry, entryInstanceOf, getCertificate, getCertificateAlias, getCertificateChain, getCreationDate, getDefaultType, getEntry, getInstance, getInstance, getInstance, getInstance, getInstance, getKey, getProvider, getType, isCertificateEntry, isKeyEntry, load, load, setCertificateEntry, setEntry, setKeyEntry, setKeyEntry, size, store, store
-
-
-
-
Constructor Detail
-
FilteringKeyStore
private FilteringKeyStore(KeyStoreSpi keyStoreSpi, Provider provider, String type)
-
-
Method Detail
-
filteringKeyStore
public static KeyStore filteringKeyStore(KeyStore toWrap, Predicate<String> aliasPredicate) throws NoSuchAlgorithmException, CertificateException, IOException
Wrap an existing initialisedKeyStorewith an wrapper to filter which aliases can be returned.- Parameters:
toWrap- theKeyStoreto wrap.- Returns:
- the filtering wrapper around the
KeyStore - Throws:
NoSuchAlgorithmExceptionCertificateExceptionIOExceptionIllegalArgumentException- if theKeyStorebeing wrapped isnull
-
-