public class FileKeyPairProvider extends AbstractResourceKeyPairProvider<java.nio.file.Path>
KeyPair
result is cached and
not re-loaded.AbstractResourceKeyPairProvider.KeyPairIterator
Modifier and Type | Field and Description |
---|---|
private java.util.Collection<? extends java.nio.file.Path> |
files |
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
Constructor and Description |
---|
FileKeyPairProvider() |
FileKeyPairProvider(java.util.Collection<? extends java.nio.file.Path> files) |
FileKeyPairProvider(java.nio.file.Path... files) |
FileKeyPairProvider(java.nio.file.Path path) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Iterable<java.security.KeyPair> |
doLoadKeys(SessionContext session,
java.nio.file.Path resource) |
protected IoResource<java.nio.file.Path> |
getIoResource(SessionContext session,
java.nio.file.Path resource) |
java.util.Collection<? extends java.nio.file.Path> |
getPaths() |
java.lang.Iterable<java.security.KeyPair> |
loadKeys(SessionContext session)
Load available keys.
|
void |
setPaths(java.util.Collection<? extends java.nio.file.Path> paths) |
doLoadKeys, doLoadKeys, getPasswordFinder, loadKeys, openKeyPairResource, resetCacheMap, setPasswordFinder
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, multiProvider, multiProvider, resolveKeyIdentityProvider, wrapKeyPairs, wrapKeyPairs
public FileKeyPairProvider()
public FileKeyPairProvider(java.nio.file.Path path)
public FileKeyPairProvider(java.nio.file.Path... files)
public FileKeyPairProvider(java.util.Collection<? extends java.nio.file.Path> files)
public java.util.Collection<? extends java.nio.file.Path> getPaths()
public void setPaths(java.util.Collection<? extends java.nio.file.Path> paths)
public java.lang.Iterable<java.security.KeyPair> loadKeys(SessionContext session)
KeyIdentityProvider
session
- The SessionContext
for invoking this load command - may be null
if not invoked within a session context (e.g., offline tool or session unknown).Iterable
instance of available keys - ignored if null
protected IoResource<java.nio.file.Path> getIoResource(SessionContext session, java.nio.file.Path resource)
getIoResource
in class AbstractResourceKeyPairProvider<java.nio.file.Path>
protected java.lang.Iterable<java.security.KeyPair> doLoadKeys(SessionContext session, java.nio.file.Path resource) throws java.io.IOException, java.security.GeneralSecurityException
doLoadKeys
in class AbstractResourceKeyPairProvider<java.nio.file.Path>
java.io.IOException
java.security.GeneralSecurityException