mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
28.01.2007 d3a10338d643cf04e89e577ba496c547e0bf7516
opends/src/server/org/opends/server/tools/SSLConnectionFactory.java
@@ -41,6 +41,7 @@
import javax.net.ssl.TrustManagerFactory;
import org.opends.server.extensions.BlindTrustManagerProvider;
import org.opends.server.util.SelectableCertificateKeyManager;
import static org.opends.server.messages.ToolMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -74,6 +75,7 @@
   * @param  keyStorePath        The path to the key store file.
   * @param  keyStorePassword    The PIN to use to access the key store
   *                             contents.
   * @param  clientAlias         The alias to use for the client certificate.
   * @param  trustStorePath      The path to the trust store file.
   * @param  trustStorePassword  The PIN to use to access the trust store
   *                             contents.
@@ -82,7 +84,7 @@
   *                                  connection factory.
   */
  public void init(boolean trustAll, String keyStorePath,
                   String keyStorePassword,
                   String keyStorePassword, String clientAlias,
                   String trustStorePath, String trustStorePassword)
         throws SSLConnectionException
  {
@@ -108,6 +110,12 @@
      {
        keyManagers = getKeyManagers(KeyStore.getDefaultType(), null,
                          keyStorePath, keyStorePassword);
        if (clientAlias != null)
        {
          keyManagers = SelectableCertificateKeyManager.wrap(keyManagers,
                                                             clientAlias);
        }
      }
      ctx.init(keyManagers, trustManagers, new java.security.SecureRandom());