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
TheKeyStoreSpi
implementation to track modifications.- Author:
- Darran Lofthouse
-
-
Field Summary
Fields Modifier and Type Field Description private KeyStore
delegate
private boolean
initialised
private boolean
modified
-
Constructor Summary
Constructors Constructor Description ModifyTrackingKeyStoreSpi(KeyStore delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
engineDeleteEntry(String alias)
void
engineLoad(InputStream stream, char[] password)
void
engineSetCertificateEntry(String alias, Certificate cert)
void
engineSetKeyEntry(String alias, byte[] key, Certificate[] chain)
void
engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain)
void
engineStore(OutputStream stream, char[] password)
protected KeyStore
getKeyStore()
(package private) boolean
isModified()
Identify if the KeyStore has been modified through this implementation since the last call to save or load.(package private) void
setModified(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:
engineSetKeyEntry
in classDelegatingKeyStoreSpi
- Throws:
KeyStoreException
-
engineSetKeyEntry
public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) throws KeyStoreException
- Overrides:
engineSetKeyEntry
in classDelegatingKeyStoreSpi
- Throws:
KeyStoreException
-
engineSetCertificateEntry
public void engineSetCertificateEntry(String alias, Certificate cert) throws KeyStoreException
- Overrides:
engineSetCertificateEntry
in classDelegatingKeyStoreSpi
- Throws:
KeyStoreException
-
engineDeleteEntry
public void engineDeleteEntry(String alias) throws KeyStoreException
- Overrides:
engineDeleteEntry
in classDelegatingKeyStoreSpi
- Throws:
KeyStoreException
-
engineStore
public void engineStore(OutputStream stream, char[] password) throws IOException, NoSuchAlgorithmException, CertificateException
- Overrides:
engineStore
in classDelegatingKeyStoreSpi
- Throws:
IOException
NoSuchAlgorithmException
CertificateException
-
engineLoad
public void engineLoad(InputStream stream, char[] password) throws IOException, NoSuchAlgorithmException, CertificateException
- Overrides:
engineLoad
in classDelegatingKeyStoreSpi
- Throws:
IOException
NoSuchAlgorithmException
CertificateException
-
isModified
boolean isModified()
Identify if the KeyStore has been modified through this implementation since the last call to save or load.- Returns:
true
if theKeyStore
has been modified,false
otherwise
-
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:
getKeyStore
in classDelegatingKeyStoreSpi
-
-