R
- Type of resource from which the KeyPair
is generatedpublic abstract class AbstractResourceKeyPairProvider<R> extends AbstractKeyPairProvider
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractResourceKeyPairProvider.KeyPairIterator |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.security.KeyPair> |
cacheMap |
private FilePasswordProvider |
passwordFinder |
log
ECDSA_SHA2_NISTP256, ECDSA_SHA2_NISTP384, ECDSA_SHA2_NISTP521, EMPTY_KEYPAIR_PROVIDER, SSH_DSS, SSH_ED25519, SSH_RSA
EMPTY_KEYS_PROVIDER, LOADER
Modifier | Constructor and Description |
---|---|
protected |
AbstractResourceKeyPairProvider() |
Modifier and Type | Method and Description |
---|---|
protected java.security.KeyPair |
doLoadKey(R resource) |
protected java.security.KeyPair |
doLoadKey(java.lang.String resourceKey,
java.io.InputStream inputStream,
FilePasswordProvider provider) |
protected java.security.KeyPair |
doLoadKey(java.lang.String resourceKey,
R resource,
FilePasswordProvider provider) |
FilePasswordProvider |
getPasswordFinder() |
protected java.lang.Iterable<java.security.KeyPair> |
loadKeys(java.util.Collection<? extends R> resources) |
protected abstract java.io.InputStream |
openKeyPairResource(java.lang.String resourceKey,
R resource) |
protected void |
resetCacheMap(java.util.Collection<?> resources)
Checks which of the new resources we already loaded and can keep the
associated key pair
|
void |
setPasswordFinder(FilePasswordProvider passwordFinder) |
getSimplifiedLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getKeyTypes, loadKey, wrap, wrap
iterableOf, iteratorOf, iteratorOf, iteratorOf, loadKeys, multiProvider, multiProvider, providerOf, resolveKeyIdentityProvider, wrapKeyPairs, wrapKeyPairs
private FilePasswordProvider passwordFinder
private final java.util.Map<java.lang.String,java.security.KeyPair> cacheMap
public FilePasswordProvider getPasswordFinder()
public void setPasswordFinder(FilePasswordProvider passwordFinder)
protected void resetCacheMap(java.util.Collection<?> resources)
resources
- The collection of new resources - can be null
/empty
in which case the cache is clearedprotected java.lang.Iterable<java.security.KeyPair> loadKeys(java.util.Collection<? extends R> resources)
protected java.security.KeyPair doLoadKey(R resource) throws java.io.IOException, java.security.GeneralSecurityException
java.io.IOException
java.security.GeneralSecurityException
protected java.security.KeyPair doLoadKey(java.lang.String resourceKey, R resource, FilePasswordProvider provider) throws java.io.IOException, java.security.GeneralSecurityException
java.io.IOException
java.security.GeneralSecurityException
protected abstract java.io.InputStream openKeyPairResource(java.lang.String resourceKey, R resource) throws java.io.IOException
java.io.IOException
protected java.security.KeyPair doLoadKey(java.lang.String resourceKey, java.io.InputStream inputStream, FilePasswordProvider provider) throws java.io.IOException, java.security.GeneralSecurityException
java.io.IOException
java.security.GeneralSecurityException