Interface Config
- All Known Implementing Classes:
AndroidConfig, ConfigImpl, DefaultConfig, DefaultSecurityProviderConfig
public interface Config
Holds configuration information and factories. Acts a container for factories of
KeyExchange, Cipher,
Compression, MAC, Signature, Random, and FileKeyProvider.-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the list of named factories forCipher.Retrieve the list of named factories forCompression.Retrieve the list of named factories forFileKeyProvider.Retrieve the list of named factories forKeyAlgorithmRetrieve the list of named factories forKeyExchange.Retrieve the list of named factories forMAC.intRetrieve theRandomfactory.Returns the software version information for identification during SSH connection initialization.booleanReturns true if host key certificates should be verified while connecting to the server.booleanGets whether the client should first wait for a received server ident, before sending the client ident.voidsetCipherFactories(List<Factory.Named<Cipher>> cipherFactories) Set the named factories forCipher.voidsetCompressionFactories(List<Factory.Named<Compression>> compressionFactories) Set the named factories forCompression.voidsetFileKeyProviderFactories(List<Factory.Named<FileKeyProvider>> fileKeyProviderFactories) Set the named factories forFileKeyProvider.voidsetKeepAliveProvider(KeepAliveProvider keepAliveProvider) Set the provider that provides the keep-alive implementation.voidsetKeyAlgorithms(List<Factory.Named<KeyAlgorithm>> keyAlgorithms) Set the named factories forKeyAlgorithm.voidsetKeyExchangeFactories(List<Factory.Named<KeyExchange>> kexFactories) Set the named factories forKeyExchange.voidsetLoggerFactory(LoggerFactory loggerFactory) Sets the LoggerFactory to use.voidsetMACFactories(List<Factory.Named<MAC>> macFactories) Set the named factories forMAC.voidsetMaxCircularBufferSize(int maxCircularBufferSize) voidsetRandomFactory(Factory<Random> randomFactory) Set the factory forRandom.voidsetVerifyHostKeyCertificates(boolean value) Sets whether the SSH client should verify host key certificates or not.voidsetVersion(String version) Set the software version information for identification during SSH connection initialization.voidsetWaitForServerIdentBeforeSendingClientIdent(boolean waitForServerIdentBeforeSendingClientIdent) Sets whether the SSH client should wait for a received server ident, before sending the client ident.
-
Method Details
-
getCipherFactories
List<Factory.Named<Cipher>> getCipherFactories()Retrieve the list of named factories forCipher.- Returns:
- a list of named
Cipherfactories
-
getCompressionFactories
List<Factory.Named<Compression>> getCompressionFactories()Retrieve the list of named factories forCompression.- Returns:
- a list of named
Compressionfactories
-
getFileKeyProviderFactories
List<Factory.Named<FileKeyProvider>> getFileKeyProviderFactories()Retrieve the list of named factories forFileKeyProvider.- Returns:
- a list of named
FileKeyProviderfactories
-
getKeyExchangeFactories
List<Factory.Named<KeyExchange>> getKeyExchangeFactories()Retrieve the list of named factories forKeyExchange.- Returns:
- a list of named
KeyExchangefactories
-
getMACFactories
List<Factory.Named<MAC>> getMACFactories()Retrieve the list of named factories forMAC.- Returns:
- a list of named
MACfactories
-
getRandomFactory
-
getKeyAlgorithms
List<Factory.Named<KeyAlgorithm>> getKeyAlgorithms()Retrieve the list of named factories forKeyAlgorithm- Returns:
- a list of named
KeyAlgorithmfactories
-
getVersion
String getVersion()Returns the software version information for identification during SSH connection initialization. For example,"NET_3_0". -
isVerifyHostKeyCertificates
boolean isVerifyHostKeyCertificates()Returns true if host key certificates should be verified while connecting to the server. It is recommended to verify them, but can cause connection failures in cases when previous versions of the library could have managed to connect. -
setCipherFactories
Set the named factories forCipher.- Parameters:
cipherFactories- a list of named factories
-
setCompressionFactories
Set the named factories forCompression.- Parameters:
compressionFactories- a list of named factories
-
setFileKeyProviderFactories
Set the named factories forFileKeyProvider.- Parameters:
fileKeyProviderFactories- a list of named factories
-
setKeyExchangeFactories
Set the named factories forKeyExchange.- Parameters:
kexFactories- a list of named factories
-
setMACFactories
Set the named factories forMAC.- Parameters:
macFactories- a list of named factories
-
setRandomFactory
-
setKeyAlgorithms
Set the named factories forKeyAlgorithm.- Parameters:
keyAlgorithms- a list of named factories
-
setVersion
Set the software version information for identification during SSH connection initialization. For example,"SSHJ_0_1".- Parameters:
version- software version info
-
getKeepAliveProvider
KeepAliveProvider getKeepAliveProvider()- Returns:
- The provider that creates the keep-alive implementation of choice.
-
setKeepAliveProvider
Set the provider that provides the keep-alive implementation.- Parameters:
keepAliveProvider- keep-alive provider
-
isWaitForServerIdentBeforeSendingClientIdent
boolean isWaitForServerIdentBeforeSendingClientIdent()Gets whether the client should first wait for a received server ident, before sending the client ident. NB: This is non-standard behaviour, and can potentially deadlock if the server also waits on the client ident. The default value is set to false.- Returns:
- Whether to first wait for the server ident.
-
setWaitForServerIdentBeforeSendingClientIdent
void setWaitForServerIdentBeforeSendingClientIdent(boolean waitForServerIdentBeforeSendingClientIdent) Sets whether the SSH client should wait for a received server ident, before sending the client ident. NB: This is non-standard behaviour, and can potentially deadlock if the server also waits on the client ident.- Parameters:
waitForServerIdentBeforeSendingClientIdent- Whether to wait for the server ident.
-
setLoggerFactory
Sets the LoggerFactory to use. -
getLoggerFactory
LoggerFactory getLoggerFactory()- Returns:
- The LoggerFactory the SSHClient will use.
-
setVerifyHostKeyCertificates
void setVerifyHostKeyCertificates(boolean value) Sets whether the SSH client should verify host key certificates or not. SeeisVerifyHostKeyCertificates(). -
getMaxCircularBufferSize
int getMaxCircularBufferSize() -
setMaxCircularBufferSize
void setMaxCircularBufferSize(int maxCircularBufferSize)
-