|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.maverick.sshd.components.ServerComponentManager
public abstract class ServerComponentManager
An abstract class that manages the components used by the SSH API. All
algorithm implementations are obtained through a single provider. Two
implementations are provided, the
com.maverick.sshd.components.standalone.StandaloneServerComponentManager
which uses internal algorithm implementations and the
com.maverick.sshd.components.jce.JCEServerComponentManager that uses
the Java runtime JCE provider(s) algorithm implementations.
If both component managers are available on the classpath then the JCE version will be selected. Jar files have been provided that contain both:
| Constructor Summary | |
|---|---|
ServerComponentManager()
|
|
| Method Summary | |
|---|---|
abstract com.maverick.ssh.components.SshDsaPrivateKey |
createDsaPrivateKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger x,
BigInteger y)
Create a DSA private key from DSA parameters. |
abstract com.maverick.ssh.components.SshDsaPublicKey |
createDsaPublicKey()
Create an uninitialized instance of a DSA public key. |
abstract com.maverick.ssh.components.SshDsaPublicKey |
createDsaPublicKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger y)
Create an instance of an DSA public key. |
abstract com.maverick.ssh.components.SshRsaPrivateCrtKey |
createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger crtCoefficient)
Create a RSA co-efficient key from RSA parameters. |
abstract com.maverick.ssh.components.SshRsaPrivateCrtKey |
createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger primeExponentP,
BigInteger primeExponentQ,
BigInteger crtCoefficient)
Create an RSA co-efficient key from RSA parameters. |
abstract com.maverick.ssh.components.SshRsaPrivateKey |
createRsaPrivateKey(BigInteger modulus,
BigInteger privateExponent)
Create an RSA private key from RSA parameters |
abstract com.maverick.ssh.components.SshRsaPublicKey |
createRsaPublicKey(BigInteger modulus,
BigInteger publicExponent,
int version)
Create an instance of an RSA public key from RSA parameters. |
abstract com.maverick.ssh.components.SshRsaPublicKey |
createSsh2RsaPublicKey()
Create an uninitialized instance of an RSA public key |
abstract com.maverick.ssh.components.SshKeyPair |
generateDsaKeyPair(int bits)
Generate a DSA key pair. |
abstract com.maverick.ssh.components.SshKeyPair |
generateRsaKeyPair(int bits)
Generate an RSA key pair. |
static ServerComponentManager |
getInstance()
Get the installed component manager. |
abstract com.maverick.ssh.components.SshSecureRandomGenerator |
getRND()
Get the secure number generator implementation. |
protected void |
init()
|
protected abstract void |
initializeDigestFactory(com.maverick.ssh.components.ComponentFactory digests)
Initialize the digest factory. |
protected abstract void |
initializeHmacFactory(com.maverick.ssh.components.ComponentFactory hmacs)
Initialize the SSH2 HMac factory. |
protected abstract void |
initializeKeyExchangeFactory(com.maverick.ssh.components.ComponentFactory keyexchange)
Initialize the key exchange factory. |
protected abstract void |
initializePublicKeyFactory(com.maverick.ssh.components.ComponentFactory publickeys)
Initialize the public key factory. |
protected abstract void |
initializeSsh2CipherFactory(com.maverick.ssh.components.ComponentFactory ciphers)
Initialize the SSH2 cipher factory. |
abstract void |
loadKeystore(File keystoreFile,
String alias,
String storePassphrase,
String keyPassphrase,
SshContext context)
Load a host key from a keystore file. |
static void |
setInstance(ServerComponentManager instance)
Override the installed component manager with an alternative implementation. |
com.maverick.ssh.components.ComponentFactory |
supportedDigests()
Return the supported digest factory. |
com.maverick.ssh.components.ComponentFactory |
supportedHMacsCS()
Return the supported SSH2 HMac factory. |
com.maverick.ssh.components.ComponentFactory |
supportedHMacsSC()
|
com.maverick.ssh.components.ComponentFactory |
supportedKeyExchanges()
Return the supported SSH2 key exchanges. |
com.maverick.ssh.components.ComponentFactory |
supportedPublicKeys()
Return the supported public key factory. |
com.maverick.ssh.components.ComponentFactory |
supportedSsh2CiphersCS()
Return the supported SSH2 cipher factory. |
com.maverick.ssh.components.ComponentFactory |
supportedSsh2CiphersSC()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServerComponentManager()
| Method Detail |
|---|
public static ServerComponentManager getInstance()
public static void setInstance(ServerComponentManager instance)
instance -
protected void init()
throws com.maverick.ssh.SshException
com.maverick.ssh.SshExceptionprotected abstract void initializeSsh2CipherFactory(com.maverick.ssh.components.ComponentFactory ciphers)
ciphers - protected abstract void initializeHmacFactory(com.maverick.ssh.components.ComponentFactory hmacs)
hmacs - protected abstract void initializePublicKeyFactory(com.maverick.ssh.components.ComponentFactory publickeys)
publickeys - protected abstract void initializeKeyExchangeFactory(com.maverick.ssh.components.ComponentFactory keyexchange)
keyexchange - protected abstract void initializeDigestFactory(com.maverick.ssh.components.ComponentFactory digests)
digests - public com.maverick.ssh.components.ComponentFactory supportedSsh2CiphersCS()
public com.maverick.ssh.components.ComponentFactory supportedSsh2CiphersSC()
public com.maverick.ssh.components.ComponentFactory supportedHMacsCS()
public com.maverick.ssh.components.ComponentFactory supportedHMacsSC()
public com.maverick.ssh.components.ComponentFactory supportedKeyExchanges()
public com.maverick.ssh.components.ComponentFactory supportedPublicKeys()
public com.maverick.ssh.components.ComponentFactory supportedDigests()
public abstract com.maverick.ssh.components.SshKeyPair generateRsaKeyPair(int bits)
throws com.maverick.ssh.SshException
bits - version -
com.maverick.ssh.SshException
public abstract com.maverick.ssh.components.SshRsaPublicKey createRsaPublicKey(BigInteger modulus,
BigInteger publicExponent,
int version)
throws com.maverick.ssh.SshException
modulus - publicExponent - version -
com.maverick.ssh.SshException
public abstract com.maverick.ssh.components.SshRsaPublicKey createSsh2RsaPublicKey()
throws com.maverick.ssh.SshException
com.maverick.ssh.SshException
public abstract com.maverick.ssh.components.SshRsaPrivateKey createRsaPrivateKey(BigInteger modulus,
BigInteger privateExponent)
throws com.maverick.ssh.SshException
modulus - privateExponent -
com.maverick.ssh.SshException
public abstract com.maverick.ssh.components.SshRsaPrivateCrtKey createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger crtCoefficient)
throws com.maverick.ssh.SshException
modulus - publicExponent - privateExponent - primeP - primeQ - crtCoefficient -
com.maverick.ssh.SshException
public abstract com.maverick.ssh.components.SshRsaPrivateCrtKey createRsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger primeExponentP,
BigInteger primeExponentQ,
BigInteger crtCoefficient)
throws com.maverick.ssh.SshException
modulus - publicExponent - privateExponent - primeP - primeQ - primeExponentP - primeExponentQ - crtCoefficient -
com.maverick.ssh.SshException
public abstract com.maverick.ssh.components.SshKeyPair generateDsaKeyPair(int bits)
throws com.maverick.ssh.SshException
bits -
com.maverick.ssh.SshException
public abstract com.maverick.ssh.components.SshDsaPublicKey createDsaPublicKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger y)
throws com.maverick.ssh.SshException
p - q - g - y -
com.maverick.ssh.SshExceptionpublic abstract com.maverick.ssh.components.SshDsaPublicKey createDsaPublicKey()
public abstract com.maverick.ssh.components.SshDsaPrivateKey createDsaPrivateKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger x,
BigInteger y)
throws com.maverick.ssh.SshException
p - q - g - x - y -
com.maverick.ssh.SshException
public abstract com.maverick.ssh.components.SshSecureRandomGenerator getRND()
throws com.maverick.ssh.SshException
com.maverick.ssh.SshException
public abstract void loadKeystore(File keystoreFile,
String alias,
String storePassphrase,
String keyPassphrase,
SshContext context)
throws IOException
keystoreFile - alias - storePassphrase - keyPassphrase -
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||