|
|||||||||
| 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
StandaloneServerComponentManager
which uses internal algorithm implementations and the
JCEServerComponentManager that uses
the Java runtime JCE provider(s) algorithm implementations.
If both component managers are available on the classpath then the standalone version will be selected. Jar files have been provided that contain both:
| Constructor Summary | |
|---|---|
ServerComponentManager()
|
|
| Method Summary | |
|---|---|
abstract SshDsaPrivateKey |
createDsaPrivateKey(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g,
java.math.BigInteger x,
java.math.BigInteger y)
Create a DSA private key from DSA parameters. |
abstract SshDsaPublicKey |
createDsaPublicKey()
Create an uninitialized instance of a DSA public key. |
abstract SshDsaPublicKey |
createDsaPublicKey(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g,
java.math.BigInteger y)
Create an instance of an DSA public key. |
abstract SshRsaPrivateCrtKey |
createRsaPrivateCrtKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent,
java.math.BigInteger privateExponent,
java.math.BigInteger primeP,
java.math.BigInteger primeQ,
java.math.BigInteger crtCoefficient)
Create a RSA co-efficient key from RSA parameters. |
abstract SshRsaPrivateCrtKey |
createRsaPrivateCrtKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent,
java.math.BigInteger privateExponent,
java.math.BigInteger primeP,
java.math.BigInteger primeQ,
java.math.BigInteger primeExponentP,
java.math.BigInteger primeExponentQ,
java.math.BigInteger crtCoefficient)
Create an RSA co-efficient key from RSA parameters. |
abstract SshRsaPrivateKey |
createRsaPrivateKey(java.math.BigInteger modulus,
java.math.BigInteger privateExponent)
Create an RSA private key from RSA parameters |
abstract SshRsaPublicKey |
createRsaPublicKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent,
int version)
Create an instance of an RSA public key from RSA parameters. |
abstract SshRsaPublicKey |
createSsh2RsaPublicKey()
Create an uninitialized instance of an RSA public key |
abstract SshKeyPair |
generateDsaKeyPair(int bits)
Generate a DSA key pair. |
abstract SshKeyPair |
generateRsaKeyPair(int bits)
Generate an RSA key pair. |
static ServerComponentManager |
getInstance()
Get the installed component manager. |
static boolean |
getPerContextAlgorithmPreferences()
|
abstract SshSecureRandomGenerator |
getRND()
Get the secure number generator implementation. |
protected void |
init()
|
protected abstract void |
initializeDigestFactory(ComponentFactory digests)
Initialize the digest factory. |
protected abstract void |
initializeHmacFactory(ComponentFactory hmacs)
Initialize the SSH2 HMac factory. |
protected abstract void |
initializeKeyExchangeFactory(ComponentFactory keyexchange)
Initialize the key exchange factory. |
protected abstract void |
initializePublicKeyFactory(ComponentFactory publickeys)
Initialize the public key factory. |
protected abstract void |
initializeSsh2CipherFactory(ComponentFactory ciphers)
Initialize the SSH2 cipher factory. |
abstract void |
loadKeystore(java.io.File keystoreFile,
java.lang.String alias,
java.lang.String storePassphrase,
java.lang.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. |
static void |
setPerContextAlgorithmPreferences(boolean enable)
|
ComponentFactory |
supportedDigests()
Return the supported digest factory. |
ComponentFactory |
supportedHMacsCS()
Return the supported SSH2 HMac factory. |
ComponentFactory |
supportedHMacsSC()
|
ComponentFactory |
supportedKeyExchanges()
Return the supported SSH2 key exchanges. |
ComponentFactory |
supportedPublicKeys()
Return the supported public key factory. |
ComponentFactory |
supportedSsh2CiphersCS()
Return the supported SSH2 cipher factory. |
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 void setPerContextAlgorithmPreferences(boolean enable)
public static boolean getPerContextAlgorithmPreferences()
public static ServerComponentManager getInstance()
public static void setInstance(ServerComponentManager instance)
instance - protected void init()
protected abstract void initializeSsh2CipherFactory(ComponentFactory ciphers)
ciphers - protected abstract void initializeHmacFactory(ComponentFactory hmacs)
hmacs - protected abstract void initializePublicKeyFactory(ComponentFactory publickeys)
publickeys - protected abstract void initializeKeyExchangeFactory(ComponentFactory keyexchange)
keyexchange - protected abstract void initializeDigestFactory(ComponentFactory digests)
digests - public ComponentFactory supportedSsh2CiphersCS()
public ComponentFactory supportedSsh2CiphersSC()
public ComponentFactory supportedHMacsCS()
public ComponentFactory supportedHMacsSC()
public ComponentFactory supportedKeyExchanges()
public ComponentFactory supportedPublicKeys()
public ComponentFactory supportedDigests()
public abstract SshKeyPair generateRsaKeyPair(int bits)
throws SshException
bits - version -
SshException
public abstract SshRsaPublicKey createRsaPublicKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent,
int version)
throws SshException
modulus - publicExponent - version -
SshException
public abstract SshRsaPublicKey createSsh2RsaPublicKey()
throws SshException
SshException
public abstract SshRsaPrivateKey createRsaPrivateKey(java.math.BigInteger modulus,
java.math.BigInteger privateExponent)
throws SshException
modulus - privateExponent -
SshException
public abstract SshRsaPrivateCrtKey createRsaPrivateCrtKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent,
java.math.BigInteger privateExponent,
java.math.BigInteger primeP,
java.math.BigInteger primeQ,
java.math.BigInteger crtCoefficient)
throws SshException
modulus - publicExponent - privateExponent - primeP - primeQ - crtCoefficient -
SshException
public abstract SshRsaPrivateCrtKey createRsaPrivateCrtKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent,
java.math.BigInteger privateExponent,
java.math.BigInteger primeP,
java.math.BigInteger primeQ,
java.math.BigInteger primeExponentP,
java.math.BigInteger primeExponentQ,
java.math.BigInteger crtCoefficient)
throws SshException
modulus - publicExponent - privateExponent - primeP - primeQ - primeExponentP - primeExponentQ - crtCoefficient -
SshException
public abstract SshKeyPair generateDsaKeyPair(int bits)
throws SshException
bits -
SshException
public abstract SshDsaPublicKey createDsaPublicKey(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g,
java.math.BigInteger y)
throws SshException
p - q - g - y -
SshExceptionpublic abstract SshDsaPublicKey createDsaPublicKey()
public abstract SshDsaPrivateKey createDsaPrivateKey(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g,
java.math.BigInteger x,
java.math.BigInteger y)
throws SshException
p - q - g - x - y -
SshException
public abstract SshSecureRandomGenerator getRND()
throws SshException
SshException
public abstract void loadKeystore(java.io.File keystoreFile,
java.lang.String alias,
java.lang.String storePassphrase,
java.lang.String keyPassphrase,
SshContext context)
throws java.io.IOException
keystoreFile - alias - storePassphrase - keyPassphrase -
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||