Package org.wildfly.security.keystore
Class ModifyTrackingKeyStoreSpi
- java.lang.Object
-
- java.security.KeyStoreSpi
-
- org.wildfly.security.keystore.DelegatingKeyStoreSpi
-
- org.wildfly.security.keystore.ModifyTrackingKeyStoreSpi
-
class ModifyTrackingKeyStoreSpi extends DelegatingKeyStoreSpi
TheKeyStoreSpiimplementation to track modifications.- Author:
- Darran Lofthouse
-
-
Field Summary
Fields Modifier and Type Field Description private KeyStoredelegateprivate booleaninitialisedprivate booleanmodified
-
Constructor Summary
Constructors Constructor Description ModifyTrackingKeyStoreSpi(KeyStore delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidengineDeleteEntry(String alias)voidengineLoad(InputStream stream, char[] password)voidengineSetCertificateEntry(String alias, Certificate cert)voidengineSetKeyEntry(String alias, byte[] key, Certificate[] chain)voidengineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain)voidengineStore(OutputStream stream, char[] password)protected KeyStoregetKeyStore()(package private) booleanisModified()Identify if the KeyStore has been modified through this implementation since the last call to save or load.(package private) voidsetModified(boolean modified)Set the modified flag for thisKeyStore.-
Methods inherited from class org.wildfly.security.keystore.DelegatingKeyStoreSpi
engineAliases, engineContainsAlias, engineGetCertificate, engineGetCertificateAlias, engineGetCertificateChain, engineGetCreationDate, engineGetKey, engineIsCertificateEntry, engineIsKeyEntry, engineSize
-
Methods inherited from class java.security.KeyStoreSpi
engineEntryInstanceOf, engineGetEntry, engineLoad, engineProbe, engineSetEntry, engineStore
-
-
-
-
Field Detail
-
delegate
private final KeyStore delegate
-
initialised
private volatile boolean initialised
-
modified
private volatile boolean modified
-
-
Constructor Detail
-
ModifyTrackingKeyStoreSpi
ModifyTrackingKeyStoreSpi(KeyStore delegate)
-
-
Method Detail
-
engineSetKeyEntry
public void engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain) throws KeyStoreException
- Overrides:
engineSetKeyEntryin classDelegatingKeyStoreSpi- Throws:
KeyStoreException
-
engineSetKeyEntry
public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) throws KeyStoreException
- Overrides:
engineSetKeyEntryin classDelegatingKeyStoreSpi- Throws:
KeyStoreException
-
engineSetCertificateEntry
public void engineSetCertificateEntry(String alias, Certificate cert) throws KeyStoreException
- Overrides:
engineSetCertificateEntryin classDelegatingKeyStoreSpi- Throws:
KeyStoreException
-
engineDeleteEntry
public void engineDeleteEntry(String alias) throws KeyStoreException
- Overrides:
engineDeleteEntryin classDelegatingKeyStoreSpi- Throws:
KeyStoreException
-
engineStore
public void engineStore(OutputStream stream, char[] password) throws IOException, NoSuchAlgorithmException, CertificateException
- Overrides:
engineStorein classDelegatingKeyStoreSpi- Throws:
IOExceptionNoSuchAlgorithmExceptionCertificateException
-
engineLoad
public void engineLoad(InputStream stream, char[] password) throws IOException, NoSuchAlgorithmException, CertificateException
- Overrides:
engineLoadin classDelegatingKeyStoreSpi- Throws:
IOExceptionNoSuchAlgorithmExceptionCertificateException
-
isModified
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
void setModified(boolean modified)
Set the modified flag for thisKeyStore.- Parameters:
modified- the new value of the flag
-
getKeyStore
protected KeyStore getKeyStore()
- Specified by:
getKeyStorein classDelegatingKeyStoreSpi
-
-