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

lutoff
05.14.2007 21ee5a44d30731fef7efe5744667d3acf44823cf
- remove useless test
- fix a buf (we don't need bindDN if client side authentication is required)
1 files modified
44 ■■■■■ changed files
opends/src/server/org/opends/server/tools/dsconfig/LDAPManagementContextFactory.java 44 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/LDAPManagementContextFactory.java
@@ -207,8 +207,6 @@
        }
      }
      if (secureConnection)
      {
        if (useSSL || useStartTSL)
        {
          // Get truststore info
@@ -217,7 +215,7 @@
          // Check if we need client side authentication
          keyManager = getKeyManager();
        }
      }
      // Get the LDAP host.
      String hostName = secureArgsList.hostNameArg.getValue();
      final String tmpHostName = hostName;
@@ -326,37 +324,53 @@
      // Get the LDAP bind credentials.
      String bindDN = secureArgsList.bindDnArg.getValue();
      final String tmpBindDN = bindDN;
      if (app.isInteractive() && (keyManager == null)
          && !secureArgsList.bindDnArg.isPresent())
      if (keyManager == null)
      {
        if (!isHeadingDisplayed) {
        if (app.isInteractive() && !secureArgsList.bindDnArg.isPresent())
        {
          if (!isHeadingDisplayed)
          {
          app.println();
          app.println();
          app.println(INFO_DSCFG_HEADING_CONNECTION_PARAMETERS.get());
          isHeadingDisplayed = true;
        }
        ValidationCallback<String> callback = new ValidationCallback<String>() {
          ValidationCallback<String> callback = new ValidationCallback<String>()
          {
          public String validate(ConsoleApplication app, String input)
              throws CLIException {
                throws CLIException
            {
            String ninput = input.trim();
            if (ninput.length() == 0) {
              if (ninput.length() == 0)
              {
              return tmpBindDN;
            } else {
              }
              else
              {
              return ninput;
            }
          }
        };
        try {
          try
          {
          app.println();
          bindDN = app.readValidatedInput(
              INFO_DSCFG_PROMPT_BIND_DN.get(bindDN), callback);
        } catch (CLIException e) {
          throw ArgumentExceptionFactory.unableToReadConnectionParameters(e);
            bindDN = app.readValidatedInput(INFO_DSCFG_PROMPT_BIND_DN
                .get(bindDN), callback);
        }
          catch (CLIException e)
          {
            throw ArgumentExceptionFactory
                .unableToReadConnectionParameters(e);
          }
        }
      }
      else
      {
        bindDN = null ;
      }
      String bindPassword = secureArgsList.bindPasswordArg.getValue();