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

neil_a_wilson
09.34.2006 cf0d8eb6ed26074e63cc39fa72072bd6173bdba6
Update the LDAPPasswordModify tool to expose the "--useStartTLS" option so that
the StartTLS capability can actually be used. Also, change the order of
evaluation for an argument validation check to make testing easier.

OpenDS Issue Number: 769
1 files modified
20 ■■■■■ changed files
opends/src/server/org/opends/server/tools/LDAPPasswordModify.java 20 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/LDAPPasswordModify.java
@@ -270,6 +270,7 @@
      useStartTLS = new BooleanArgument("usestarttls", 'q', "useStartTLS",
                             MSGID_LDAPPWMOD_DESCRIPTION_USE_STARTTLS);
      argParser.addArgument(useStartTLS);
      sslBlindTrust =
@@ -410,15 +411,6 @@
    }
    else
    {
      if (! (authzID.isPresent() && currentPW.isPresent()))
      {
        int    msgID   = MSGID_LDAPPWMOD_ANON_REQUIRES_AUTHZID_AND_CURRENTPW;
        String message = getMessage(msgID);
        err.println(wrapText(message, MAX_LINE_WIDTH));
        err.println(argParser.getUsage());
        return 1;
      }
      if (provideDNForAuthzID.isPresent())
      {
        int    msgID   = MSGID_LDAPPWMOD_DEPENDENT_ARGS;
@@ -429,6 +421,16 @@
        err.println(argParser.getUsage());
        return 1;
      }
      if (! (authzID.isPresent() &&
             (currentPW.isPresent() || currentPWFile.isPresent())))
      {
        int    msgID   = MSGID_LDAPPWMOD_ANON_REQUIRES_AUTHZID_AND_CURRENTPW;
        String message = getMessage(msgID);
        err.println(wrapText(message, MAX_LINE_WIDTH));
        err.println(argParser.getUsage());
        return 1;
      }
    }