Class CachingKeyPairProvider
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.keyprovider.AbstractKeyPairProvider
org.apache.sshd.common.keyprovider.AbstractResourceKeyPairProvider<Path>
org.apache.sshd.common.keyprovider.FileKeyPairProvider
org.eclipse.jgit.internal.transport.sshd.CachingKeyPairProvider
- All Implemented Interfaces:
Iterable<KeyPair>,org.apache.sshd.common.keyprovider.KeyIdentityProvider,org.apache.sshd.common.keyprovider.KeyPairProvider
public class CachingKeyPairProvider
extends org.apache.sshd.common.keyprovider.FileKeyPairProvider
implements Iterable<KeyPair>
A
FileKeyPairProvider that uses an external KeyCache.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.sshd.common.keyprovider.AbstractResourceKeyPairProvider
org.apache.sshd.common.keyprovider.AbstractResourceKeyPairProvider.KeyPairIterator -
Field Summary
FieldsFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
logFields inherited from interface org.apache.sshd.common.keyprovider.KeyIdentityProvider
EMPTY_KEYS_PROVIDERFields inherited from interface org.apache.sshd.common.keyprovider.KeyPairProvider
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 -
Constructor Summary
ConstructorsConstructorDescriptionCachingKeyPairProvider(List<Path> paths, KeyCache cache) Creates a newCachingKeyPairProviderusing the givenKeyCache. -
Method Summary
Modifier and TypeMethodDescriptioniterator()iterator(org.apache.sshd.common.session.SessionContext session) private KeyPairprivate KeyPairloadKey(org.apache.sshd.common.session.SessionContext session, org.apache.sshd.common.NamedResource resource, Path path, org.apache.sshd.common.config.keys.FilePasswordProvider passwordProvider) loadKeys(org.apache.sshd.common.session.SessionContext session) Methods inherited from class org.apache.sshd.common.keyprovider.FileKeyPairProvider
doLoadKeys, getIoResource, getPaths, setPathsMethods inherited from class org.apache.sshd.common.keyprovider.AbstractResourceKeyPairProvider
doLoadKeys, doLoadKeys, getPasswordFinder, loadKeys, openKeyPairResource, resetCacheMap, setPasswordFinderMethods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.apache.sshd.common.keyprovider.KeyPairProvider
getKeyTypes, loadKey
-
Field Details
-
cache
-
-
Constructor Details
-
CachingKeyPairProvider
Creates a newCachingKeyPairProviderusing the givenKeyCache. If the cache isnull, this is a simpleFileKeyPairProvider.- Parameters:
paths- to load keys fromcache- to use, may benullif no external caching is desired
-
-
Method Details
-
iterator
-
iterator
-
loadKeys
- Specified by:
loadKeysin interfaceorg.apache.sshd.common.keyprovider.KeyIdentityProvider- Overrides:
loadKeysin classorg.apache.sshd.common.keyprovider.FileKeyPairProvider
-
loadKey
private KeyPair loadKey(org.apache.sshd.common.session.SessionContext session, Path path) throws IOException, GeneralSecurityException - Throws:
IOExceptionGeneralSecurityException
-
loadKey
private KeyPair loadKey(org.apache.sshd.common.session.SessionContext session, org.apache.sshd.common.NamedResource resource, Path path, org.apache.sshd.common.config.keys.FilePasswordProvider passwordProvider) throws IOException, GeneralSecurityException - Throws:
IOExceptionGeneralSecurityException
-