com.maverick.sshd.components.standalone
Class StandaloneServerComponentManager

java.lang.Object
  extended by com.maverick.sshd.components.ServerComponentManager
      extended by com.maverick.sshd.components.standalone.StandaloneServerComponentManager

public class StandaloneServerComponentManager
extends ServerComponentManager

Standalone component manager provides a ServerComponentManager implementation that uses the internal cryptographic provider.

Author:
Lee David Painter

Constructor Summary
StandaloneServerComponentManager()
           
 
Method Summary
 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.
 SshDsaPublicKey createDsaPublicKey()
          Create an uninitialized instance of a DSA public key.
 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.
 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.
 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.
 SshRsaPrivateKey createRsaPrivateKey(java.math.BigInteger modulus, java.math.BigInteger privateExponent)
          Create an RSA private key from RSA parameters
 SshRsaPublicKey createRsaPublicKey(java.math.BigInteger modulus, java.math.BigInteger publicExponent, int version)
          Create an instance of an RSA public key from RSA parameters.
 SshRsaPublicKey createSsh2RsaPublicKey()
          Create an uninitialized instance of an RSA public key
 SshKeyPair generateDsaKeyPair(int bits)
          Generate a DSA key pair.
 SshKeyPair generateRsaKeyPair(int bits)
          Generate an RSA key pair.
 SshSecureRandomGenerator getRND()
          Get the secure number generator implementation.
protected  void initializeDigestFactory(ComponentFactory digests)
          Initialize the digest factory.
 void initializeHmacFactory(ComponentFactory hmacs)
          Initialize the SSH2 HMac factory.
protected  void initializeKeyExchangeFactory(ComponentFactory keyexchange)
          Initialize the key exchange factory.
 void initializePublicKeyFactory(ComponentFactory publickeys)
          Initialize the public key factory.
 void initializeSsh2CipherFactory(ComponentFactory ciphers)
          Initialize the SSH2 cipher factory.
 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.
 
Methods inherited from class com.maverick.sshd.components.ServerComponentManager
getInstance, getPerContextAlgorithmPreferences, init, setInstance, setPerContextAlgorithmPreferences, supportedDigests, supportedHMacsCS, supportedHMacsSC, supportedKeyExchanges, supportedPublicKeys, supportedSsh2CiphersCS, supportedSsh2CiphersSC
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandaloneServerComponentManager

public StandaloneServerComponentManager()
Method Detail

getRND

public SshSecureRandomGenerator getRND()
Description copied from class: ServerComponentManager
Get the secure number generator implementation.

Specified by:
getRND in class ServerComponentManager
Returns:
SshSecureRandomGenerator

createDsaPublicKey

public SshDsaPublicKey createDsaPublicKey(java.math.BigInteger p,
                                          java.math.BigInteger q,
                                          java.math.BigInteger g,
                                          java.math.BigInteger y)
Description copied from class: ServerComponentManager
Create an instance of an DSA public key.

Specified by:
createDsaPublicKey in class ServerComponentManager
Returns:
SshDsaPublicKey

createDsaPublicKey

public SshDsaPublicKey createDsaPublicKey()
Description copied from class: ServerComponentManager
Create an uninitialized instance of a DSA public key.

Specified by:
createDsaPublicKey in class ServerComponentManager
Returns:
SshDsaPublicKey

createRsaPublicKey

public SshRsaPublicKey createRsaPublicKey(java.math.BigInteger modulus,
                                          java.math.BigInteger publicExponent,
                                          int version)
Description copied from class: ServerComponentManager
Create an instance of an RSA public key from RSA parameters.

Specified by:
createRsaPublicKey in class ServerComponentManager
Returns:
SshRsaPublicKey

createSsh2RsaPublicKey

public SshRsaPublicKey createSsh2RsaPublicKey()
                                       throws SshException
Description copied from class: ServerComponentManager
Create an uninitialized instance of an RSA public key

Specified by:
createSsh2RsaPublicKey in class ServerComponentManager
Returns:
SshRsaPublicKey
Throws:
SshException

initializeSsh2CipherFactory

public void initializeSsh2CipherFactory(ComponentFactory ciphers)
Description copied from class: ServerComponentManager
Initialize the SSH2 cipher factory.

Specified by:
initializeSsh2CipherFactory in class ServerComponentManager

initializeHmacFactory

public void initializeHmacFactory(ComponentFactory hmacs)
Description copied from class: ServerComponentManager
Initialize the SSH2 HMac factory.

Specified by:
initializeHmacFactory in class ServerComponentManager

initializePublicKeyFactory

public void initializePublicKeyFactory(ComponentFactory publickeys)
Description copied from class: ServerComponentManager
Initialize the public key factory.

Specified by:
initializePublicKeyFactory in class ServerComponentManager

initializeKeyExchangeFactory

protected void initializeKeyExchangeFactory(ComponentFactory keyexchange)
Description copied from class: ServerComponentManager
Initialize the key exchange factory.

Specified by:
initializeKeyExchangeFactory in class ServerComponentManager

createDsaPrivateKey

public SshDsaPrivateKey createDsaPrivateKey(java.math.BigInteger p,
                                            java.math.BigInteger q,
                                            java.math.BigInteger g,
                                            java.math.BigInteger x,
                                            java.math.BigInteger y)
Description copied from class: ServerComponentManager
Create a DSA private key from DSA parameters.

Specified by:
createDsaPrivateKey in class ServerComponentManager
Returns:
SshDsaPrivateKey

createRsaPrivateCrtKey

public 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)
Description copied from class: ServerComponentManager
Create a RSA co-efficient key from RSA parameters.

Specified by:
createRsaPrivateCrtKey in class ServerComponentManager
Returns:
SshRsaPrivateCrtKey

createRsaPrivateCrtKey

public 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)
Description copied from class: ServerComponentManager
Create an RSA co-efficient key from RSA parameters.

Specified by:
createRsaPrivateCrtKey in class ServerComponentManager
Returns:
SshRsaPrivateCrtKey

createRsaPrivateKey

public SshRsaPrivateKey createRsaPrivateKey(java.math.BigInteger modulus,
                                            java.math.BigInteger privateExponent)
Description copied from class: ServerComponentManager
Create an RSA private key from RSA parameters

Specified by:
createRsaPrivateKey in class ServerComponentManager
Returns:
SshRsaPrivateKey

generateDsaKeyPair

public SshKeyPair generateDsaKeyPair(int bits)
Description copied from class: ServerComponentManager
Generate a DSA key pair.

Specified by:
generateDsaKeyPair in class ServerComponentManager
Returns:
SshKeyPair

generateRsaKeyPair

public SshKeyPair generateRsaKeyPair(int bits)
Description copied from class: ServerComponentManager
Generate an RSA key pair.

Specified by:
generateRsaKeyPair in class ServerComponentManager
Returns:
SshKeyPair

initializeDigestFactory

protected void initializeDigestFactory(ComponentFactory digests)
Description copied from class: ServerComponentManager
Initialize the digest factory.

Specified by:
initializeDigestFactory in class ServerComponentManager

loadKeystore

public void loadKeystore(java.io.File keystoreFile,
                         java.lang.String alias,
                         java.lang.String storePassphrase,
                         java.lang.String keyPassphrase,
                         SshContext context)
                  throws java.io.IOException
Description copied from class: ServerComponentManager
Load a host key from a keystore file.

Specified by:
loadKeystore in class ServerComponentManager
Throws:
java.io.IOException


Copyright © 2003-2004 3SP LTD. All Rights Reserved.