| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | package org.opends.server.tools; |
| | | import org.opends.messages.Message; |
| | |
| | | PasswordPolicyStateExtendedOperation.*; |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.server.tools.ToolConstants.*; |
| | | import org.opends.server.util.EmbeddedUtils; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | StringArgument targetDN; |
| | | StringArgument trustStoreFile; |
| | | StringArgument trustStorePW; |
| | | BooleanArgument verbose; |
| | | |
| | | try |
| | | { |
| | |
| | | INFO_PWPSTATE_DESCRIPTION_TSPWFILE.get()); |
| | | argParser.addGlobalArgument(trustStorePWFile); |
| | | |
| | | verbose = new BooleanArgument("verbose", 'v', "verbose", |
| | | INFO_DESCRIPTION_VERBOSE.get()); |
| | | verbose.setPropertyName("verbose"); |
| | | argParser.addGlobalArgument(verbose); |
| | | |
| | | showUsage = new BooleanArgument( |
| | | "showusage", OPTION_SHORT_HELP, |
| | | OPTION_LONG_HELP, |
| | |
| | | // Get the target DN as a string for later use. |
| | | targetDNString = targetDN.getValue(); |
| | | |
| | | // Bootstrap and initialize directory data structures. |
| | | EmbeddedUtils.initializeForClientUse(); |
| | | |
| | | // Create the LDAP connection options object, which will be used to |
| | | // customize the way that we connect to the server and specify a set of |
| | | // basic defaults. |
| | | LDAPConnectionOptions connectionOptions = new LDAPConnectionOptions(); |
| | | connectionOptions.setVersionNumber(3); |
| | | |
| | | connectionOptions.setVerbose(verbose.isPresent()); |
| | | |
| | | // If both a bind password and bind password file were provided, then |
| | | // return an error. |
| | |
| | | } |
| | | catch (LDAPConnectionException lce) |
| | | { |
| | | Message message = null; |
| | | Message message; |
| | | if ((lce.getCause() != null) && (lce.getCause().getCause() != null) && |
| | | lce.getCause().getCause() instanceof SSLException) { |
| | | message = ERR_PWPSTATE_CANNOT_CONNECT_SSL.get(host.getValue(), |