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

Yannick Lecaillez
01.59.2015 c9be76aa5748caa7e04fd35386eb08b5c40d968a
opendj-server-legacy/src/main/java/org/opends/server/util/CertificateManager.java
@@ -33,6 +33,7 @@
import java.util.Enumeration;
import org.forgerock.i18n.LocalizableMessage;
import static org.opends.messages.UtilityMessages.*;
import org.opends.server.util.Platform.KeyType;
/**
 * This class provides an interface for generating self-signed certificates and
@@ -249,6 +250,7 @@
  /**
   * Generates a self-signed certificate using the provided information.
   *
   * @param  keyType    Specifies the key size, key and signature algorithms.
   * @param  alias      The nickname to use for the certificate in the key
   *                    store.  For the server certificate, it should generally
   *                    be "server-cert".  It must not be {@code null} or empty.
@@ -263,7 +265,7 @@
   *                                 positive integer, or the alias is already
   *                                 in the keystore.
   */
  public void generateSelfSignedCertificate(String alias, String subjectDN,
  public void generateSelfSignedCertificate(KeyType keyType, String alias, String subjectDN,
                                            int validity)
  throws KeyStoreException, IllegalArgumentException {
    ensureValid(alias, CERT_ALIAS_MSG);
@@ -278,7 +280,7 @@
    }
    keyStore = null;
    Platform.generateSelfSignedCertificate(getKeyStore(), keyStoreType,
        keyStorePath, alias, password, subjectDN, validity);
        keyStorePath, keyType, alias, password, subjectDN, validity);
  }