| | |
| | | * |
| | | * |
| | | * Copyright 2007-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.admin.client.cli; |
| | |
| | | import javax.net.ssl.KeyManager; |
| | | |
| | | import org.opends.admin.ads.util.ApplicationTrustManager; |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.util.PasswordReader; |
| | |
| | | * should be treated in a case-sensitive manner. |
| | | */ |
| | | protected SecureConnectionCliParser(String mainClassName, |
| | | Message toolDescription, boolean longArgumentsCaseSensitive) |
| | | LocalizableMessage toolDescription, boolean longArgumentsCaseSensitive) |
| | | { |
| | | super(mainClassName, toolDescription, longArgumentsCaseSensitive); |
| | | } |
| | |
| | | // read the password from the stdin. |
| | | try |
| | | { |
| | | out.write(INFO_LDAPAUTH_PASSWORD_PROMPT.get(dn).getBytes()); |
| | | out.write(INFO_LDAPAUTH_PASSWORD_PROMPT.get(dn).toString().getBytes()); |
| | | out.flush(); |
| | | char[] pwChars = PasswordReader.readPassword(); |
| | | bindPasswordValue = new String(pwChars); |
| | |
| | | /** |
| | | * Indication if provided global options are validate. |
| | | * |
| | | * @param buf the MessageBuilder to write the error messages. |
| | | * @param buf the LocalizableMessageBuilder to write the error messages. |
| | | * @return return code. |
| | | */ |
| | | public int validateGlobalOptions(MessageBuilder buf) |
| | | public int validateGlobalOptions(LocalizableMessageBuilder buf) |
| | | { |
| | | int ret = secureArgsList.validateGlobalOptions(buf) ; |
| | | |
| | |
| | | if (noPropertiesFileArg.isPresent() |
| | | && propertiesFileArg.isPresent()) |
| | | { |
| | | Message message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | LocalizableMessage message = ERR_TOOL_CONFLICTING_ARGS.get( |
| | | noPropertiesFileArg.getLongIdentifier(), propertiesFileArg |
| | | .getLongIdentifier()); |
| | | if (buf.length() > 0) |
| | |
| | | */ |
| | | public int validateGlobalOptions(PrintStream err) |
| | | { |
| | | MessageBuilder buf = new MessageBuilder(); |
| | | LocalizableMessageBuilder buf = new LocalizableMessageBuilder(); |
| | | int returnValue = validateGlobalOptions(buf); |
| | | if (buf.length() > 0) |
| | | { |