Package org.wildfly.security.keystore
Class WrappingPasswordKeyStoreSpiImpl
- java.lang.Object
-
- java.security.KeyStoreSpi
-
- org.wildfly.security.keystore.DelegatingKeyStoreSpi
-
- org.wildfly.security.keystore.WrappingPasswordKeyStoreSpiImpl
-
final class WrappingPasswordKeyStoreSpiImpl extends DelegatingKeyStoreSpi
-
-
Constructor Summary
Constructors Constructor Description WrappingPasswordKeyStoreSpiImpl(KeyStore delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static Password
decoded(SecretKey key)
private static SecretKey
encoded(Password password)
boolean
engineEntryInstanceOf(String alias, Class<? extends KeyStore.Entry> entryClass)
Certificate
engineGetCertificate(String alias)
String
engineGetCertificateAlias(Certificate cert)
Certificate[]
engineGetCertificateChain(String alias)
KeyStore.Entry
engineGetEntry(String alias, KeyStore.ProtectionParameter protParam)
Key
engineGetKey(String alias, char[] password)
boolean
engineIsCertificateEntry(String alias)
void
engineSetCertificateEntry(String alias, Certificate cert)
void
engineSetEntry(String alias, KeyStore.Entry entry, KeyStore.ProtectionParameter protParam)
void
engineSetKeyEntry(String alias, byte[] key, Certificate[] chain)
void
engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain)
protected KeyStore
getKeyStore()
-
Methods inherited from class org.wildfly.security.keystore.DelegatingKeyStoreSpi
engineAliases, engineContainsAlias, engineDeleteEntry, engineGetCreationDate, engineIsKeyEntry, engineLoad, engineSize, engineStore
-
Methods inherited from class java.security.KeyStoreSpi
engineLoad, engineProbe, engineStore
-
-
-
-
Field Detail
-
delegate
private final KeyStore delegate
-
-
Constructor Detail
-
WrappingPasswordKeyStoreSpiImpl
WrappingPasswordKeyStoreSpiImpl(KeyStore delegate)
-
-
Method Detail
-
engineGetKey
public Key engineGetKey(String alias, char[] password) throws NoSuchAlgorithmException, UnrecoverableKeyException
- Overrides:
engineGetKey
in classDelegatingKeyStoreSpi
- Throws:
NoSuchAlgorithmException
UnrecoverableKeyException
-
engineGetCertificateChain
public Certificate[] engineGetCertificateChain(String alias)
- Overrides:
engineGetCertificateChain
in classDelegatingKeyStoreSpi
-
engineGetCertificate
public Certificate engineGetCertificate(String alias)
- Overrides:
engineGetCertificate
in classDelegatingKeyStoreSpi
-
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
-
engineGetEntry
public KeyStore.Entry engineGetEntry(String alias, KeyStore.ProtectionParameter protParam) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableEntryException
- Overrides:
engineGetEntry
in classKeyStoreSpi
- Throws:
KeyStoreException
NoSuchAlgorithmException
UnrecoverableEntryException
-
engineSetEntry
public void engineSetEntry(String alias, KeyStore.Entry entry, KeyStore.ProtectionParameter protParam) throws KeyStoreException
- Overrides:
engineSetEntry
in classKeyStoreSpi
- Throws:
KeyStoreException
-
engineEntryInstanceOf
public boolean engineEntryInstanceOf(String alias, Class<? extends KeyStore.Entry> entryClass)
- Overrides:
engineEntryInstanceOf
in classKeyStoreSpi
-
engineIsCertificateEntry
public boolean engineIsCertificateEntry(String alias)
- Overrides:
engineIsCertificateEntry
in classDelegatingKeyStoreSpi
-
engineGetCertificateAlias
public String engineGetCertificateAlias(Certificate cert)
- Overrides:
engineGetCertificateAlias
in classDelegatingKeyStoreSpi
-
encoded
private static SecretKey encoded(Password password) throws InvalidKeyException
- Throws:
InvalidKeyException
-
getKeyStore
protected KeyStore getKeyStore()
- Specified by:
getKeyStore
in classDelegatingKeyStoreSpi
-
-