Package org.wildfly.security.keystore
Class ModifyTrackingKeyStore
- java.lang.Object
-
- java.security.KeyStore
-
- org.wildfly.security.keystore.ModifyTrackingKeyStore
-
public class ModifyTrackingKeyStore extends KeyStore
AKeyStoreimplementation that tracks if it's contents have been modified through the API since the last load / save.- 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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisModified()Identify if the KeyStore has been modified through this implementation since the last call to save or load.static ModifyTrackingKeyStoremodifyTrackingKeyStore(KeyStore toWrap)Wrap an existing initialisedKeyStorewith a wrapper to track if it is modified.voidsetModified(boolean modified)Mark this as being modified, this can be used where the delegate is delibaratly modified outside this wrapper.-
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
-
-
-
-
Method Detail
-
modifyTrackingKeyStore
public static ModifyTrackingKeyStore modifyTrackingKeyStore(KeyStore toWrap) throws NoSuchAlgorithmException, CertificateException, IOException
Wrap an existing initialisedKeyStorewith a wrapper to track if it is modified.- Parameters:
toWrap- theKeyStoreto wrap- Returns:
- the wrapper around the
KeyStore - Throws:
NoSuchAlgorithmException- if the keystore could not be loaded due to a missing algorithmCertificateException- if the keystore could not be loaded due to a certificate problemIOException- if the keystore could not be loaded due to an I/O problemIllegalArgumentException- if theKeyStorebeing wrapped isnull
-
isModified
public boolean isModified()
Identify if the KeyStore has been modified through this implementation since the last call to save or load.- Returns:
trueif theKeyStorehas been modified,falseotherwise.
-
setModified
public void setModified(boolean modified)
Mark this as being modified, this can be used where the delegate is delibaratly modified outside this wrapper.
-
-