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

jvergara
03.35.2007 2406449c5f0309525bfd5d86de417b32bcc7c1b3
opends/src/guitools/org/opends/guitools/statuspanel/StatusCli.java
@@ -382,6 +382,7 @@
                LOG.log(Level.WARNING, "Error reading config file: "+ce, ce);
                printLineBreak();
                printErrorMessage(ERR_COULD_NOT_FIND_VALID_LDAPURL.get());
                printLineBreak();
                useSSL = confirm(INFO_CLI_USESSL_PROMPT.get(), useSSL);
                if (!useSSL)
                {
@@ -399,7 +400,7 @@
                  String usedUrl = ConnectionUtils.getLDAPUrl(host, port,
                      useSSL);
                  if (!promptForCertificateConfirmation(ne, getTrustManager(),
                      usedUrl))
                      usedUrl, getTrustManager()))
                  {
                    cancelled = true;
                  }
@@ -1209,31 +1210,4 @@
  {
    return argParser.getTrustManager();
  }
  /**
   * Returns the ConnectionPolicy to be used with the parameters provided
   * by the user.
   * @param useSSL whether the user asked to use SSL or not.
   * @param useStartTLS whether the user asked to use Start TLS or not.
   * @return the ConnectionPolicy to be used with the parameters provided
   * by the user.
   */
  private ConnectionProtocolPolicy getConnectionPolicy(boolean useSSL,
      boolean useStartTLS)
  {
    ConnectionProtocolPolicy policy;
    if (useStartTLS)
    {
      policy = ConnectionProtocolPolicy.USE_STARTTLS;
    }
    if (useSSL)
    {
      policy = ConnectionProtocolPolicy.USE_LDAPS;
    }
    else
    {
      policy = ConnectionProtocolPolicy.USE_LESS_SECURE_AVAILABLE;
    }
    return policy;
  }
}