Package org.apache.camel.component.ssh
Class ResourceHelperKeyPairProvider
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.common.keyprovider.AbstractKeyPairProvider
-
- org.apache.camel.component.ssh.ResourceHelperKeyPairProvider
-
- All Implemented Interfaces:
org.apache.sshd.common.keyprovider.KeyIdentityProvider,org.apache.sshd.common.keyprovider.KeyPairProvider
public class ResourceHelperKeyPairProvider extends org.apache.sshd.common.keyprovider.AbstractKeyPairProviderThis host key provider loads private keys from the specified resources usingResourceHelper, and Camel's resource syntax for file:, classpath:, and http:.ResourceHelper, and Camel's resource syntax for file:, classpath:, and http:. Note that this class has a direct dependency on BouncyCastle and won't work unless it has been correctly registered as a security provider.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Loggerlog-
Fields inherited from interface org.apache.sshd.common.keyprovider.KeyIdentityProvider
EMPTY_KEYS_PROVIDER
-
Fields 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
Constructors Constructor Description ResourceHelperKeyPairProvider()ResourceHelperKeyPairProvider(String[] resources, Supplier<char[]> passwordFinder, org.apache.camel.CamelContext camelContext)ResourceHelperKeyPairProvider(String[] resources, org.apache.camel.CamelContext camelContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.CamelContextgetCamelContext()Supplier<char[]>getPasswordFinder()String[]getResources()Iterable<KeyPair>loadKeys(org.apache.sshd.common.session.SessionContext sessionContext)voidsetCamelContext(org.apache.camel.CamelContext camelContext)voidsetPasswordFinder(Supplier<char[]> passwordFinder)voidsetResources(String[] resources)-
Methods 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, warn
-
-
-
-
Constructor Detail
-
ResourceHelperKeyPairProvider
public ResourceHelperKeyPairProvider()
-
ResourceHelperKeyPairProvider
public ResourceHelperKeyPairProvider(String[] resources, org.apache.camel.CamelContext camelContext)
-
-
Method Detail
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext)
-
getResources
public String[] getResources()
-
setResources
public void setResources(String[] resources)
-
getPasswordFinder
public Supplier<char[]> getPasswordFinder()
-
setPasswordFinder
public void setPasswordFinder(Supplier<char[]> passwordFinder)
-
loadKeys
public Iterable<KeyPair> loadKeys(org.apache.sshd.common.session.SessionContext sessionContext) throws IOException, GeneralSecurityException
- Throws:
IOExceptionGeneralSecurityException
-
-