| | |
| | | package org.opends.server.tools; |
| | | |
| | | import static com.forgerock.opendj.cli.CliMessages.INFO_FILE_PLACEHOLDER; |
| | | import static com.forgerock.opendj.cli.Utils.*; |
| | | import static com.forgerock.opendj.cli.CommonArguments.*; |
| | | import static com.forgerock.opendj.cli.Utils.*; |
| | | |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.messages.ToolMessages.INFO_CONFIGFILE_PLACEHOLDER; |
| | | import static org.opends.messages.ToolMessages.INFO_DESCRIPTION_CONFIG_FILE; |
| | | import static org.opends.server.protocols.ldap.LDAPResultCode.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | import org.opends.server.loggers.JDKLogging; |
| | | import org.opends.server.schema.AuthPasswordSyntax; |
| | | import org.opends.server.schema.UserPasswordSyntax; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.NullOutputStream; |
| | | import org.opends.server.util.BuildVersion; |
| | | |
| | | import com.forgerock.opendj.cli.ArgumentException; |
| | |
| | | |
| | | if (clearPW == null) |
| | | { |
| | | clearPW = getClearPW(out, err, argParser, clearPassword, |
| | | clearPasswordFile, interactivePassword); |
| | | clearPW = getClearPW(err, argParser, clearPassword, clearPasswordFile, interactivePassword); |
| | | if (clearPW == null) |
| | | { |
| | | return OPERATIONS_ERROR; |
| | |
| | | |
| | | if (clearPW == null) |
| | | { |
| | | clearPW = getClearPW(out, err, argParser, clearPassword, |
| | | clearPasswordFile, interactivePassword); |
| | | clearPW = getClearPW(err, argParser, clearPassword, clearPasswordFile, interactivePassword); |
| | | if (clearPW == null) |
| | | { |
| | | return OPERATIONS_ERROR; |
| | |
| | | { |
| | | if (clearPW == null) |
| | | { |
| | | clearPW = getClearPW(out, err, argParser, clearPassword, |
| | | clearPasswordFile, interactivePassword); |
| | | clearPW = getClearPW(err, argParser, clearPassword, clearPasswordFile, interactivePassword); |
| | | if (clearPW == null) |
| | | { |
| | | return OPERATIONS_ERROR; |
| | |
| | | { |
| | | if (clearPW == null) |
| | | { |
| | | clearPW = getClearPW(out, err, argParser, clearPassword, |
| | | clearPasswordFile, interactivePassword); |
| | | clearPW = getClearPW(err, argParser, clearPassword, clearPasswordFile, interactivePassword); |
| | | if (clearPW == null) |
| | | { |
| | | return OPERATIONS_ERROR; |
| | |
| | | |
| | | /** |
| | | * Get the clear password. |
| | | * @param out The output to ask password. |
| | | * @param err The error output. |
| | | * @param argParser The argument parser. |
| | | * @param clearPassword the clear password |
| | |
| | | * interactively. |
| | | * @return the password or null if an error occurs. |
| | | */ |
| | | private static ByteString getClearPW(PrintStream out, PrintStream err, |
| | | private static ByteString getClearPW(PrintStream err, |
| | | ArgumentParser argParser, StringArgument clearPassword, |
| | | FileBasedArgument clearPasswordFile, BooleanArgument interactivePassword) |
| | | { |