diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2012-04-05 14:49:11 -0500 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-04-09 10:03:25 -0500 |
commit | 7c7b9d023cd466c1771068badc020dab36beb553 (patch) | |
tree | 178877eb83e25336be7577953945fbdb0b9e1a15 /base/silent | |
parent | da1e6e2f49f66fd46c8039ff1aa4386309fba8f4 (diff) | |
download | pki-7c7b9d023cd466c1771068badc020dab36beb553.tar.gz pki-7c7b9d023cd466c1771068badc020dab36beb553.tar.xz pki-7c7b9d023cd466c1771068badc020dab36beb553.zip |
Removed whitespaces from Java code.
Whitespaces in Java code have been removed with the following command:
find . -not -path .git -name *.java -exec sed -i 's/[[:blank:]]\+$//' {} \;
Ticket #134
Diffstat (limited to 'base/silent')
36 files changed, 372 insertions, 372 deletions
diff --git a/base/silent/src/com/netscape/pkisilent/ConfigureDRM.java b/base/silent/src/com/netscape/pkisilent/ConfigureDRM.java index 7d548ddf3..6d2516399 100644 --- a/base/silent/src/com/netscape/pkisilent/ConfigureDRM.java +++ b/base/silent/src/com/netscape/pkisilent/ConfigureDRM.java @@ -78,7 +78,7 @@ public class ConfigureDRM { public static String client_certdb_dir = null; public static String client_certdb_pwd = null; - // Login Panel + // Login Panel public static String pin = null; public static String domain_name = null; @@ -159,7 +159,7 @@ public class ConfigureDRM { public static String backup_pwd = null; public static String backup_fname = null; - // cert subject names + // cert subject names public static String drm_transport_cert_subject_name = null; public static String drm_subsystem_cert_subject_name = null; public static String drm_storage_cert_subject_name = null; @@ -777,7 +777,7 @@ public class ConfigureDRM { hr = hc.sslConnect(sd_hostname, sd_admin_port, admin_uri, query_string); // get response data - // String cert_to_import = + // String cert_to_import = // new sun.misc.BASE64Encoder().encode(hr.getResponseData()); String cert_to_import = Utils.base64encode(hr.getResponseData()); @@ -1013,7 +1013,7 @@ public class ConfigureDRM { StringHolder x_admin_email = new StringHolder(); StringHolder x_admin_password = new StringHolder(); - // ldap + // ldap StringHolder x_ldap_host = new StringHolder(); StringHolder x_ldap_port = new StringHolder(); StringHolder x_bind_dn = new StringHolder(); diff --git a/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java b/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java index 53c014b74..d6caddbcb 100644 --- a/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java +++ b/base/silent/src/com/netscape/pkisilent/ConfigureOCSP.java @@ -76,7 +76,7 @@ public class ConfigureOCSP { public static String client_certdb_dir = null; public static String client_certdb_pwd = null; - // Login Panel + // Login Panel public static String pin = null; public static String domain_name = null; @@ -148,7 +148,7 @@ public class ConfigureOCSP { public static String backup_pwd = null; public static String backup_fname = null; - // cert subject names + // cert subject names public static String ocsp_sign_cert_subject_name = null; public static String ocsp_subsystem_cert_subject_name = null; public static String ocsp_server_cert_subject_name = null; @@ -661,7 +661,7 @@ public class ConfigureOCSP { hr = hc.sslConnect(sd_hostname, sd_admin_port, admin_uri, query_string); // get response data - // String cert_to_import = + // String cert_to_import = // new sun.misc.BASE64Encoder().encode(hr.getResponseData()); String cert_to_import = Utils.base64encode(hr.getResponseData()); @@ -882,7 +882,7 @@ public class ConfigureOCSP { StringHolder x_admin_email = new StringHolder(); StringHolder x_admin_password = new StringHolder(); - // ldap + // ldap StringHolder x_ldap_host = new StringHolder(); StringHolder x_ldap_port = new StringHolder(); StringHolder x_bind_dn = new StringHolder(); diff --git a/base/silent/src/com/netscape/pkisilent/ConfigureRA.java b/base/silent/src/com/netscape/pkisilent/ConfigureRA.java index 3de70a067..0188a126a 100644 --- a/base/silent/src/com/netscape/pkisilent/ConfigureRA.java +++ b/base/silent/src/com/netscape/pkisilent/ConfigureRA.java @@ -64,7 +64,7 @@ public class ConfigureRA { public static String client_certdb_dir = null; public static String client_certdb_pwd = null; - // Login Panel + // Login Panel public static String pin = null; public static String domain_name = null; @@ -94,7 +94,7 @@ public class ConfigureRA { public static String ra_subsystem_cert_pp = null; public static String ra_subsystem_cert_cert = null; - // names + // names public static String ra_server_cert_subject_name = null; public static String ra_server_cert_nickname = null; public static String ra_subsystem_cert_subject_name = null; @@ -514,7 +514,7 @@ public class ConfigureRA { hr = hc.sslConnect(ca_hostname, ca_admin_port, admin_uri, query_string); try { - // cert_to_import = + // cert_to_import = // new sun.misc.BASE64Encoder().encode(hr.getResponseData()); cert_to_import = Utils.base64encode(hr.getResponseData()); diff --git a/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java b/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java index 706827c74..85b4ab53e 100644 --- a/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java +++ b/base/silent/src/com/netscape/pkisilent/ConfigureSubCA.java @@ -69,7 +69,7 @@ public class ConfigureSubCA { public static String client_certdb_dir = null; public static String client_certdb_pwd = null; - // Login Panel + // Login Panel public static String pin = null; public static String domain_name = null; @@ -153,7 +153,7 @@ public class ConfigureSubCA { public static String subsystem_name = null; - // names + // names public static String subca_sign_cert_subject_name = null; public static String subca_subsystem_cert_subject_name = null; public static String subca_ocsp_cert_subject_name = null; @@ -695,7 +695,7 @@ public class ConfigureSubCA { HTTPResponse hr = hc.sslConnect(cs_hostname, cs_port, admin_uri, query_string); // get response data - // String cert_to_import = + // String cert_to_import = // new sun.misc.BASE64Encoder().encode(hr.getResponseData()); String cert_to_import = Utils.base64encode(hr.getResponseData()); @@ -928,7 +928,7 @@ public class ConfigureSubCA { StringHolder x_admin_email = new StringHolder(); StringHolder x_admin_password = new StringHolder(); - // ldap + // ldap StringHolder x_ldap_host = new StringHolder(); StringHolder x_ldap_port = new StringHolder(); StringHolder x_bind_dn = new StringHolder(); diff --git a/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java b/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java index 760690888..77f8ae0bc 100644 --- a/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java +++ b/base/silent/src/com/netscape/pkisilent/ConfigureTKS.java @@ -75,7 +75,7 @@ public class ConfigureTKS { public static String client_certdb_dir = null; public static String client_certdb_pwd = null; - // Login Panel + // Login Panel public static String pin = null; public static String domain_name = null; @@ -136,7 +136,7 @@ public class ConfigureTKS { public static String backup_pwd = null; public static String backup_fname = null; - // names + // names public static String tks_subsystem_cert_subject_name = null; public static String tks_server_cert_subject_name = null; public static String subsystem_name = null; @@ -632,7 +632,7 @@ public class ConfigureTKS { HTTPResponse hr = hc.sslConnect(sd_hostname, sd_admin_port, admin_uri, query_string); // get response data - // String cert_to_import = + // String cert_to_import = // new sun.misc.BASE64Encoder().encode(hr.getResponseData()); String cert_to_import = Utils.base64encode(hr.getResponseData()); @@ -855,7 +855,7 @@ public class ConfigureTKS { StringHolder x_admin_email = new StringHolder(); StringHolder x_admin_password = new StringHolder(); - // ldap + // ldap StringHolder x_ldap_host = new StringHolder(); StringHolder x_ldap_port = new StringHolder(); StringHolder x_bind_dn = new StringHolder(); diff --git a/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java b/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java index 366fb57b6..f3522d75d 100644 --- a/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java +++ b/base/silent/src/com/netscape/pkisilent/ConfigureTPS.java @@ -69,7 +69,7 @@ public class ConfigureTPS { public static String client_certdb_dir = null; public static String client_certdb_pwd = null; - // Login Panel + // Login Panel public static String pin = null; public static String domain_name = null; @@ -127,7 +127,7 @@ public class ConfigureTPS { public static String ss_keygen = null; - // names + // names public static String tps_server_cert_subject_name = null; public static String tps_server_cert_nickname = null; public static String tps_subsystem_cert_subject_name = null; @@ -627,7 +627,7 @@ public class ConfigureTPS { hr = hc.sslConnect(ca_hostname, ca_admin_port, admin_uri, query_string); try { - // cert_to_import = + // cert_to_import = // new sun.misc.BASE64Encoder().encode(hr.getResponseData()); cert_to_import = Utils.base64encode(hr.getResponseData()); @@ -834,7 +834,7 @@ public class ConfigureTPS { StringHolder x_admin_email = new StringHolder(); StringHolder x_admin_password = new StringHolder(); - // ldap + // ldap StringHolder x_ldap_host = new StringHolder(); StringHolder x_ldap_port = new StringHolder(); diff --git a/base/silent/src/com/netscape/pkisilent/argparser/ArgParseException.java b/base/silent/src/com/netscape/pkisilent/argparser/ArgParseException.java index de3c58bd4..710f57db1 100644 --- a/base/silent/src/com/netscape/pkisilent/argparser/ArgParseException.java +++ b/base/silent/src/com/netscape/pkisilent/argparser/ArgParseException.java @@ -22,7 +22,7 @@ import java.io.IOException; /** * Exception class used by <code>ArgParser</code> when * command line arguments contain an error. - * + * * @author John E. Lloyd, Fall 2004 * @see ArgParser */ @@ -34,7 +34,7 @@ public class ArgParseException extends IOException { /** * Creates a new ArgParseException with the given message. - * + * * @param msg Exception message */ public ArgParseException(String msg) { @@ -44,7 +44,7 @@ public class ArgParseException extends IOException { /** * Creates a new ArgParseException from the given * argument and message. - * + * * @param arg Offending argument * @param msg Error message */ diff --git a/base/silent/src/com/netscape/pkisilent/argparser/ArgParser.java b/base/silent/src/com/netscape/pkisilent/argparser/ArgParser.java index ed5f98b1d..ecb6038df 100755 --- a/base/silent/src/com/netscape/pkisilent/argparser/ArgParser.java +++ b/base/silent/src/com/netscape/pkisilent/argparser/ArgParser.java @@ -23,7 +23,7 @@ package com.netscape.pkisilent.argparser; * copy, modify and redistribute is granted, provided that this copyright * notice is retained and the author is given credit whenever appropriate. * - * This software is distributed "as is", without any warranty, including + * This software is distributed "as is", without any warranty, including * any implied warranty of merchantability or fitness for a particular * use. The author assumes no responsibility for, and shall not be liable * for, any special, indirect, or consequential damages, or any damages @@ -54,36 +54,36 @@ import java.util.Vector; * <a href=#argsFromAFile>reading arguments from a file</a>. The * last feature is particularly useful and makes it * easy to create ad-hoc configuration files for an application. - * + * * <h3><a name="example">Basic Example</a></h3> - * + * * <p> * Here is a simple example in which an application has three command line options: <code>-theta</code> (followed by a * floating point value), <code>-file</code> (followed by a string value), and <code>-debug</code>, which causes a * boolean value to be set. - * + * * <pre> - * + * * static public void main(String[] args) { * // create holder objects for storing results ... - * + * * DoubleHolder theta = new DoubleHolder(); * StringHolder fileName = new StringHolder(); * BooleanHolder debug = new BooleanHolder(); - * + * * // create the parser and specify the allowed options ... - * + * * ArgParser parser = new ArgParser("java argparser.SimpleExample"); * parser.addOption("-theta %f #theta value (in degrees)", theta); * parser.addOption("-file %s #name of the operating file", fileName); * parser.addOption("-debug %v #enables display of debugging info", debug); - * + * * // match the arguments ... - * + * * parser.matchAllArgs(args); - * + * * // and print out the values - * + * * System.out.println("theta=" + theta.value); * System.out.println("fileName=" + fileName.value); * System.out.println("debug=" + debug.value); @@ -91,18 +91,18 @@ import java.util.Vector; * </pre> * <p> * A command line specifying all three options might look like this: - * + * * <pre> * java argparser.SimpleExample -theta 7.8 -debug -file /ai/lloyd/bar * </pre> - * + * * <p> * The application creates an instance of ArgParser and then adds descriptions of the allowed options using * {@link #addOption addOption}. The method {@link #matchAllArgs(String[]) matchAllArgs} is then used to match these * options against the command line arguments. Values associated with each option are returned in the <code>value</code> * field of special ``holder'' classes (e.g., {@link argparser.DoubleHolder DoubleHolder}, * {@link argparser.StringHolder StringHolder}, etc.). - * + * * <p> * The first argument to {@link #addOption addOption} is a string that specifies (1) the option's name, (2) a conversion * code for its associated value (e.g., <code>%f</code> for floating point, <code>%s</code> for a string, @@ -112,15 +112,15 @@ import java.util.Vector; * {@link argparser.StringHolder * StringHolder}), an array of the appropriate type, or <a href=#multipleOptionInvocation> an instance of * <code>java.util.Vector</code></a>. - * + * * <p> * By default, arguments that don't match the specified options, are <a href=#rangespec>out of range</a>, or are * otherwise formatted incorrectly, will cause <code>matchAllArgs</code> to print a message and exit the program. * Alternatively, an application can use {@link #matchAllArgs(String[],int,int) matchAllArgs(args,idx,exitFlags)} to * obtain an array of unmatched arguments which can then be <a href=#customArgParsing>processed separately</a> - * + * * <h3><a name="rangespec">Range Specification</a></h3> - * + * * The values associated with options can also be given range specifications. A range specification appears in curly * braces immediately following the conversion code. In the code fragment below, we show how to specify an option * <code>-name</code> that expects to be provided with one of three string values (<code>john</code>, <code>mary</code>, @@ -128,129 +128,129 @@ import java.util.Vector; * to 256, an option <code>-size</code> that expects to be supplied with integer values of either 1, 2, 4, 8, or 16, and * an option <code>-foo</code> that expects to be supplied with floating point values in the ranges -99 < foo <= -50, or * 50 <= foo < 99. - * + * * <pre> * StringHolder name = new StringHolder(); * IntHolder index = new IntHolder(); * IntHolder size = new IntHolder(); * DoubleHolder foo = new DoubleHolder(); - * + * * parser.addOption("-name %s {john,mary,jane}", name); * parser.addOption("-index %d {[1,256]}", index); * parser.addOption("-size %d {1,2,4,8,16}", size); * parser.addOption("-foo %f {(-99,-50],[50,99)}", foo); * </pre> - * + * * If an argument value does not lie within a specified range, an error is generated. - * + * * <h3><a name="multipleOptionNames">Multiple Option Names</a></h3> - * + * * An option may be given several names, or aliases, in the form of a comma seperated list: - * + * * <pre> * parser.addOption("-v,--verbose %v #print lots of info"); * parser.addOption("-of,-outfile,-outputFile %s #output file"); * </pre> - * + * * <h3><a name="singleWordOptions">Single Word Options</a></h3> - * + * * Normally, options are assumed to be "multi-word", meaning that any associated value must follow the option as a * separate argument string. For example, - * + * * <pre> * parser.addOption("-file %s #file name"); * </pre> - * + * * will cause the parser to look for two strings in the argument list of the form - * + * * <pre> * -file someFileName * </pre> - * + * * However, if there is no white space separting the option's name from it's conversion code, then values associated * with that option will be assumed to be part of the same argument string as the option itself. For example, - * + * * <pre> * parser.addOption("-file=%s #file name"); * </pre> - * + * * will cause the parser to look for a single string in the argument list of the form - * + * * <pre> * -file=someFileName * </pre> - * + * * Such an option is called a "single word" option. - * + * * <p> * In cases where an option has multiple names, then this single word behavior is invoked if there is no white space * between the last indicated name and the conversion code. However, previous names in the list will still be given * multi-word behavior if there is white space between the name and the following comma. For example, - * + * * <pre> * parser.addOption("-nb=,-number ,-n%d #number of blocks"); * </pre> - * + * * will cause the parser to look for one, two, and one word constructions of the forms - * + * * <pre> * -nb=N * -number N * -nN * </pre> - * + * * <h3><a name="multipleOptionValues">Multiple Option Values</a></h3> - * + * * If may be useful for an option to be followed by several values. For instance, we might have an option * <code>-velocity</code> which should be followed by three numbers denoting the x, y, and z components of a velocity * vector. We can require multiple values for an option by placing a <i>multiplier</i> specification, of the form * <code>X</code>N, where N is an integer, after the conversion code (or range specification, if present). For example, - * + * * <pre> * double[] pos = new double[3]; - * + * * addOption("-position %fX3 #position of the object", pos); * </pre> - * + * * will cause the parser to look for - * + * * <pre> * -position xx yy zz * </pre> - * + * * in the argument list, where <code>xx</code>, <code>yy</code>, and <code>zz</code> are numbers. The values are stored * in the array <code>pos</code>. - * + * * Options requiring multiple values must use arrays to return their values, and cannot be used in single word format. - * + * * <h3><a name="multipleOptionInvocation">Multiple Option Invocation</a></h3> - * + * * Normally, if an option appears twice in the command list, the value associated with the second instance simply * overwrites the value associated with the first instance. - * + * * However, the application can instead arrange for the storage of <i>all</i> values associated with multiple option * invocation, by supplying a instance of <code>java.util.Vector</code> to serve as the value holder. Then every time * the option appears in the argument list, the parser will create a value holder of appropriate type, set it to the * current value, and store the holder in the vector. For example, the construction - * + * * <pre> * Vector vec = new Vector(10); - * + * * parser.addOption("-foo %f", vec); * parser.matchAllArgs(args); * </pre> - * + * * when supplied with an argument list that contains - * + * * <pre> * -foo 1.2 -foo 1000 -foo -78 * </pre> - * + * * will create three instances of {@link argparser.DoubleHolder DoubleHolder}, initialized to <code>1.2</code>, * <code>1000</code>, and <code>-78</code>, and store them in <code>vec</code>. - * + * * <h3><a name="helpInfo">Generating help information</a></h3> - * + * * ArgParser automatically generates help information for the options, and this information may be printed in response * to a <i>help</i> option, or may be queried by the application using {@link #getHelpMessage getHelpMessage}. The * information for each option consists of the option's name(s), it's required value(s), and an application-supplied @@ -258,55 +258,55 @@ import java.util.Vector; * specifications (although this can be overriden, as <a href=#valueInfo>described below</a>). The application-supplied * description is whatever appears in the specification string after the optional <code>#</code> character. The string * returned by {@link #getHelpMessage getHelpMessage} for the <a href=#example>first example above</a> would be - * + * * <pre> * Usage: java argparser.SimpleExample * Options include: - * + * * -help,-? displays help information * -theta <float> theta value (in degrees) * -file <string> name of the operating file * -debug enables display of debugging info * </pre> - * + * * The options <code>-help</code> and <code>-?</code> are including in the parser by default as help options, and they * automatically cause the help message to be printed. To exclude these options, one should use the constructor * {@link #ArgParser(String,boolean) * ArgParser(synopsis,false)}. Help options can also be specified by the application using {@link #addOption addOption} * and the conversion code <code>%h</code>. Help options can be disabled using {@link #setHelpOptionsEnabled * setHelpOptionsEnabled(false)}. - * + * * <p> * <a name=valueInfo> A description of the required values for an option can be specified explicitly by placing a second * <code>#</code> character in the specification string. Everything between the first and second <code>#</code> * characters then becomes the value description, and everything after the second <code>#</code> character becomes the * option description. For example, if the <code>-theta</code> option above was specified with - * + * * <pre> * parser.addOption("-theta %f #NUMBER#theta value (in degrees)", theta); * </pre> - * + * * instead of - * + * * <pre> * parser.addOption("-theta %f #theta value (in degrees)", theta); * </pre> - * + * * then the corresponding entry in the help message would look like - * + * * <pre> * -theta NUMBER theta value (in degrees) * </pre> - * + * * <h3><a name="customArgParsing">Custom Argument Parsing</a></h3> - * + * * An application may find it necessary to handle arguments that don't fit into the framework of this class. There are a * couple of ways to do this. - * + * * <p> * First, the method {@link #matchAllArgs(String[],int,int) * matchAllArgs(args,idx,exitFlags)} returns an array of all unmatched arguments, which can then be handled specially: - * + * * <pre> * String[] unmatched = * parser.matchAllArgs (args, 0, parser.EXIT_ON_ERROR); @@ -314,13 +314,13 @@ import java.util.Vector; * { ... handle unmatched arguments ... * } * </pre> - * + * * For instance, this would be useful for an applicatoon that accepts an arbitrary number of input file names. The * options can be parsed using <code>matchAllArgs</code>, and the remaining unmatched arguments give the file names. - * + * * <p> * If we need more control over the parsing, we can parse arguments one at a time using {@link #matchArg matchArg}: - * + * * <pre> * int idx = 0; * while (idx < args.length) @@ -331,34 +331,34 @@ import java.util.Vector; * ... handle this unmatched argument ourselves ... * } * } - * catch (ArgParserException e) + * catch (ArgParserException e) * { // malformed or erroneous argument * parser.printErrorAndExit (e.getMessage()); * } * } * </pre> - * + * * {@link #matchArg matchArg(args,idx)} matches one option at location <code>idx</code> in the argument list, and then * returns the location value that should be used for the next match. If an argument does not match any option, * {@link #getUnmatchedArgument getUnmatchedArgument} will return a copy of the unmatched argument. - * + * * <h3><a name="argsFromAFile">Reading Arguments From a File</a></h3> - * + * * The method {@link #prependArgs prependArgs} can be used to automatically read in a set of arguments from a file and * prepend them onto an existing argument list. Argument words correspond to white-space-delimited strings, and the file * may contain the comment character <code>#</code> (which comments out everything to the end of the current line). A * typical usage looks like this: - * + * * <pre> * ... create parser and add options ... - * + * * args = parser.prependArgs (new File(".configFile"), args); - * + * * parser.matchAllArgs (args); * </pre> - * + * * This makes it easy to generate simple configuration files for an application. - * + * * @author John E. Lloyd, Fall 2004 */ public class ArgParser { @@ -391,7 +391,7 @@ public class ArgParser { * Returns a string containing the valid conversion codes. These * are the characters which may follow the <code>%</code> character in * the specification string of {@link #addOption addOption}. - * + * * @return Valid conversion codes * @see #addOption */ @@ -891,7 +891,7 @@ public class ArgParser { /** * Creates an <code>ArgParser</code> with a synopsis * string, and the default help options <code>-help</code> and <code>-?</code>. - * + * * @param synopsisString string that briefly describes program usage, * for use by {@link #getHelpMessage getHelpMessage}. * @see ArgParser#getSynopsisString @@ -904,7 +904,7 @@ public class ArgParser { /** * Creates an <code>ArgParser</code> with a synopsis * string. The help options <code>-help</code> and <code>-?</code> are added if <code>defaultHelp</code> is true. - * + * * @param synopsisString string that briefly describes program usage, * for use by {@link #getHelpMessage getHelpMessage}. * @param defaultHelp if true, adds the default help options @@ -926,10 +926,10 @@ public class ArgParser { * the program, and usually looks something like * <p> * <prec> "java somepackage.SomeClass [options] files ..." </prec> - * + * * <p> * It is used in help and error messages. - * + * * @return synopsis string * @see ArgParser#setSynopsisString * @see ArgParser#getHelpMessage @@ -940,7 +940,7 @@ public class ArgParser { /** * Sets the synopsis string used by the parser. - * + * * @param s new synopsis string * @see ArgParser#getSynopsisString * @see ArgParser#getHelpMessage @@ -951,7 +951,7 @@ public class ArgParser { /** * Indicates whether or not help options are enabled. - * + * * @return true if help options are enabled * @see ArgParser#setHelpOptionsEnabled * @see ArgParser#addOption @@ -968,7 +968,7 @@ public class ArgParser { * program * exits with code 0. Otherwise, arguments which match help * options are ignored. - * + * * @param enable enables help options if <code>true</code>. * @see ArgParser#getHelpOptionsEnabled * @see ArgParser#addOption @@ -981,7 +981,7 @@ public class ArgParser { /** * Returns the default print stream used for outputting help * and error information. - * + * * @return default print stream * @see ArgParser#setDefaultPrintStream */ @@ -992,7 +992,7 @@ public class ArgParser { /** * Sets the default print stream used for outputting help * and error information. - * + * * @param stream new default print stream * @see ArgParser#getDefaultPrintStream */ @@ -1003,7 +1003,7 @@ public class ArgParser { /** * Gets the indentation used by {@link #getHelpMessage * getHelpMessage}. - * + * * @return number of indentation columns * @see ArgParser#setHelpIndentation * @see ArgParser#getHelpMessage @@ -1019,7 +1019,7 @@ public class ArgParser { * can fit within this number of columns, then all information about * the option is placed on one line. Otherwise, the indented help * information is placed on a separate line. - * + * * @param indent number of indentation columns * @see ArgParser#getHelpIndentation * @see ArgParser#getHelpMessage @@ -1119,25 +1119,25 @@ public class ArgParser { * Adds a new option description to the parser. The method takes two * arguments: a specification string, and a result holder in which to * store the associated value. - * + * * <p> * The specification string has the general form - * + * * <p> * <var>optionNames</var> <code>%</code><var>conversionCode</var> [<code>{</code><var>rangeSpec</var><code>}</code>] * [<code>X</code><var>multiplier</var>] [<code>#</code><var>valueDescription</var>] [<code>#</code> * <var>optionDescription</var>] </code> - * + * * <p> * where * <ul> * <p> * <li><var>optionNames</var> is a comma-separated list of names for the option (such as <code>-f, --file</code>). - * + * * <p> * <li><var>conversionCode</var> is a single letter, following a <code>%</code> character, specifying information * about what value the option requires: - * + * * <table> * <tr> * <td><code>%f</code></td> @@ -1172,7 +1172,7 @@ public class ArgParser { * instead, then the <code>%v</code> should be followed by a "range spec" containing <code>false</code>, as in * <code>%v{false}</code>. * </table> - * + * * <p> * <li><var>rangeSpec</var> is an optional range specification, placed inside curly braces, consisting of a * comma-separated list of range items each specifying permissible values for the option. A range item may be an @@ -1180,45 +1180,45 @@ public class ArgParser { * enclosed in square or round brackets. Square and round brackets denote closed and open endpoints of a subrange, * indicating that the associated endpoint value is included or excluded from the subrange. The values specified in * the range spec need to be consistent with the type of value expected by the option. - * + * * <p> * <b>Examples:</b> - * + * * <p> * A range spec of <code>{2,4,8,16}</code> for an integer value will allow the integers 2, 4, 8, or 16. - * + * * <p> * A range spec of <code>{[-1.0,1.0]}</code> for a floating point value will allow any floating point number in the * range -1.0 to 1.0. - * + * * <p> * A range spec of <code>{(-88,100],1000}</code> for an integer value will allow values > -88 and <= 100, as well as * 1000. - * + * * <p> * A range spec of <code>{"foo", "bar", ["aaa","zzz")} </code> for a string value will allow strings equal to * <code>"foo"</code> or <code>"bar"</code>, plus any string lexically greater than or equal to <code>"aaa"</code> * but less then <code>"zzz"</code>. - * + * * <p> * <li><var>multiplier</var> is an optional integer, following a <code>X</code> character, indicating the number of * values which the option expects. If the multiplier is not specified, it is assumed to be 1. If the multiplier * value is greater than 1, then the result holder should be either an array (of appropriate type) with a length * greater than or equal to the multiplier value, or a <code>java.util.Vector</code> <a href=#vectorHolder>as * discussed below</a>. - * + * * <p> * <li><var>valueDescription</var> is an optional description of the option's value requirements, and consists of * all characters between two <code>#</code> characters. The final <code>#</code> character initiates the <i>option * description</i>, which may be empty. The value description is used in <a href=#helpInfo>generating help * messages</a>. - * + * * <p> * <li><var>optionDescription</var> is an optional description of the option itself, consisting of all characters * between a <code>#</code> character and the end of the specification string. The option description is used in <a * href=#helpInfo>generating help messages</a>. * </ul> - * + * * <p> * The result holder must be an object capable of holding a value compatible with the conversion code, or it must be * a <code>java.util.Vector</code>. When the option is matched, its associated value is placed in the result holder. @@ -1226,78 +1226,78 @@ public class ArgParser { * is a <code>java.util.Vector</code>, in which case new holder objects for each match will be allocated and added * to the vector. Thus if multiple instances of an option are desired by the program, the result holder should be a * <code>java.util.Vector</code>. - * + * * <p> * If the result holder is not a <code>Vector</code>, then it must correspond as follows to the conversion code: - * + * * <table> * <tr valign=top> * <td><code>%i</code>, <code>%d</code>, <code>%x</code>, <code>%o</code></td> * <td>{@link argparser.IntHolder IntHolder}, {@link argparser.LongHolder LongHolder}, <code>int[]</code>, or * <code>long[]</code></td> * </tr> - * + * * <tr valign=top> * <td><code>%f</code></td> * <td>{@link argparser.FloatHolder FloatHolder}, {@link argparser.DoubleHolder DoubleHolder}, <code>float[]</code>, * or <code>double[]</code></td> * </tr> - * + * * <tr valign=top> * <td><code>%b</code>, <code>%v</code></td> * <td>{@link argparser.BooleanHolder BooleanHolder} or <code>boolean[]</code></td> * </tr> - * + * * <tr valign=top> * <td><code>%s</code></td> * <td>{@link argparser.StringHolder StringHolder} or <code>String[]</code></td> * </tr> - * + * * <tr valign=top> * <td><code>%c</code></td> * <td>{@link argparser.CharHolder CharHolder} or <code>char[]</code></td> * </tr> * </table> - * + * * <p> * In addition, if the multiplier is greater than 1, then only the array type indicated above may be used, and the * array must be at least as long as the multiplier. - * + * * <p> * <a name=vectorHolder>If the result holder is a <code>Vector</code>, then the system will create an appropriate * result holder object and add it to the vector. Multiple occurances of the option will cause multiple results to * be added to the vector. - * + * * <p> * The object allocated by the system to store the result will correspond to the conversion code as follows: - * + * * <table> * <tr valign=top> * <td><code>%i</code>, <code>%d</code>, <code>%x</code>, <code>%o</code></td> * <td>{@link argparser.LongHolder LongHolder}, or <code>long[]</code> if the multiplier value exceeds 1</td> * </tr> - * + * * <tr valign=top> * <td><code>%f</code></td> * <td>{@link argparser.DoubleHolder DoubleHolder}, or <code>double[]</code> if the multiplier value exceeds 1</td> * </tr> - * + * * <tr valign=top> * <td><code>%b</code>, <code>%v</code></td> * <td>{@link argparser.BooleanHolder BooleanHolder}, or <code>boolean[]</code> if the multiplier value exceeds 1</td> * </tr> - * + * * <tr valign=top> * <td><code>%s</code></td> * <td>{@link argparser.StringHolder StringHolder}, or <code>String[]</code> if the multiplier value exceeds 1</td> * </tr> - * + * * <tr valign=top> * <td><code>%c</code></td> * <td>{@link argparser.CharHolder CharHolder}, or <code>char[]</code> if the multiplier value exceeds 1</td> * </tr> * </table> - * + * * @param spec the specification string * @param resHolder object in which to store the associated * value @@ -1475,7 +1475,7 @@ public class ArgParser { rec.vval = rec.rangeList.low.bval; } } - // check for value multiplicity information, if any + // check for value multiplicity information, if any if (scanner.peekc() == 'X') { if (rec.convertCode == 'h') { throw new IllegalArgumentException("Multipliers not supported for %h"); @@ -1537,7 +1537,7 @@ public class ArgParser { } // parse helpMsg for required/optional information if present - // default to required + // default to required if (rec.helpMsg.indexOf("(optional") != -1) { rec.required = false; } @@ -1672,7 +1672,7 @@ public class ArgParser { * double quotes <code>"</code>. The character <code>#</code> acts as * a comment character, causing input to the end of the current line to * be ignored. - * + * * @param reader Reader from which to read the strings * @param args Initial set of argument values. Can be * specified as <code>null</code>. @@ -1716,7 +1716,7 @@ public class ArgParser { * quotes <code>"</code>. The character <code>#</code> acts as a * comment character, causing input to the end of the current line to * be ignored. - * + * * @param file File to be read * @param args Initial set of argument values. Can be * specified as <code>null</code>. @@ -1740,7 +1740,7 @@ public class ArgParser { /** * Sets the parser's error message. - * + * * @param s Error message */ protected void setError(String msg) { @@ -1763,17 +1763,17 @@ public class ArgParser { /** * Matches arguments within an argument list. - * + * * <p> * In the event of an erroneous or unmatched argument, the method prints a message and exits the program with code * 1. - * + * * <p> * If help options are enabled and one of the arguments matches a help option, then the result of * {@link #getHelpMessage * getHelpMessage} is printed to the default print stream and the program exits with code 0. If help options are not * enabled, they are ignored. - * + * * @param args argument list * @see ArgParser#getDefaultPrintStream */ @@ -1786,23 +1786,23 @@ public class ArgParser { * those which were not matched. The matching starts at a location * in <code>args</code> specified by <code>idx</code>, and * unmatched arguments are returned in a String array. - * + * * <p> * In the event of an erroneous argument, the method either prints a message and exits the program (if * {@link #EXIT_ON_ERROR} is set in <code>exitFlags</code>) or terminates the matching and creates a error message * that can be retrieved by {@link #getErrorMessage}. - * + * * <p> * In the event of an umatched argument, the method will print a message and exit if {@link #EXIT_ON_UNMATCHED} is * set in <code>errorFlags</code>. Otherwise, the unmatched argument will be appended to the returned array of * unmatched values, and the matching will continue at the next location. - * + * * <p> * If help options are enabled and one of the arguments matches a help option, then the result of * {@link #getHelpMessage * getHelpMessage} is printed to the the default print stream and the program exits with code 0. If help options are * not enabled, then they will not be matched. - * + * * @param args argument list * @param idx starting location in list * @param exitFlags conditions causing the program to exit. Should be @@ -1842,22 +1842,22 @@ public class ArgParser { * Matches one option starting at a specified location in an argument * list. The method returns the location in the list where the next * match should begin. - * + * * <p> * In the event of an erroneous argument, the method throws an {@link argparser.ArgParseException ArgParseException} * with an appropriate error message. This error message can also be retrieved using {@link #getErrorMessage * getErrorMessage}. - * + * * <p> * In the event of an umatched argument, the method will return idx + 1, and {@link #getUnmatchedArgument * getUnmatchedArgument} will return a copy of the unmatched argument. If an argument is matched, * {@link #getUnmatchedArgument getUnmatchedArgument} will return <code>null</code>. - * + * * <p> * If help options are enabled and the argument matches a help option, then the result of {@link #getHelpMessage * getHelpMessage} is printed to the the default print stream and the program exits with code 0. If help options are * not enabled, then they are ignored. - * + * * @param args argument list * @param idx location in list where match should start * @return location in list where next match should start @@ -1945,7 +1945,7 @@ public class ArgParser { // int col = initialIndent; // if (maxcols <= 0) - // { maxcols = 80; + // { maxcols = 80; // } // if (matchList.size() > 0) // { ps.print (spaceString(initialIndent)); @@ -1964,7 +1964,7 @@ public class ArgParser { // } // if (rec.convertCode != 'v' && rec.convertCode != 'h') // { if (rec.valueDesc != null) - // { s += rec.valueDesc; + // { s += rec.valueDesc; // } // else // { s = s + "<" + rec.valTypeName() + ">"; @@ -1974,13 +1974,13 @@ public class ArgParser { // } // } // s = s + "]"; - // /* - // (col+=s.length()) > (maxcols-1) => we will spill over edge. + // /* + // (col+=s.length()) > (maxcols-1) => we will spill over edge. // we use (maxcols-1) because if we go right to the edge // (maxcols), we get wrap new line inserted "for us". // i != 0 means we print the first entry, no matter // how long it is. Subsequent entries are printed - // full length anyway. */ + // full length anyway. */ // if ((col+=s.length()) > (maxcols-1) && i != 0) // { col = initialIndent+s.length(); @@ -1997,7 +1997,7 @@ public class ArgParser { /** * Returns a string describing the allowed options * in detail. - * + * * @return help information string. */ public String getHelpMessage() { @@ -2065,7 +2065,7 @@ public class ArgParser { * Returns the parser's error message. This is automatically * set whenever an error is encountered in <code>matchArg</code> or <code>matchAllArgs</code>, and is automatically * set to <code>null</code> at the beginning of these methods. - * + * * @return error message */ public String getErrorMessage() { @@ -2076,7 +2076,7 @@ public class ArgParser { * Returns the value of an unmatched argument discovered {@link #matchArg matchArg} or * {@link #matchAllArgs(String[],int,int) * matchAllArgs}. If there was no unmatched argument, <code>null</code> is returned. - * + * * @return unmatched argument */ public String getUnmatchedArgument() { diff --git a/base/silent/src/com/netscape/pkisilent/argparser/ArgParserTest.java b/base/silent/src/com/netscape/pkisilent/argparser/ArgParserTest.java index 9ddb80778..89ebcc48a 100644 --- a/base/silent/src/com/netscape/pkisilent/argparser/ArgParserTest.java +++ b/base/silent/src/com/netscape/pkisilent/argparser/ArgParserTest.java @@ -23,7 +23,7 @@ package com.netscape.pkisilent.argparser; * copy, modify and redistribute is granted, provided that this copyright * notice is retained and the author is given credit whenever appropriate. * - * This software is distributed "as is", without any warranty, including + * This software is distributed "as is", without any warranty, including * any implied warranty of merchantability or fitness for a particular * use. The author assumes no responsibility for, and shall not be liable * for, any special, indirect, or consequential damages, or any damages @@ -40,7 +40,7 @@ import java.util.Vector; * Testing class for the class ArgParser. Executing the <code>main</code> method of this class will perform a suite of * tests to help verify correct * operation of the parser class. - * + * * @author John E. Lloyd, Fall 2004 * @see ArgParser */ @@ -218,7 +218,7 @@ public class ArgParserTest { // ByteArrayOutputStream buf = new ByteArrayOutputStream(0x10000); // PrintStream ps = new PrintStream(buf); // parser.printSynopsis (ps, 80); - // System.out.print (buf.toString()); + // System.out.print (buf.toString()); // } void checkAdd(String s, Object resHolder, String errmsg) { diff --git a/base/silent/src/com/netscape/pkisilent/argparser/BooleanHolder.java b/base/silent/src/com/netscape/pkisilent/argparser/BooleanHolder.java index ba10022b5..8c98e8ab8 100644 --- a/base/silent/src/com/netscape/pkisilent/argparser/BooleanHolder.java +++ b/base/silent/src/com/netscape/pkisilent/argparser/BooleanHolder.java @@ -45,7 +45,7 @@ public class BooleanHolder implements java.io.Serializable { /** * Constructs a new <code>BooleanHolder</code> with a * specific initial value. - * + * * @param b Initial boolean value. */ public BooleanHolder(boolean b) { diff --git a/base/silent/src/com/netscape/pkisilent/argparser/CharHolder.java b/base/silent/src/com/netscape/pkisilent/argparser/CharHolder.java index 453cac8b2..ed0ecb215 100644 --- a/base/silent/src/com/netscape/pkisilent/argparser/CharHolder.java +++ b/base/silent/src/com/netscape/pkisilent/argparser/CharHolder.java @@ -45,7 +45,7 @@ public class CharHolder implements java.io.Serializable { /** * Constructs a new <code>CharHolder</code> with a * specific initial value. - * + * * @param c Initial character value. */ public CharHolder(char c) { diff --git a/base/silent/src/com/netscape/pkisilent/argparser/DoubleHolder.java b/base/silent/src/com/netscape/pkisilent/argparser/DoubleHolder.java index 13012a641..a1e4388b4 100644 --- a/base/silent/src/com/netscape/pkisilent/argparser/DoubleHolder.java +++ b/base/silent/src/com/netscape/pkisilent/argparser/DoubleHolder.java @@ -45,7 +45,7 @@ public class DoubleHolder implements java.io.Serializable { /** * Constructs a new <code>DoubleHolder</code> with a * specific initial value. - * + * * @param d Initial double value. */ public DoubleHolder(double d) { diff --git a/base/silent/src/com/netscape/pkisilent/argparser/FloatHolder.java b/base/silent/src/com/netscape/pkisilent/argparser/FloatHolder.java index b8474b535..9fd938d29 100644 --- a/base/silent/src/com/netscape/pkisilent/argparser/FloatHolder.java +++ b/base/silent/src/com/netscape/pkisilent/argparser/FloatHolder.java @@ -45,7 +45,7 @@ public class FloatHolder implements java.io.Serializable { /** * Constructs a new <code>FloatHolder</code> with a * specific initial value. - * + * * @param f Initial float value. */ public FloatHolder(float f) { diff --git a/base/silent/src/com/netscape/pkisilent/argparser/IntHolder.java b/base/silent/src/com/netscape/pkisilent/argparser/IntHolder.java index a94ceea1e..c8672dba6 100644 --- a/base/silent/src/com/netscape/pkisilent/argparser/IntHolder.java +++ b/base/silent/src/com/netscape/pkisilent/argparser/IntHolder.java @@ -45,7 +45,7 @@ public class IntHolder implements java.io.Serializable { /** * Constructs a new <code>IntHolder</code> with a * specific initial value. - * + * * @param i Initial integer value. */ public IntHolder(int i) { diff --git a/base/silent/src/com/netscape/pkisilent/argparser/LongHolder.java b/base/silent/src/com/netscape/pkisilent/argparser/LongHolder.java index 5656d8b86..7647b2c1d 100644 --- a/base/silent/src/com/netscape/pkisilent/argparser/LongHolder.java +++ b/base/silent/src/com/netscape/pkisilent/argparser/LongHolder.java @@ -45,7 +45,7 @@ public class LongHolder implements java.io.Serializable { /** * Constructs a new <code>LongHolder</code> with a * specific initial value. - * + * * @param l Initial long value. */ public LongHolder(long l) { diff --git a/base/silent/src/com/netscape/pkisilent/argparser/ObjectHolder.java b/base/silent/src/com/netscape/pkisilent/argparser/ObjectHolder.java index 70e050fde..cce555984 100644 --- a/base/silent/src/com/netscape/pkisilent/argparser/ObjectHolder.java +++ b/base/silent/src/com/netscape/pkisilent/argparser/ObjectHolder.java @@ -45,7 +45,7 @@ public class ObjectHolder implements java.io.Serializable { /** * Constructs a new <code>ObjectHolder</code> with a * specific initial value. - * + * * @param o Initial Object reference. */ public ObjectHolder(Object o) { diff --git a/base/silent/src/com/netscape/pkisilent/argparser/StringHolder.java b/base/silent/src/com/netscape/pkisilent/argparser/StringHolder.java index 937360346..00d7b6e77 100644 --- a/base/silent/src/com/netscape/pkisilent/argparser/StringHolder.java +++ b/base/silent/src/com/netscape/pkisilent/argparser/StringHolder.java @@ -45,7 +45,7 @@ public class StringHolder implements java.io.Serializable { /** * Constructs a new <code>StringHolder</code> with a * specific initial value. - * + * * @param s Initial String reference. */ public StringHolder(String s) { diff --git a/base/silent/src/com/netscape/pkisilent/argparser/StringScanException.java b/base/silent/src/com/netscape/pkisilent/argparser/StringScanException.java index bf3ea6dc3..f44899625 100644 --- a/base/silent/src/com/netscape/pkisilent/argparser/StringScanException.java +++ b/base/silent/src/com/netscape/pkisilent/argparser/StringScanException.java @@ -23,7 +23,7 @@ import java.io.IOException; /** * Exception class used by <code>StringScanner</code> when * command line arguments do not parse correctly. - * + * * @author John E. Lloyd, Winter 2001 * @see StringScanner */ @@ -36,7 +36,7 @@ class StringScanException extends IOException { /** * Creates a new StringScanException with the given message. - * + * * @param msg Error message * @see StringScanner */ diff --git a/base/silent/src/com/netscape/pkisilent/argparser/StringScanner.java b/base/silent/src/com/netscape/pkisilent/argparser/StringScanner.java index 271dd0c62..d562a3b19 100644 --- a/base/silent/src/com/netscape/pkisilent/argparser/StringScanner.java +++ b/base/silent/src/com/netscape/pkisilent/argparser/StringScanner.java @@ -22,7 +22,7 @@ package com.netscape.pkisilent.argparser; * Copyright John E. Lloyd, 2004. All rights reserved. Permission to use, * copy, modify and redistribute is granted, provided that this copyright * notice is retained and the author is given credit whenever appropriate. - * + * * This software is distributed "as is", without any warranty, including * any implied warranty of merchantability or fitness for a particular * use. The author assumes no responsibility for, and shall not be liable @@ -420,7 +420,7 @@ class StringScanner { } if (exception == null) { // if (Character.isLetterOrDigit(c=buf[idx]) || c == '_') - // { exception = new StringScanException (idx, + // { exception = new StringScanException (idx, //"malformed floating number"); // } // else diff --git a/base/silent/src/com/netscape/pkisilent/common/BaseState.java b/base/silent/src/com/netscape/pkisilent/common/BaseState.java index 0d5e9cfc6..c668e0f80 100644 --- a/base/silent/src/com/netscape/pkisilent/common/BaseState.java +++ b/base/silent/src/com/netscape/pkisilent/common/BaseState.java @@ -31,14 +31,14 @@ public class BaseState { private String ldapbase, ldaphost, ldapport, ldapdn, ldapdnpw; private boolean ldapsecConn = false; - // Constructor + // Constructor public BaseState() { } /** * Constructor . Takes the parameter CMSConfigfilename ( with fullpath) - * + * * @param CMSConfigfile. */ diff --git a/base/silent/src/com/netscape/pkisilent/common/CMSConfig.java b/base/silent/src/com/netscape/pkisilent/common/CMSConfig.java index 3e4f0bfa2..7aeaaa829 100644 --- a/base/silent/src/com/netscape/pkisilent/common/CMSConfig.java +++ b/base/silent/src/com/netscape/pkisilent/common/CMSConfig.java @@ -81,7 +81,7 @@ public class CMSConfig extends ServerInfo { } - // Authentication + // Authentication // Enable DirectoryBased Authentication /** @@ -207,7 +207,7 @@ public class CMSConfig extends ServerInfo { } - // Publishing + // Publishing /** * Takes parameters : secureConnection( true/false), ldapbinddn, ldapbindnpassword,ldaphostname, lapdaportnumber ( * in case of secured connection give ldap secured port) @@ -414,7 +414,7 @@ public class CMSConfig extends ServerInfo { } public void CreateOCSPPublisher(String OCSPHost, String OCSPPort, String OCSPEEPort) { - // Set host nmae with fully qualified hostname + // Set host nmae with fully qualified hostname String location = "http://" + OCSPHost + ":" + OCSPEEPort + "/ocsp"; CMSprops.setProperty("ca.crl.MasterCRL.alwaysUpdate", "true"); @@ -505,7 +505,7 @@ public class CMSConfig extends ServerInfo { CMSprops.setProperty("cardcryptogram.validate.enable", "false"); } - // Policies + // Policies public void DefaultValidityRule(String SubsystemType, String lagtime, String leadtime, String maxValidity) { if (SubsystemType.equals("ca")) { CMSprops.setProperty("ca.Policy.rule.DefaultValidityRule.enable", @@ -560,10 +560,10 @@ public class CMSConfig extends ServerInfo { CMSConfig s = new CMSConfig(args[0]); // boolean secureC = false; - // s.EnableDirEnrollment(secureC); + // s.EnableDirEnrollment(secureC); s.saveCMSConfig(); }// end of function main -} // end of class +} // end of class diff --git a/base/silent/src/com/netscape/pkisilent/common/CMSLDAP.java b/base/silent/src/com/netscape/pkisilent/common/CMSLDAP.java index 91a273df6..c74cd94c6 100644 --- a/base/silent/src/com/netscape/pkisilent/common/CMSLDAP.java +++ b/base/silent/src/com/netscape/pkisilent/common/CMSLDAP.java @@ -426,7 +426,7 @@ public class CMSLDAP { LDAPAttribute cfile = new LDAPAttribute("nscertfile", "alias/"); LDAPAttribute cauth = new LDAPAttribute("nssslclientauth", "allowed"); - // conn.delete("cn=RSA,cn=encryption,cn=config"); + // conn.delete("cn=RSA,cn=encryption,cn=config"); mods.add(LDAPModification.REPLACE, ssl3); mods.add(LDAPModification.DELETE, ssl3ciphers); @@ -503,7 +503,7 @@ public class CMSLDAP { i--; } - // conn.delete("cn=RSA,cn=encryption,cn=config"); + // conn.delete("cn=RSA,cn=encryption,cn=config"); try { conn.search( "cn=RSA,cn=encryption,cn=config", searchScope, null, @@ -573,7 +573,7 @@ public class CMSLDAP { DataInputStream dis = new DataInputStream(fis); byte[] bytes = new byte[dis.available()]; - dis.readFully(bytes); + dis.readFully(bytes); // bytes=s.getBytes(); */ diff --git a/base/silent/src/com/netscape/pkisilent/common/CMSProperties.java b/base/silent/src/com/netscape/pkisilent/common/CMSProperties.java index a4ba55d29..e0f2d4516 100644 --- a/base/silent/src/com/netscape/pkisilent/common/CMSProperties.java +++ b/base/silent/src/com/netscape/pkisilent/common/CMSProperties.java @@ -22,10 +22,10 @@ package com.netscape.pkisilent.common; * @(#)Properties.java 1.60 00/02/02 * * Copyright 1995-2000 Sun Microsystems, Inc. All Rights Reserved. - * - * This software is the proprietary information of Sun Microsystems, Inc. + * + * This software is the proprietary information of Sun Microsystems, Inc. * Use is subject to license terms. - * + * */ import java.io.BufferedReader; @@ -61,10 +61,10 @@ import java.util.Hashtable; * href="http://java.sun.com/docs/books/jls/html/3.doc.html#100850">Unicode escapes</a> are used; however, only a single * 'u' character is allowed in an escape sequence. The native2ascii tool can be used to convert property files to and * from other character encodings. - * + * * @see <a href="../../../tooldocs/solaris/native2ascii.html">native2ascii tool for Solaris</a> * @see <a href="../../../tooldocs/win32/native2ascii.html">native2ascii tool for Windows</a> - * + * * @author Arthur van Hoff * @author Michael McCloskey * @version 1.60, 02/02/00 @@ -81,7 +81,7 @@ class CMSProperties extends Hashtable<String, String> { /** * A property list that contains default values for any keys not * found in this property list. - * + * * @serial */ protected CMSProperties defaults; @@ -95,7 +95,7 @@ class CMSProperties extends Hashtable<String, String> { /** * Creates an empty property list with the specified defaults. - * + * * @param defaults the defaults. */ public CMSProperties(CMSProperties defaults) { @@ -106,7 +106,7 @@ class CMSProperties extends Hashtable<String, String> { * Calls the hashtable method <code>put</code>. Provided for * parallelism with the <tt>getProperty</tt> method. Enforces use of * strings for property keys and values. - * + * * @param key the key to be placed into this property list. * @param value the value corresponding to <tt>key</tt>. * @see #getProperty @@ -152,43 +152,43 @@ class CMSProperties extends Hashtable<String, String> { * As an example, each of the following four lines specifies the key <code>"Truth"</code> and the associated element * value <code>"Beauty"</code>: * <p> - * + * * <pre> * Truth = Beauty * Truth:Beauty * Truth :Beauty * </pre> - * + * * As another example, the following three lines specify a single property: * <p> - * + * * <pre> * fruits apple, banana, pear, \ * cantaloupe, watermelon, \ * kiwi, mango * </pre> - * + * * The key is <code>"fruits"</code> and the associated element is: * <p> - * + * * <pre> * "apple, banana, pear, cantaloupe, watermelon,kiwi, mango" * </pre> - * + * * Note that a space appears before each <code>\</code> so that a space will appear after each comma in the final * result; the <code>\</code>, line terminator, and leading whitespace on the continuation line are merely discarded * and are <i>not</i> replaced by one or more other characters. * <p> * As a third example, the line: * <p> - * + * * <pre> * cheeses * </pre> - * + * * specifies that the key is <code>"cheeses"</code> and the associated element is the empty string. * <p> - * + * * @param inStream the input stream. * @exception IOException if an error occurred when reading from the * input stream. @@ -456,12 +456,12 @@ class CMSProperties extends Hashtable<String, String> { /** * Calls the <code>store(OutputStream out, String header)</code> method * and suppresses IOExceptions that were thrown. - * + * * @deprecated This method does not throw an IOException if an I/O error * occurs while saving the property list. As of the Java 2 platform v1.2, the preferred * way to save a properties list is via the <code>store(OutputStream out, * String header)</code> method. - * + * * @param out an output stream. * @param header a description of the property list. * @exception ClassCastException if this <code>Properties</code> object @@ -503,7 +503,7 @@ class CMSProperties extends Hashtable<String, String> { * <p> * After the entries have been written, the output stream is flushed. The output stream remains open after this * method returns. - * + * * @param out an output stream. * @param header a description of the property list. * @exception IOException if writing this property list to the specified @@ -545,7 +545,7 @@ class CMSProperties extends Hashtable<String, String> { * If the key is not found in this property list, the default property list, * and its defaults, recursively, are then checked. The method returns <code>null</code> if the property is not * found. - * + * * @param key the property key. * @return the value in this property list with the specified key value. * @see #setProperty @@ -565,10 +565,10 @@ class CMSProperties extends Hashtable<String, String> { * If the key is not found in this property list, the default property list, * and its defaults, recursively, are then checked. The method returns the * default value argument if the property is not found. - * + * * @param key the hashtable key. * @param defaultValue a default value. - * + * * @return the value in this property list with the specified key value. * @see #setProperty * @see #defaults @@ -582,7 +582,7 @@ class CMSProperties extends Hashtable<String, String> { /** * Returns an enumeration of all the keys in this property list, including * the keys in the default property list. - * + * * @return an enumeration of all the keys in this property list, including * the keys in the default property list. * @see java.util.Enumeration @@ -598,7 +598,7 @@ class CMSProperties extends Hashtable<String, String> { /** * Prints this property list out to the specified output stream. * This method is useful for debugging. - * + * * @param out an output stream. */ public void list(PrintStream out) { @@ -620,7 +620,7 @@ class CMSProperties extends Hashtable<String, String> { /** * Prints this property list out to the specified output stream. * This method is useful for debugging. - * + * * @param out an output stream. * @since JDK1.1 */ @@ -648,7 +648,7 @@ class CMSProperties extends Hashtable<String, String> { /** * Enumerates all key/value pairs in the specified hastable. - * + * * @param h the hashtable */ private synchronized void enumerate(Hashtable<String, String> h) { @@ -664,7 +664,7 @@ class CMSProperties extends Hashtable<String, String> { /** * Convert a nibble to a hex character - * + * * @param nibble the nibble to convert. */ private static char toHex(int nibble) { diff --git a/base/silent/src/com/netscape/pkisilent/common/CMSTask.java b/base/silent/src/com/netscape/pkisilent/common/CMSTask.java index 4b6c75ba3..948076fd6 100644 --- a/base/silent/src/com/netscape/pkisilent/common/CMSTask.java +++ b/base/silent/src/com/netscape/pkisilent/common/CMSTask.java @@ -186,5 +186,5 @@ public class CMSTask { } // end of function main -} // end of class +} // end of class diff --git a/base/silent/src/com/netscape/pkisilent/common/ComCrypto.java b/base/silent/src/com/netscape/pkisilent/common/ComCrypto.java index d629030f2..482e2ffab 100644 --- a/base/silent/src/com/netscape/pkisilent/common/ComCrypto.java +++ b/base/silent/src/com/netscape/pkisilent/common/ComCrypto.java @@ -98,7 +98,7 @@ public class ComCrypto { /** * Constructor . Takes the parameter certificatedbdirectory , passwordfor cert database, * certificatenickname,keysize, keytype(RSA/DSA) - * + * * @param certdbdirectory. * @param certdbpassword * @param certnickname @@ -114,7 +114,7 @@ public class ComCrypto { keytype = kt; } - // Set and Get functions + // Set and Get functions public void setCertDir(String cd) { cdir = cd; @@ -496,12 +496,12 @@ public class ComCrypto { try { CryptoManager.initialize(cdir); } catch (Exception e) { - // it is ok if it is already initialized + // it is ok if it is already initialized System.out.println("INITIALIZATION ERROR: " + e.toString()); System.out.println("cdir = " + cdir); } - // Step 2 log into database + // Step 2 log into database try { System.out.println("Debug : before getInstance"); @@ -527,7 +527,7 @@ public class ComCrypto { } } - // Generating CRMF request + // Generating CRMF request KeyPairGenerator kg = token.getKeyPairGenerator(KeyPairAlgorithm.RSA); @@ -565,7 +565,7 @@ public class ComCrypto { SEQUENCE s1 = new SEQUENCE(); - // 1st : Encryption key + // 1st : Encryption key s1.addElement(crmfMsg); @@ -583,11 +583,11 @@ public class ComCrypto { byte encoded[] = ASN1Util.encode(s1); - // BASE64Encoder encoder = new BASE64Encoder(); + // BASE64Encoder encoder = new BASE64Encoder(); // String Req1 = encoder.encodeBuffer(encoded); String Req1 = Utils.base64encode(encoded); - // Set CRMF_REQUEST variable + // Set CRMF_REQUEST variable CRMF_REQUEST = Req1; System.out.println("CRMF_REQUEST = " + CRMF_REQUEST); @@ -602,7 +602,7 @@ public class ComCrypto { } /* - * This function is used to Generated CRMF requests wrapped with the + * This function is used to Generated CRMF requests wrapped with the * transport cert so that we can do key archival with the drm. * This function expects transportcert variable to be set in this class. * Use setTransportCert() to do the same. @@ -617,12 +617,12 @@ public class ComCrypto { try { CryptoManager.initialize(cdir); } catch (Exception e) { - // it is ok if it is already initialized + // it is ok if it is already initialized System.out.println("INITIALIZATION ERROR: " + e.toString()); System.out.println("cdir = " + cdir); } - // Step 2 log into database + // Step 2 log into database try { System.out.println("Debug : before getInstance"); @@ -728,7 +728,7 @@ public class ComCrypto { SEQUENCE s1 = new SEQUENCE(); - // 1st : Encryption key + // 1st : Encryption key s1.addElement(crmfMsg); // 2nd : Signing Key @@ -763,5 +763,5 @@ public class ComCrypto { return CRMF_REQUEST; } -} // end of class +} // end of class diff --git a/base/silent/src/com/netscape/pkisilent/common/Con2Agent.java b/base/silent/src/com/netscape/pkisilent/common/Con2Agent.java index 61305305e..bc419fb02 100644 --- a/base/silent/src/com/netscape/pkisilent/common/Con2Agent.java +++ b/base/silent/src/com/netscape/pkisilent/common/Con2Agent.java @@ -55,7 +55,7 @@ public class Con2Agent implements SSLClientCertificateSelectionCallback, /** * Constructor. Takes hostname , portnumber , certificate nickname, token password ,client certdb directory - * + * * @param hostname * @param portnumber * @param agent cert nickname @@ -88,10 +88,10 @@ public class Con2Agent implements SSLClientCertificateSelectionCallback, } - // Get and Set methods + // Get and Set methods /* - * Get the page returned by the server + * Get the page returned by the server */ public StringBuffer getPage() { @@ -99,7 +99,7 @@ public class Con2Agent implements SSLClientCertificateSelectionCallback, } /* - * Set the query string to be submitted to the server + * Set the query string to be submitted to the server */ public void setQueryString(String qu) { @@ -107,7 +107,7 @@ public class Con2Agent implements SSLClientCertificateSelectionCallback, } /* - *Set token password + *Set token password */ public void setTokenPassword(String pwd) { @@ -131,7 +131,7 @@ public class Con2Agent implements SSLClientCertificateSelectionCallback, } /* - * set Agent port number + * set Agent port number */ public void setPort(int p) { @@ -139,7 +139,7 @@ public class Con2Agent implements SSLClientCertificateSelectionCallback, } /* - * Set Agent cert nickname + * Set Agent cert nickname */ public void setCertNickName(String cname) { @@ -147,14 +147,14 @@ public class Con2Agent implements SSLClientCertificateSelectionCallback, } /* - * Set action URL + * Set action URL */ public void setActionURL(String url) { ACTIONURL = url; } - // Submit requests + // Submit requests public boolean Send() { try { @@ -196,7 +196,7 @@ public class Con2Agent implements SSLClientCertificateSelectionCallback, System.out.println(line); } - // Send Connection: close to let the server close the connection. + // Send Connection: close to let the server close the connection. // Else the socket on the server side continues to remain in TIME_WAIT state ps.println("Connection: close"); @@ -315,4 +315,4 @@ public class Con2Agent implements SSLClientCertificateSelectionCallback, } -} // end of class +} // end of class diff --git a/base/silent/src/com/netscape/pkisilent/common/DirEnroll.java b/base/silent/src/com/netscape/pkisilent/common/DirEnroll.java index 019b75825..de331989b 100644 --- a/base/silent/src/com/netscape/pkisilent/common/DirEnroll.java +++ b/base/silent/src/com/netscape/pkisilent/common/DirEnroll.java @@ -51,7 +51,7 @@ public class DirEnroll extends TestClient { /** * Constructor . Takes the parameter for Properties file name * <p> - * + * * @param propfilename name of the parameter file */ @@ -62,7 +62,7 @@ public class DirEnroll extends TestClient { /** * Constructor. Takes hostname , EESSLportnumber as parameter * <p> - * + * * @param hostname * @param portnumber */ @@ -76,7 +76,7 @@ public class DirEnroll extends TestClient { * Constructor. Takes * hostname,EESSLportnumber,uid,password,certdbdirectorypath,certdbpassword,certificatenickname,keysize,teytype * <p> - * + * * @param hostname * @param portnumber * @param subjectdn @@ -98,7 +98,7 @@ public class DirEnroll extends TestClient { keytype = "RSA"; } - // Set and Get functions + // Set and Get functions /** * Use this method to set User Info @@ -214,7 +214,7 @@ public class DirEnroll extends TestClient { return true; } - // Private functions + // Private functions private boolean importCert(String certpack) { @@ -466,5 +466,5 @@ public class DirEnroll extends TestClient { } }// end of function main -} // end of class +} // end of class diff --git a/base/silent/src/com/netscape/pkisilent/common/PostQuery.java b/base/silent/src/com/netscape/pkisilent/common/PostQuery.java index 31fb07b3e..27c9209e8 100644 --- a/base/silent/src/com/netscape/pkisilent/common/PostQuery.java +++ b/base/silent/src/com/netscape/pkisilent/common/PostQuery.java @@ -76,7 +76,7 @@ public class PostQuery { } public boolean Send() { - // / This functions connects to the URL and POST HTTP Request . + // / This functions connects to the URL and POST HTTP Request . // It compares with NMC_STATUS and return the status. System.out.println(URLString); st = false; @@ -127,7 +127,7 @@ public class PostQuery { } } URLCon.disconnect(); - } // try + } // try catch (MalformedURLException e) { System.out.println(URLString + " is not a valid URL."); diff --git a/base/silent/src/com/netscape/pkisilent/common/Request.java b/base/silent/src/com/netscape/pkisilent/common/Request.java index 3dffc929c..7ee443f16 100644 --- a/base/silent/src/com/netscape/pkisilent/common/Request.java +++ b/base/silent/src/com/netscape/pkisilent/common/Request.java @@ -36,7 +36,7 @@ public class Request extends TestClient { private String approveseqnum, type, reqType, reqState, agenttype; private int i; - // Program variables + // Program variables private String ACTION_PROCESS_CERT_REQUEST = null; private String ACTION_LISTREQUEST = "/queryReq"; private int reqtype = 1; @@ -50,7 +50,7 @@ public class Request extends TestClient { private Vector<String> seqNum = new Vector<String>(); private String AUTH_ID = null; - // Cert Detail variables + // Cert Detail variables private String csrRequestorName, csrRequestorPhone, csrRequestorEmail, subject, subjectdn, reqStatus, certType; private String requestType, requestID, sslclient, clientcert, servercert, emailcert, objectsigningcert, sslcacert, @@ -58,11 +58,11 @@ public class Request extends TestClient { private int totalNumApproved = 0; - // Constructors + // Constructors /** * Constructor . Takes the parameter for Properties file name - * + * * @param propfileName name of the parameter file. */ @@ -72,7 +72,7 @@ public class Request extends TestClient { /** * Constructor . Takes the parameter host , port and "angent type - ca/ra" - * + * * @param hostname. * @param port * @param agenttype Whether ca or ra agent @@ -86,7 +86,7 @@ public class Request extends TestClient { /** * Constructor . Takes the following parmaters - * + * * @param hostName . * @param port * @param adminuid @@ -151,7 +151,7 @@ public class Request extends TestClient { /** * List all pending enrollment request. Takes parameters fromRequestNumber,toRequestNumber - * + * * @param fromrequest number * @param endrequestnumber. * @throws UnsupportedEncodingException @@ -168,7 +168,7 @@ public class Request extends TestClient { /** * List all pending request. Takes parameters fromRequestNumber,toRequestNumber - * + * * @param fromrequest number * @param endrequestnumber. * @throws UnsupportedEncodingException @@ -185,7 +185,7 @@ public class Request extends TestClient { /** * Approve pending enrollment request. Takes parameters RequestNumber - * + * * @param request number * @throws UnsupportedEncodingException */ @@ -207,7 +207,7 @@ public class Request extends TestClient { /** * Approve profile based pending enrollment request. Takes parameters RequestNumber - * + * * @param request number * @throws UnsupportedEncodingException */ @@ -236,7 +236,7 @@ public class Request extends TestClient { cadualcert_name = name; - // reqtype = 7 means cadualcert profile request + // reqtype = 7 means cadualcert profile request // this is just a convention that we follow within this file to distinguish // bet'n the different requests @@ -255,7 +255,7 @@ public class Request extends TestClient { /** * Reject profile based pending enrollment request. Takes parameters RequestNumber - * + * * @param request number * @throws UnsupportedEncodingException */ @@ -278,7 +278,7 @@ public class Request extends TestClient { /** * Cancel profile based pending enrollment request. Takes parameters RequestNumber - * + * * @param request number * @throws UnsupportedEncodingException */ @@ -471,9 +471,9 @@ public class Request extends TestClient { res.indexOf(";", ret) - 1); } - } // end of for loop + } // end of for loop - // System.out.println("Debug : Retrieving cert details"); + // System.out.println("Debug : Retrieving cert details"); ret = res.indexOf("header.subject ="); if (ret > 0) { @@ -585,7 +585,7 @@ public class Request extends TestClient { System.out.println(res); } - // Find th Server_ATTRS paramteter value of reqStatus + // Find th Server_ATTRS paramteter value of reqStatus int i = 1; int ret; @@ -881,15 +881,15 @@ public class Request extends TestClient { + "&keyUsageKeyAgreement=false" + "&keyUsageKeyCertSign=false" + "&keyUsageCrlSign=false" + "&keyUsageEncipherOnly=false" - + "&keyUsageDecipherOnly=false" + /* -- For Older CMS 6.x servers use these - "&nsCertCritical=false" + - "&nsCertSSLClient=true" + - "&nsCertSSLServer=false" + - "&nsCertEmail=true" + - "&nsCertObjectSigning=false" + - "&nsCertSSLCA=false" + - "&nsCertEmailCA=false" + - "&nsCertObjectSigningCA=false" + + + "&keyUsageDecipherOnly=false" + /* -- For Older CMS 6.x servers use these + "&nsCertCritical=false" + + "&nsCertSSLClient=true" + + "&nsCertSSLServer=false" + + "&nsCertEmail=true" + + "&nsCertObjectSigning=false" + + "&nsCertSSLCA=false" + + "&nsCertEmailCA=false" + + "&nsCertObjectSigningCA=false" + "&subjAltNameExtCritical=false" + "&subjAltNames=RFC822Name: null" + "&signingAlg=MD5withRSA" + @@ -1024,7 +1024,7 @@ public class Request extends TestClient { while (i < seqNum.size()) { approveseqnum = (seqNum.elementAt(i)).toString(); - // Get request details + // Get request details reqtype = 2; buildquery(); if (!Send()) { @@ -1134,5 +1134,5 @@ public class Request extends TestClient { }// end of function main -} // end of class +} // end of class diff --git a/base/silent/src/com/netscape/pkisilent/common/ServerInfo.java b/base/silent/src/com/netscape/pkisilent/common/ServerInfo.java index f63456b4d..5eccb1601 100644 --- a/base/silent/src/com/netscape/pkisilent/common/ServerInfo.java +++ b/base/silent/src/com/netscape/pkisilent/common/ServerInfo.java @@ -41,7 +41,7 @@ public class ServerInfo { public static CMSProperties props = null; public static CMSProperties CMSprops = null; - // Private variables + // Private variables private int i; public String CMSConfigFile, AdminConfigFile; @@ -150,7 +150,7 @@ public class ServerInfo { readCMSConfig(); } - // Private functions + // Private functions private void SystemInfo() { try { domain = InetAddress.getLocalHost().getHostName(); @@ -351,5 +351,5 @@ public class ServerInfo { }// end of function main -} // end of class +} // end of class diff --git a/base/silent/src/com/netscape/pkisilent/common/TestClient.java b/base/silent/src/com/netscape/pkisilent/common/TestClient.java index 0e4ed9cdd..a58e88bd1 100644 --- a/base/silent/src/com/netscape/pkisilent/common/TestClient.java +++ b/base/silent/src/com/netscape/pkisilent/common/TestClient.java @@ -47,7 +47,7 @@ public class TestClient implements SSLCertificateApprovalCallback { public String ACTION_STRING; public String query; public boolean debug = false; - // Certificate nicknames to be used by Test Clients + // Certificate nicknames to be used by Test Clients private int i; private String testConfigFile; @@ -71,7 +71,7 @@ public class TestClient implements SSLCertificateApprovalCallback { public String UID, OU, O, DN, E, CN, C, GN, SN, L, MAIL; // Enroll protected String PWD; - // CRypto + // CRypto public ComCrypto cCrypt = new ComCrypto(); public String pkcs10request = null; @@ -90,7 +90,7 @@ public class TestClient implements SSLCertificateApprovalCallback { return true; } - // Constructor + // Constructor public TestClient() { keysize = "1024"; @@ -102,7 +102,7 @@ public class TestClient implements SSLCertificateApprovalCallback { * Before creating a new instance of this class make sure you have set TEST_CONFIG_FILE variable in your * environnemt. * Reads the TEST_CONFIG_FILE . Initializes the certificate database. See engage.cfg file for example. - * + * * @param keysize * @param keytype */ @@ -420,7 +420,7 @@ public class TestClient implements SSLCertificateApprovalCallback { } ldaprootDN = props.getProperty("LDAPROOTDN"); - // Strip of th e quotes "cn=directory manager" string + // Strip of th e quotes "cn=directory manager" string if (ldaprootDN.indexOf("\"") > -1) { ldaprootDN = ldaprootDN.substring(1, ldaprootDN.length() - 1); } @@ -485,7 +485,7 @@ public class TestClient implements SSLCertificateApprovalCallback { return (getString(p)); } - // This following method doesn't Always get a free port. + // This following method doesn't Always get a free port. // while (st) { // if(isSocketUnused(host,p) ) // st=false; @@ -524,13 +524,13 @@ public class TestClient implements SSLCertificateApprovalCallback { /* ******************************************************************* - * Sample programs to initialze calsses + * Sample programs to initialze calsses ******************************************************************* */ /* ******************************************************************** - * To Test AutoInstaller + * To Test AutoInstaller ******************************************************************* */ @@ -549,12 +549,12 @@ public class TestClient implements SSLCertificateApprovalCallback { a.setAdminInfo(s.GetHostName(),s.GetAdminPort(),"mcom.com","admin","admin"); // setCAInfo - a.setCAInfo(s.GetHostName(),"1027","8100","admin","secret12"); + a.setCAInfo(s.GetHostName(),"1027","8100","admin","secret12"); //setInternalDB info - String dp = t.getFreePort("38900"); + String dp = t.getFreePort("38900"); a.setInternalDBInfo(s.GetHostName(),"38907","ca-db","cn=directory manager","secret12" ); - // set tokenInfo + // set tokenInfo a.setTokenInfo("Internal","secret12"); @@ -578,7 +578,7 @@ public class TestClient implements SSLCertificateApprovalCallback { /* ****************************************************** - * Example to Get Server Details + * Example to Get Server Details ****************************************************** */ @@ -617,8 +617,8 @@ public class TestClient implements SSLCertificateApprovalCallback { Profiles pr = new Profiles(s.GetHostName(),s.GetEESSLPort()); pr.setProfileType("caCMCUserCert"); pr.setCertAuthority("ca"); - - String request = t.readRequest(requestfile+".out"); + + String request = t.readRequest(requestfile+".out"); String bstr = "-----BEGIN NEW CERTIFICATE REQUEST-----"; String estr="-----END NEW CERTIFICATE REQUEST-----"; String Blob1 = request.substring(bstr.length() + 1); @@ -672,7 +672,7 @@ public class TestClient implements SSLCertificateApprovalCallback { /* *************************************************************** - Submit Profile based request + Submit Profile based request ********************************************************* */ @@ -687,7 +687,7 @@ public class TestClient implements SSLCertificateApprovalCallback { pr.clientCertEnroll(); System.out.println("Request ID is " + pr.getRequestID()); - + Request re = new Request (s.GetHostName(),s.GetAgentPort(),"ca"); re.setAgentCertName(t.GetAdminCertName()); re.ApproveProfileRequests(pr.getRequestID()); @@ -706,7 +706,7 @@ public class TestClient implements SSLCertificateApprovalCallback { if(!CrmfClient.Enroll()) {System.out.println("CRMFClient : could not submit request");} - + checkRequest cr = new checkRequest(s.GetHostName(),s.GetEESSLPort(),t.getString(CrmfClient.getRequestId()),"false"); cr.checkRequestStatus(); @@ -732,7 +732,7 @@ public class TestClient implements SSLCertificateApprovalCallback { /* ************************************************************* - * Example to Connect oto Config Directory port + * Example to Connect oto Config Directory port ************************************************************* */ @@ -740,9 +740,9 @@ public class TestClient implements SSLCertificateApprovalCallback { CMSLDAP cmsldap = new CMSLDAP(s.GetHostName(),s.GetConfigLDAPPort(),t.GetLDAPDN(),t.GetLDAPDNPW()); if(cmsldap.connect()) System.out.println("LDAP Connection successful"); - else + else System.out.println("Error Connecting to LDAPSERVER"); - + // Add user to config directoory if (cmsldap.userAdd("ou=people,"+t.GetLDAPBASE(),"t2","t2","t2","netscape")) System.out.println("Added user to Config directory"); @@ -751,7 +751,7 @@ public class TestClient implements SSLCertificateApprovalCallback { /* ************************************************************* - * Example to Submit a CRMFCleint request to CA + * Example to Submit a CRMFCleint request to CA ************************************************************* */ @@ -778,10 +778,10 @@ public class TestClient implements SSLCertificateApprovalCallback { /* System.out.println("KRAAgent "); KraAgent kraAgent = new KraAgent(s.GetHostName(),s.GetAgentPort()); - kraAgent.setAgentCertName(t.GetKRAAgentCertName()); + kraAgent.setAgentCertName(t.GetKRAAgentCertName()); System.out.println("KRAAgent List archival"); - - Vector aReq= kraAgent.ListArchivalRequests(); + + Vector aReq= kraAgent.ListArchivalRequests(); int i=0; while(i < aReq.size() ) { @@ -795,10 +795,10 @@ public class TestClient implements SSLCertificateApprovalCallback { /* ************************************************************* - * Example to submit manual user enrollment request + * Example to submit manual user enrollment request ************************************************************* /* - + /* UserEnroll ue = new UserEnroll(s.GetHostName(),"1029"); @@ -811,7 +811,7 @@ public class TestClient implements SSLCertificateApprovalCallback { /* ************************************************************* - * Example to submit Directory based enroolemt request + * Example to submit Directory based enroolemt request ************************************************************* /* @@ -821,8 +821,8 @@ public class TestClient implements SSLCertificateApprovalCallback { System.out.println("Success "); if(cmsldap.TurnOnSSL("slapd-jupiter2","Server-Cert cert-jupiter2","7000")) - System.out.println("Turned on ssl"); - else + System.out.println("Turned on ssl"); + else return; cmsldap.TurnOffSSL(); @@ -837,7 +837,7 @@ public class TestClient implements SSLCertificateApprovalCallback { /* ************************************************************* - * Example to submit Admin Enrollment request + * Example to submit Admin Enrollment request ************************************************************* /* @@ -851,13 +851,13 @@ public class TestClient implements SSLCertificateApprovalCallback { /* ************************************************************* - * Example gent List Pending request + * Example gent List Pending request ************************************************************* /* /* - // Agent List and Approve Request + // Agent List and Approve Request Request re = new Request (s.GetHostName(),s.GetAgentPort(),s.GetCertAuthority()); re.setAgentCertName(t.GetAdminCertName()); re.ListPendingRequests("2","70"); @@ -866,11 +866,11 @@ public class TestClient implements SSLCertificateApprovalCallback { /* ************************************************************* - * Example for CheckRequest Status and add the certificate to internal db + * Example for CheckRequest Status and add the certificate to internal db ************************************************************* /* - /* + /* // check request status and Revoke cert checkRequest cr = new checkRequest(s.GetHostName(),s.GetEESSLPort(),t.getString(ue.getRequestId()),"false"); checkRequest cr = new checkRequest(s.GetHostName(),s.GetEESSLPort(),"1","false"); @@ -888,7 +888,7 @@ public class TestClient implements SSLCertificateApprovalCallback { /* ************************************************************* - * Example agent ro revoke request + * Example agent ro revoke request ************************************************************* /* @@ -904,7 +904,7 @@ public class TestClient implements SSLCertificateApprovalCallback { /* /* - // Update CRLand DISPLAY it + // Update CRLand DISPLAY it System.out.println("Displayin CRL"); CRL crl = new CRL (s.GetHostName(),s.GetAgentPort(),"/tmp/crlfile"); @@ -920,7 +920,7 @@ public class TestClient implements SSLCertificateApprovalCallback { /* ************************************************************* - * Example for stopping and starting servers + * Example for stopping and starting servers ************************************************************* */ @@ -929,8 +929,8 @@ public class TestClient implements SSLCertificateApprovalCallback { if (idb.ldapStop()) System.out.println("IDB stopped"); if(idb.ldapStart()) System.out.println("IDB Started"); - System.out.println("------------------------------------------"); - System.out.println(" CMS Test:"); + System.out.println("------------------------------------------"); + System.out.println(" CMS Test:"); CMSTask task = new CMSTask(t.GetInstanceRoot()); task.CMSStop(); task.CMSStart(); diff --git a/base/silent/src/com/netscape/pkisilent/common/UserEnroll.java b/base/silent/src/com/netscape/pkisilent/common/UserEnroll.java index c55088bc6..123054503 100644 --- a/base/silent/src/com/netscape/pkisilent/common/UserEnroll.java +++ b/base/silent/src/com/netscape/pkisilent/common/UserEnroll.java @@ -60,7 +60,7 @@ public class UserEnroll extends TestClient { /** * Constructor . Takes the parameter for Properties file name * <p> - * + * * @param propfilename name of the parameter file */ @@ -73,7 +73,7 @@ public class UserEnroll extends TestClient { * CertdbDirecrory(fullpath) , certdbPassword, keysize, keytype, requestorName,requestorEmail and Certtype. * valid values for Certtype - "ca","ra","ocsp" * <p> - * + * * @param propfilename name of the parameter file */ @@ -515,22 +515,22 @@ public class UserEnroll extends TestClient { { System.out.println("Usage : propertiesfile"); System.exit(0); - } + } UserEnroll t = new UserEnroll(args[0]); st=t.enroll(); - if (st){ + if (st){ System.out.println("User Enrolled successfully . RequestId is "+t.getrequestId()); System.exit(t.getRequestId()); - } + } else{ - System.out.println("Error: " + t.getErrorDetail()); + System.out.println("Error: " + t.getErrorDetail()); System.exit(0); } */ }// end of function main -} // end of class +} // end of class diff --git a/base/silent/src/com/netscape/pkisilent/common/checkRequest.java b/base/silent/src/com/netscape/pkisilent/common/checkRequest.java index c4599ffde..8acbf1ca7 100644 --- a/base/silent/src/com/netscape/pkisilent/common/checkRequest.java +++ b/base/silent/src/com/netscape/pkisilent/common/checkRequest.java @@ -55,12 +55,12 @@ public class checkRequest extends TestClient { private String tokenpwd; private String cdir; - // public methods + // public methods /** * Constructor . Takes the parameter for Properties file name * <p> - * + * * @param propfilename name of the parameter file */ @@ -232,7 +232,7 @@ public class checkRequest extends TestClient { return false; } - // Private functions + // Private functions private void setElapsedTime(long dif) { elapsedTime = dif; @@ -613,5 +613,5 @@ public class checkRequest extends TestClient { } }// end of function main -} // end of class +} // end of class diff --git a/base/silent/src/com/netscape/pkisilent/http/HTMLDocument.java b/base/silent/src/com/netscape/pkisilent/http/HTMLDocument.java index e8de29081..75610c15b 100644 --- a/base/silent/src/com/netscape/pkisilent/http/HTMLDocument.java +++ b/base/silent/src/com/netscape/pkisilent/http/HTMLDocument.java @@ -103,7 +103,7 @@ public class HTMLDocument { /** * Creates a new HTML document using the provided data. - * + * * @param documentURL The URL for this document. * @param htmlData The actual data contained in the HTML document. */ @@ -169,7 +169,7 @@ public class HTMLDocument { /** * Actually parses the HTML document and extracts useful elements from it. - * + * * @return <CODE>true</CODE> if the page could be parsed successfully, or <CODE>false</CODE> if not. */ public boolean parse() { @@ -456,9 +456,9 @@ public class HTMLDocument { * Converts the provided URI to a URL. The provided URI may be a URL already, * or it may also be an absolute path on the server or a path relative to the * base URL. - * + * * @param uri The URI to convert to a URL. - * + * * @return The URL based on the provided URI. */ private String uriToURL(String uri) { @@ -479,7 +479,7 @@ public class HTMLDocument { /** * Retrieves the URL of this HTML document. - * + * * @return The URL of this HTML document. */ public String getDocumentURL() { @@ -488,7 +488,7 @@ public class HTMLDocument { /** * Retrieves the original HTML data used to create this document. - * + * * @return The orginal HTML data used to create this document. */ public String getHTMLData() { @@ -497,7 +497,7 @@ public class HTMLDocument { /** * Retrieves the contents of the HTML document with all tags removed. - * + * * @return The contents of the HTML document with all tags removed, or <CODE>null</CODE> if a problem occurs while * trying to parse the * HTML. @@ -517,7 +517,7 @@ public class HTMLDocument { * that reference files that would normally be downloaded as part of * retrieving a page in a browser. This includes images and external style * sheets. - * + * * @return An array containing a set of URLs to files associated with the * HTML document, or <CODE>null</CODE> if a problem occurs while * trying to parse the HTML. @@ -537,7 +537,7 @@ public class HTMLDocument { /** * Retrieves an array containing a set of URLs parsed from the HTML document * that are in the form of links to other content. - * + * * @return An array containing a set of URLs parsed from the HTML document * that are in the form of links to other content, or <CODE>null</CODE> if a problem occurs while trying to * parse the @@ -558,7 +558,7 @@ public class HTMLDocument { /** * Retrieves an array containing a set of URLs parsed from the HTML document * that reference images used in the document. - * + * * @return An array containing a set of URLs parsed from the HTML document * that reference images used in the document. */ @@ -577,7 +577,7 @@ public class HTMLDocument { /** * Retrieves an array containing a set of URLs parsed from the HTML document * that reference frames used in the document. - * + * * @return An array containing a set of URLs parsed from the HTML document * that reference frames used in the document. */ diff --git a/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java b/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java index f3980c0ed..6331783b8 100644 --- a/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java +++ b/base/silent/src/com/netscape/pkisilent/http/HTTPClient.java @@ -138,7 +138,7 @@ public class HTTPClient implements SSLCertificateApprovalCallback { public boolean approve(X509Certificate cert, SSLCertificateApprovalCallback.ValidityStatus status) { - // when this method is called by SSLSocket we get the server cert + // when this method is called by SSLSocket we get the server cert // we can capture this for future use. server_cert = cert; return true; @@ -794,7 +794,7 @@ public class HTTPClient implements SSLCertificateApprovalCallback { /** * Reads the actual data of the response based on the content length provided * by the server in the response header. - * + * * @param response The response with which the data is associated. * @param inputStream The input stream from which to read the response. * @param contentLength The number of bytes that the server said are in the @@ -808,7 +808,7 @@ public class HTTPClient implements SSLCertificateApprovalCallback { * array that should be considered part of the * response (the number of header bytes is included in * this count). - * + * * @throws IOException If a problem occurs while reading data from the * server. */ @@ -853,7 +853,7 @@ public class HTTPClient implements SSLCertificateApprovalCallback { * Reads the actual data of the response using chunked encoding, which is a * way for the server to provide the data in several chunks rather than all at * once. - * + * * @param response The response with which the data is associated. * @param inputStream The input stream from which to read the response. * @param dataRead The data that we have already read. This includes @@ -865,7 +865,7 @@ public class HTTPClient implements SSLCertificateApprovalCallback { * array that should be considered part of the * response (the number of header bytes is included in * this count). - * + * * @throws IOException If a problem occurs while reading data from the * server. */ @@ -1166,13 +1166,13 @@ public class HTTPClient implements SSLCertificateApprovalCallback { if (auth_type != null && auth_type.equalsIgnoreCase("BASIC")) { // BASE64Encoder encoder = new BASE64Encoder(); - // String temp = encoder.encodeBuffer((user_id + + // String temp = encoder.encodeBuffer((user_id + // ":" + user_password).getBytes()); String temp = Utils.base64encode((user_id + ":" + user_password).getBytes()); - // note: temp already contains \r and \n. - // remove \r and \n from the base64 encoded string. + // note: temp already contains \r and \n. + // remove \r and \n from the base64 encoded string. // causes problems when sending http post requests // using PrintStream.println() diff --git a/base/silent/src/com/netscape/pkisilent/http/HTTPResponse.java b/base/silent/src/com/netscape/pkisilent/http/HTTPResponse.java index 9ade1c133..f8073f7bc 100644 --- a/base/silent/src/com/netscape/pkisilent/http/HTTPResponse.java +++ b/base/silent/src/com/netscape/pkisilent/http/HTTPResponse.java @@ -60,7 +60,7 @@ public class HTTPResponse { /** * Creates a new HTTP response with the provided status code. - * + * * @param statusCode The HTTP status code for this response. * @param protocolVersion The protocol and version for this response. * @param responseMessage The message associated with this response. @@ -84,7 +84,7 @@ public class HTTPResponse { /** * Retrieves the status code for this HTTP response. - * + * * @return The status code for this HTTP response. */ public int getStatusCode() { @@ -93,7 +93,7 @@ public class HTTPResponse { /** * Retrieves the protocol version for this HTTP response. - * + * * @return The protocol version for this HTTP response. */ public String getProtocolVersion() { @@ -102,7 +102,7 @@ public class HTTPResponse { /** * Retrieves the response message for this HTTP response. - * + * * @return The response message for this HTTP response. */ public String getResponseMessage() { @@ -113,7 +113,7 @@ public class HTTPResponse { * Retrieves the value of the header with the specified name. If the * specified header has more than one value, then only the first will be * retrieved. - * + * * @return The value of the header with the specified name, or <CODE>null</CODE> if no such header is available. */ public String getHeader(String headerName) { @@ -130,7 +130,7 @@ public class HTTPResponse { /** * Retrieves the set of values for the specified header. - * + * * @return The set of values for the specified header. */ public String[] getHeaderValues(String headerName) { @@ -150,7 +150,7 @@ public class HTTPResponse { /** * Adds a header with the given name and value to this response. - * + * * @param headerName The name of the header to add to this response. * @param headerValue The value of the header to add to this response. */ @@ -174,7 +174,7 @@ public class HTTPResponse { /** * Retrieves a two-dimensional array containing the header data for this * response, with each element being an array containing a name/value pair. - * + * * @return A two-dimensional array containing the header data for this * response. */ @@ -191,7 +191,7 @@ public class HTTPResponse { /** * Retrieves the raw data included in this HTTP response. If the response did * not include any data, an empty array will be returned. - * + * * @return The raw data included in this HTTP response. */ public byte[] getResponseData() { @@ -255,7 +255,7 @@ public class HTTPResponse { /** * Sets the actual data associated with this response. - * + * * @param responseData The actual data associated with this response. */ public void setResponseData(byte[] responseData) { @@ -268,7 +268,7 @@ public class HTTPResponse { /** * Retrieves the content length associated with this response. - * + * * @return The content length associated with this response, or -1 if no * content length is available. */ @@ -278,7 +278,7 @@ public class HTTPResponse { /** * Retrieves the content type associated with this response. - * + * * @return The content type associated with this response, or <CODE>null</CODE> if no content type is available. */ public String getContentType() { @@ -288,7 +288,7 @@ public class HTTPResponse { /** * Retrieves an array containing the values of the cookies that should be set * based on the information in this response. - * + * * @return An array containing the values of the cookies that should be set * based on the information in this response. */ |