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.lang.Iterable<java.security.KeyPair>> |
cacheMap |
private FilePasswordProvider |
passwordFinder |
log
ECDSA_SHA2_NISTP256, ECDSA_SHA2_NISTP384, ECDSA_SHA2_NISTP521, EMPTY_KEYPAIR_PROVIDER, SSH_DSS, SSH_DSS_CERT, SSH_ECDSA_SHA2_NISTP256_CERT, SSH_ECDSA_SHA2_NISTP384_CERT, SSH_ECDSA_SHA2_NISTP521_CERT, SSH_ED25519, SSH_ED25519_CERT, SSH_RSA, SSH_RSA_CERT
EMPTY_KEYS_PROVIDER
Modifier | Constructor and Description |
---|---|
protected |
AbstractResourceKeyPairProvider() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Iterable<java.security.KeyPair> |
doLoadKeys(SessionContext session,
NamedResource resourceKey,
java.io.InputStream inputStream,
FilePasswordProvider provider) |
protected java.lang.Iterable<java.security.KeyPair> |
doLoadKeys(SessionContext session,
NamedResource resourceKey,
R resource,
FilePasswordProvider provider) |
protected java.lang.Iterable<java.security.KeyPair> |
doLoadKeys(SessionContext session,
R resource) |
protected IoResource<?> |
getIoResource(SessionContext session,
R resource) |
FilePasswordProvider |
getPasswordFinder() |
protected java.lang.Iterable<java.security.KeyPair> |
loadKeys(SessionContext session,
java.util.Collection<? extends R> resources) |
protected java.io.InputStream |
openKeyPairResource(SessionContext session,
NamedResource 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) |
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getKeyTypes, loadKey, wrap, wrap
exhaustCurrentIdentities, isEmpty, iterableOf, loadKeys, multiProvider, multiProvider, resolveKeyIdentityProvider, wrapKeyPairs, wrapKeyPairs
private FilePasswordProvider passwordFinder
private final java.util.Map<java.lang.String,java.lang.Iterable<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(SessionContext session, java.util.Collection<? extends R> resources)
protected IoResource<?> getIoResource(SessionContext session, R resource)
protected java.lang.Iterable<java.security.KeyPair> doLoadKeys(SessionContext session, R resource) throws java.io.IOException, java.security.GeneralSecurityException
java.io.IOException
java.security.GeneralSecurityException
protected java.lang.Iterable<java.security.KeyPair> doLoadKeys(SessionContext session, NamedResource resourceKey, R resource, FilePasswordProvider provider) throws java.io.IOException, java.security.GeneralSecurityException
java.io.IOException
java.security.GeneralSecurityException
protected java.io.InputStream openKeyPairResource(SessionContext session, NamedResource resourceKey, R resource) throws java.io.IOException
java.io.IOException
protected java.lang.Iterable<java.security.KeyPair> doLoadKeys(SessionContext session, NamedResource resourceKey, java.io.InputStream inputStream, FilePasswordProvider provider) throws java.io.IOException, java.security.GeneralSecurityException
java.io.IOException
java.security.GeneralSecurityException