From 7c7b9d023cd466c1771068badc020dab36beb553 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Thu, 5 Apr 2012 14:49:11 -0500 Subject: 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 --- .../java-tools/src/com/netscape/cmstools/AtoB.java | 12 +- .../src/com/netscape/cmstools/AuditVerify.java | 4 +- .../java-tools/src/com/netscape/cmstools/BtoA.java | 12 +- .../src/com/netscape/cmstools/CMCEnroll.java | 6 +- .../src/com/netscape/cmstools/CMCRequest.java | 8 +- .../src/com/netscape/cmstools/CMCResponse.java | 6 +- .../src/com/netscape/cmstools/CRMFPopClient.java | 36 +-- .../src/com/netscape/cmstools/DRMTool.java | 356 ++++++++++----------- .../src/com/netscape/cmstools/ExtJoiner.java | 14 +- .../src/com/netscape/cmstools/GenExtKeyUsage.java | 2 +- .../com/netscape/cmstools/GenIssuerAltNameExt.java | 10 +- .../netscape/cmstools/GenSubjectAltNameExt.java | 10 +- .../src/com/netscape/cmstools/HttpClient.java | 4 +- .../src/com/netscape/cmstools/OCSPClient.java | 10 +- .../src/com/netscape/cmstools/PKCS10Client.java | 2 +- .../src/com/netscape/cmstools/PKCS12Export.java | 6 +- .../src/com/netscape/cmstools/PasswordCache.java | 14 +- .../src/com/netscape/cmstools/PrettyPrintCert.java | 12 +- .../src/com/netscape/cmstools/PrettyPrintCrl.java | 12 +- .../src/com/netscape/cmstools/TestCRLSigning.java | 6 +- .../src/com/netscape/cmstools/TokenInfo.java | 4 +- 21 files changed, 273 insertions(+), 273 deletions(-) (limited to 'base/java-tools/src/com') diff --git a/base/java-tools/src/com/netscape/cmstools/AtoB.java b/base/java-tools/src/com/netscape/cmstools/AtoB.java index 48301e492..fe743fc5c 100644 --- a/base/java-tools/src/com/netscape/cmstools/AtoB.java +++ b/base/java-tools/src/com/netscape/cmstools/AtoB.java @@ -34,21 +34,21 @@ import com.netscape.cmsutil.util.Utils; * and that the contents contain a blob encoded in an ASCII BASE 64 * format. Note that the data file may contain an optional "-----BEGIN" header * and/or an optional "-----END" trailer. - * + * *

* The program may be invoked as follows: - * + * *

- * 
+ *
  *      AtoB <input filename> <output filename>
- * 
+ *
  *      NOTE:  <input filename>   must contain an ASCII
  *                                BASE 64 encoded blob
- * 
+ *
  *             <output filename>  contains a BINARY
  *                                BASE 64 encoded blob
  * 
- * + * * @version $Revision$, $Date$ */ public class AtoB { diff --git a/base/java-tools/src/com/netscape/cmstools/AuditVerify.java b/base/java-tools/src/com/netscape/cmstools/AuditVerify.java index fb23e89fd..8e9be012d 100644 --- a/base/java-tools/src/com/netscape/cmstools/AuditVerify.java +++ b/base/java-tools/src/com/netscape/cmstools/AuditVerify.java @@ -40,7 +40,7 @@ import com.netscape.cmsutil.util.Utils; /** * Tool for verifying signed audit logs - * + * * @version $Revision$, $Date$ */ public class AuditVerify { @@ -202,7 +202,7 @@ public class AuditVerify { // verify signer's certificate // not checking validity because we want to allow verifying old logs - // + // if (!isSigningCert(cert_i)) { System.out.println("info: signing certificate is not a signing certificate"); System.exit(1); diff --git a/base/java-tools/src/com/netscape/cmstools/BtoA.java b/base/java-tools/src/com/netscape/cmstools/BtoA.java index 4c2e5c22a..8c240dac6 100644 --- a/base/java-tools/src/com/netscape/cmstools/BtoA.java +++ b/base/java-tools/src/com/netscape/cmstools/BtoA.java @@ -30,21 +30,21 @@ import com.netscape.cmsutil.util.Utils; * that the name of a data file is passed to the program via the command line, * and that the contents contain a blob encoded in a BINARY BASE 64 * format. - * + * *

* The program may be invoked as follows: - * + * *

- * 
+ *
  *      BtoA <input filename> <output filename>
- * 
+ *
  *      NOTE:  <input filename>   must contain a BINARY
  *                                BASE 64 encoded blob
- * 
+ *
  *             <output filename>  contains an ASCII
  *                                BASE 64 encoded blob
  * 
- * + * * @version $Revision$, $Date$ */ public class BtoA { diff --git a/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java b/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java index e2e51a29d..84b92e48c 100644 --- a/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java +++ b/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java @@ -69,9 +69,9 @@ import com.netscape.cmsutil.util.Utils; /** * Tool for signing PKCS #10 , return CMC enrollment request - * + * *

- * + * * @version $Revision$, $Date$ */ public class CMCEnroll { @@ -124,7 +124,7 @@ public class CMCEnroll { /** * getCMCBlob create and return the enrollent request. *

- * + * * @param signerCert the certificate of the authorized signer of the CMC revocation request. * @param manager the crypto manger. * @param nValue the nickname of the certificate inside the token. diff --git a/base/java-tools/src/com/netscape/cmstools/CMCRequest.java b/base/java-tools/src/com/netscape/cmstools/CMCRequest.java index 591361149..f77bc039d 100644 --- a/base/java-tools/src/com/netscape/cmstools/CMCRequest.java +++ b/base/java-tools/src/com/netscape/cmstools/CMCRequest.java @@ -86,11 +86,11 @@ import com.netscape.cmsutil.util.Utils; /** * Tool for creating CMC full request - * + * *

- * + * * @version $Revision$, $Date$ - * + * */ public class CMCRequest { @@ -142,7 +142,7 @@ public class CMCRequest { /** * getCMCBlob create and return the enrollent request. *

- * + * * @param signerCert the certificate of the authorized signer of the CMC revocation request. * @param nickname the nickname of the certificate inside the token. * @param rValue CRMF/PKCS10 request. diff --git a/base/java-tools/src/com/netscape/cmstools/CMCResponse.java b/base/java-tools/src/com/netscape/cmstools/CMCResponse.java index 4d68dd151..959f06f52 100644 --- a/base/java-tools/src/com/netscape/cmstools/CMCResponse.java +++ b/base/java-tools/src/com/netscape/cmstools/CMCResponse.java @@ -42,11 +42,11 @@ import org.mozilla.jss.pkix.cms.EncapsulatedContentInfo; /** * Tool for parsing a CMC response - * + * *

- * + * * @version $Revision$, $Date$ - * + * */ public class CMCResponse { diff --git a/base/java-tools/src/com/netscape/cmstools/CRMFPopClient.java b/base/java-tools/src/com/netscape/cmstools/CRMFPopClient.java index c1d463cdb..1ecaa6bd5 100644 --- a/base/java-tools/src/com/netscape/cmstools/CRMFPopClient.java +++ b/base/java-tools/src/com/netscape/cmstools/CRMFPopClient.java @@ -72,48 +72,48 @@ import com.netscape.cmsutil.util.Utils; /** * A command-line utility used to generate a Certificate Request Message * Format (CRMF) request with proof of possesion (POP). - * + * * Usage: - * + * *

  *     CRMFPopClient  TOKEN_PWD
  *                    PROFILE_NAME HOST PORT USER_NAME REQUESTOR_NAME
  *                    POP_OPTION
  *                    SUBJECT_DN [OUTPUT_CERT_REQ]
- * 
+ *
  *                    ---  or  ---
- * 
+ *
  *     CRMFPopClient  TOKEN_PWD
  *                    POP_OPTION
  *                    OUTPUT_CERT_REQ SUBJECT_DN
- * 
- * 
+ *
+ *
  *     where POP_OPTION can be [POP_SUCCESS or POP_FAIL or POP_NONE]
  * 
*

* Examples: - * + * *

  *     CRMFPopClient  password123
  *                    caEncUserCert host.example.com 1026 MyUid MyUid
  *                    [POP_SUCCESS or POP_FAIL or POP_NONE]
  *                    CN=MyTest,C=US,UID=MyUid
- * 
+ *
  *                    ---  or  ---
- * 
+ *
  *     CRMFPopClient  password123
  *                    caEncUserCert host.example.com 1026 joe joe
  *                    [POP_SUCCESS or POP_FAIL or POP_NONE]
- *                    CN=MyTest,C=US,UID=MyUid OUTPUT_CERT_REQ 
- * 
+ *                    CN=MyTest,C=US,UID=MyUid OUTPUT_CERT_REQ
+ *
  *                    ---  or  ---
- * 
+ *
  *     CRMFPopClient  password123
  *                    [POP_SUCCESS or POP_FAIL or POP_NONE]
  *                    OUTPUT_CERT_REQ CN=MyTest,C=US,UID=MyUid
  * 
*

- * + * *

  * IMPORTANT:  The file "transport.txt" needs to be created to contain the
  *             transport certificate in its base64 encoded format.  This
@@ -121,7 +121,7 @@ import com.netscape.cmsutil.util.Utils;
  *             in base64 encoded format with the header and footer removed.
  * 
*

- * + * * @version $Revision$, $Date$ */ public class CRMFPopClient { @@ -277,7 +277,7 @@ public class CRMFPopClient { try { CryptoManager.initialize(DB_DIR); } 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()); // return; } @@ -317,7 +317,7 @@ public class CRMFPopClient { KeyGenerator kg1 = token.getKeyGenerator(KeyGenAlgorithm.DES3); SymmetricKey sk = kg1.generate(); - System.out.println("."); //before KeyWrapper"); + System.out.println("."); //before KeyWrapper"); // wrap private key using session KeyWrapper wrapper1 = @@ -332,7 +332,7 @@ public class CRMFPopClient { System.out.println("."); //key wrapper wrapped"); - // wrap session using transport + // wrap session using transport KeyWrapper rsaWrap = token.getKeyWrapper( KeyWrapAlgorithm.RSA); @@ -487,7 +487,7 @@ public class CRMFPopClient { String Req = URLEncoder.encode(Req1, "UTF-8"); - // post PKCS10 + // post PKCS10 url = new URL("http://" diff --git a/base/java-tools/src/com/netscape/cmstools/DRMTool.java b/base/java-tools/src/com/netscape/cmstools/DRMTool.java index e2fd2c538..c536466c6 100644 --- a/base/java-tools/src/com/netscape/cmstools/DRMTool.java +++ b/base/java-tools/src/com/netscape/cmstools/DRMTool.java @@ -70,29 +70,29 @@ import com.netscape.cmsutil.util.Utils; /** * The DRMTool class is a utility program designed to operate on an LDIF file * to perform one or more of the following tasks: - * + * *

  *     (A) Use a new storage key (e. g. - a 2048-bit key to replace a
  *         1024-bit key) to rewrap the existing triple DES symmetric key
  *         that was used to wrap a user's private key.
- * 
+ *
  *         STARTING INVENTORY:
- * 
+ *
  *             (1) a DRMTOOL configuration file containing DRM LDIF record
  *                 types and the processing status of their associated fields
- * 
+ *
  *             (2) an LDIF file containing 'exported' DRM data
  *                 (referred to as the "source" DRM)
- * 
+ *
  *                 NOTE:  If this LDIF file contains data that was originally
  *                        from a DRM instance that was prior to RHCS 8, it
  *                        must have previously undergone the appropriate
  *                        migration steps.
- * 
+ *
  *             (3) the NSS security databases (e. g. - cert8.db, key3.db,
  *                 and secmod.db) associated with the data contained in
  *                 the source LDIF file
- * 
+ *
  *                 NOTE:  If the storage key was located on an HSM, then the
  *                        HSM must be available to the machine on which the
  *                        DRMTool is being executed (since the RSA private
@@ -101,302 +101,302 @@ import com.netscape.cmsutil.util.Utils;
  *                        password may be required to unlock access to
  *                        this key (e. g. - which may be located in
  *                        the source DRM's 'password.conf' file).
- * 
+ *
  *             (4) a file containing the ASCII BASE-64 storage certificate
  *                 from the DRM instance for which the output LDIF file is
  *                 intended (referred to as the "target")
- * 
+ *
  *         ENDING INVENTORY:
- * 
+ *
  *             (1) all items listed in the STARTING INVENTORY (unchanged)
- * 
+ *
  *             (2) a log file containing information suitable for audit
  *                 purposes
- * 
+ *
  *             (3) an LDIF file containing the revised data suitable for
  *                 'import' into a new DRM (referred to as the "target" DRM)
- * 
+ *
  *         DRMTool PARAMETERS:
- * 
+ *
  *             (1) the name of the DRMTOOL configuration file containing
  *                 DRM LDIF record types and the processing status of their
  *                 associated fields
- * 
+ *
  *             (2) the name of the input LDIF file containing data which was
  *                 'exported' from the source DRM instance
- * 
+ *
  *             (3) the name of the output LDIF file intended to contain the
  *                 revised data suitable for 'import' to a target DRM instance
- * 
+ *
  *             (4) the name of the log file that may be used for auditing
  *                 purposes
- * 
+ *
  *             (5) the path to the security databases that were used by
  *                 the source DRM instance
- * 
+ *
  *             (6) the name of the token that was used by
  *                 the source DRM instance
- * 
+ *
  *             (7) the name of the storage certificate that was used by
  *                 the source DRM instance
- * 
+ *
  *             (8) the name of the file containing the ASCII BASE-64 storage
  *                 certificate from the target DRM instance for which the
  *                 output LDIF file is intended
- * 
+ *
  *             (9) OPTIONALLY, the name of a file which ONLY contains the
  *                 password needed to access the source DRM instance's
  *                 security databases
- * 
+ *
  *            (10) OPTIONALLY, choose to change the specified source DRM naming
  *                 context to the specified target DRM naming context
- * 
+ *
  *            (11) OPTIONALLY, choose to ONLY process CA enrollment requests,
  *                 CA recovery requests, CA key records, TPS netkeyKeygen
  *                 enrollment requests, TPS recovery requests, and
  *                 TPS key records
- * 
+ *
  *         DATA FIELDS AFFECTED (using default config file values):
- * 
+ *
  *             (1) CA DRM enrollment request
- * 
+ *
  *                 (a) dateOfModify
  *                 (b) extdata-requestnotes
- * 
+ *
  *             (2) CA DRM key record
- * 
+ *
  *                 (a) dateOfModify
  *                 (b) privateKeyData
- * 
+ *
  *             (3) CA DRM recovery request
- * 
+ *
  *                 (a) dateOfModify
  *                 (b) extdata-requestnotes (NEW)
- * 
+ *
  *             (4) TPS DRM netkeyKeygen (enrollment) request
- * 
+ *
  *                 (a) dateOfModify
  *                 (b) extdata-requestnotes (NEW)
- * 
+ *
  *             (5) TPS DRM key record
- * 
+ *
  *                 (a) dateOfModify
  *                 (b) privateKeyData
- * 
+ *
  *             (6) TPS DRM recovery request
- * 
+ *
  *                 (a) dateOfModify
  *                 (b) extdata-requestnotes (NEW)
- * 
+ *
  *     (B) Specify an ID offset to append to existing numeric data
  *         (e. g. - to renumber data for use in DRM consolidation efforts).
- * 
+ *
  *         STARTING INVENTORY:
- * 
+ *
  *             (1) a DRMTOOL configuration file containing DRM LDIF record
  *                 types and the processing status of their associated fields
- * 
+ *
  *             (2) an LDIF file containing 'exported' DRM data
  *                 (referred to as the "source" DRM)
- * 
+ *
  *                 NOTE:  If this LDIF file contains data that was originally
  *                        from a DRM instance that was prior to RHCS 8, it
  *                        must have previously undergone the appropriate
  *                        migration steps.
- * 
+ *
  *         ENDING INVENTORY:
- * 
+ *
  *             (1) all items listed in the STARTING INVENTORY (unchanged)
- * 
+ *
  *             (2) a log file containing information suitable for audit
  *                 purposes
- * 
+ *
  *             (3) an LDIF file containing the revised data suitable for
  *                 'import' into a new DRM (referred to as the "target" DRM)
- * 
+ *
  *         DRMTool PARAMETERS:
- * 
+ *
  *             (1) the name of the DRMTOOL configuration file containing
  *                 DRM LDIF record types and the processing status of their
  *                 associated fields
- * 
+ *
  *             (2) the name of the input LDIF file containing data which was
  *                 'exported' from the source DRM instance
- * 
+ *
  *             (3) the name of the output LDIF file intended to contain the
  *                 revised data suitable for 'import' to a target DRM instance
- * 
+ *
  *             (4) the name of the log file that may be used for auditing
  *                 purposes
- * 
+ *
  *             (5) a large numeric ID offset (mask) to be appended to existing
  *                 numeric data in the source DRM instance's LDIF file
- * 
+ *
  *             (6) OPTIONALLY, choose to change the specified source DRM naming
  *                 context to the specified target DRM naming context
- * 
+ *
  *             (7) OPTIONALLY, choose to ONLY process CA enrollment requests,
  *                 CA recovery requests, CA key records, TPS netkeyKeygen
  *                 enrollment requests, TPS recovery requests, and
  *                 TPS key records
- * 
+ *
  *         DATA FIELDS AFFECTED (using default config file values):
- * 
+ *
  *             (1) CA DRM enrollment request
- * 
+ *
  *                 (a) cn
  *                 (b) dateOfModify
  *                 (c) extdata-keyrecord
  *                 (d) extdata-requestnotes
  *                 (e) requestId
- * 
+ *
  *             (2) CA DRM key record
- * 
+ *
  *                 (a) cn
  *                 (b) dateOfModify
  *                 (c) serialno
- * 
+ *
  *             (3) CA DRM recovery request
- * 
+ *
  *                 (a) cn
  *                 (b) dateOfModify
  *                 (c) extdata-requestid
  *                 (d) extdata-requestnotes (NEW)
  *                 (e) extdata-serialnumber
  *                 (f) requestId
- * 
+ *
  *             (4) TPS DRM netkeyKeygen (enrollment) request
- * 
+ *
  *                 (a) cn
  *                 (b) dateOfModify
  *                 (c) extdata-keyrecord
  *                 (d) extdata-requestid
  *                 (e) extdata-requestnotes (NEW)
  *                 (f) requestId
- * 
+ *
  *             (5) TPS DRM key record
- * 
+ *
  *                 (a) cn
  *                 (b) dateOfModify
  *                 (c) serialno
- * 
+ *
  *             (6) TPS DRM recovery request
- * 
+ *
  *                 (a) cn
  *                 (b) dateOfModify
  *                 (c) extdata-requestid
  *                 (d) extdata-requestnotes (NEW)
  *                 (e) extdata-serialnumber
  *                 (f) requestId
- * 
+ *
  *     (C) Specify an ID offset to be removed from existing numeric data
  *         (e. g. - to undo renumbering used in DRM consolidation efforts).
- * 
+ *
  *         STARTING INVENTORY:
- * 
+ *
  *             (1) a DRMTOOL configuration file containing DRM LDIF record
  *                 types and the processing status of their associated fields
- * 
+ *
  *             (2) an LDIF file containing 'exported' DRM data
  *                 (referred to as the "source" DRM)
- * 
+ *
  *                 NOTE:  If this LDIF file contains data that was originally
  *                        from a DRM instance that was prior to RHCS 8, it
  *                        must have previously undergone the appropriate
  *                        migration steps.
- * 
+ *
  *         ENDING INVENTORY:
- * 
+ *
  *             (1) all items listed in the STARTING INVENTORY (unchanged)
- * 
+ *
  *             (2) a log file containing information suitable for audit
  *                 purposes
- * 
+ *
  *             (3) an LDIF file containing the revised data suitable for
  *                 'import' into a new DRM (referred to as the "target" DRM)
- * 
+ *
  *         DRMTool PARAMETERS:
- * 
+ *
  *             (1) the name of the DRMTOOL configuration file containing
  *                 DRM LDIF record types and the processing status of their
  *                 associated fields
- * 
+ *
  *             (2) the name of the input LDIF file containing data which was
  *                 'exported' from the source DRM instance
- * 
+ *
  *             (3) the name of the output LDIF file intended to contain the
  *                 revised data suitable for 'import' to a target DRM instance
- * 
+ *
  *             (4) the name of the log file that may be used for auditing
  *                 purposes
- * 
+ *
  *             (5) a large numeric ID offset (mask) to be removed from existing
  *                 numeric data in the source DRM instance's LDIF file
- * 
+ *
  *             (6) OPTIONALLY, choose to change the specified source DRM naming
  *                 context to the specified target DRM naming context
- * 
+ *
  *             (7) OPTIONALLY, choose to ONLY process CA enrollment requests,
  *                 CA recovery requests, CA key records, TPS netkeyKeygen
  *                 enrollment requests, TPS recovery requests, and
  *                 TPS key records
- * 
+ *
  *         DATA FIELDS AFFECTED (using default config file values):
- * 
+ *
  *             (1) CA DRM enrollment request
- * 
+ *
  *                 (a) cn
  *                 (b) dateOfModify
  *                 (c) extdata-keyrecord
  *                 (d) extdata-requestnotes
  *                 (e) requestId
- * 
+ *
  *             (2) CA DRM key record
- * 
+ *
  *                 (a) cn
  *                 (b) dateOfModify
  *                 (c) serialno
- * 
+ *
  *             (3) CA DRM recovery request
- * 
+ *
  *                 (a) cn
  *                 (b) dateOfModify
  *                 (c) extdata-requestid
  *                 (d) extdata-requestnotes (NEW)
  *                 (e) extdata-serialnumber
  *                 (f) requestId
- * 
+ *
  *             (4) TPS DRM netkeyKeygen (enrollment) request
- * 
+ *
  *                 (a) cn
  *                 (b) dateOfModify
  *                 (c) extdata-keyrecord
  *                 (d) extdata-requestid
  *                 (e) extdata-requestnotes (NEW)
  *                 (f) requestId
- * 
+ *
  *             (5) TPS DRM key record
- * 
+ *
  *                 (a) cn
  *                 (b) dateOfModify
  *                 (c) serialno
- * 
+ *
  *             (6) TPS DRM recovery request
- * 
+ *
  *                 (a) cn
  *                 (b) dateOfModify
  *                 (c) extdata-requestid
  *                 (d) extdata-requestnotes (NEW)
  *                 (e) extdata-serialnumber
  *                 (f) requestId
- * 
+ *
  * 
- * + * *

* DRMTool may be invoked as follows: - * + * *

- * 
+ *
  *    DRMTool
  *    -drmtool_config_file <path + drmtool config file>
  *    -source_ldif_file <path + source ldif file>
@@ -412,86 +412,86 @@ import com.netscape.cmsutil.util.Utils;
  *    [-source_drm_naming_context '<original source DRM naming context>']
  *    [-target_drm_naming_context '<renamed target DRM naming context>']
  *    [-process_requests_and_key_records_only]
- * 
+ *
  *    where the following options are 'Mandatory':
- * 
+ *
  *    -drmtool_config_file <path + drmtool config file>
  *    -source_ldif_file <path + source ldif file>
  *    -target_ldif_file <path + target ldif file>
  *    -log_file <path + log file>
- * 
+ *
  *    AND at least ONE of the following are a 'Mandatory' set of options:
- * 
+ *
  *        (a) options for using a new storage key for rewrapping:
- * 
+ *
  *            [-source_pki_security_database_path
  *             <path to PKI source database>]
  *            [-source_storage_token_name '<source token>']
  *            [-source_storage_certificate_nickname '<source nickname>']
  *            [-target_storage_certificate_file
  *             <path to target certificate file>]
- * 
+ *
  *            AND OPTIONALLY, specify the name of a file which ONLY contains
  *            the password needed to access the source DRM instance's
  *            security databases:
- * 
+ *
  *            [-source_pki_security_database_pwdfile
  *             <path to PKI password file>]
- * 
+ *
  *            AND OPTIONALLY, rename source DRM naming context --> target
  *            DRM naming context:
- * 
+ *
  *            [-source_drm_naming_context '<source DRM naming context>']
  *            [-target_drm_naming_context '<target DRM naming context>']
- * 
+ *
  *            AND OPTIONALLY, process requests and key records ONLY:
- * 
+ *
  *            [-process_requests_and_key_records_only]
- * 
+ *
  *        (b) option for appending the specified numeric ID offset
  *            to existing numerical data:
- * 
+ *
  *            [-append_id_offset <numeric offset>]
- * 
+ *
  *            AND OPTIONALLY, rename source DRM naming context --> target
  *            DRM naming context:
- * 
+ *
  *            [-source_drm_naming_context '<source DRM naming context>']
  *            [-target_drm_naming_context '<target DRM naming context>']
- * 
+ *
  *            AND OPTIONALLY, process requests and key records ONLY:
- * 
+ *
  *            [-process_requests_and_key_records_only]
- * 
+ *
  *        (c) option for removing the specified numeric ID offset
  *            from existing numerical data:
- * 
+ *
  *            AND OPTIONALLY, rename source DRM naming context --> target
  *            DRM naming context:
- * 
+ *
  *            [-source_drm_naming_context '<source DRM naming context>']
  *            [-target_drm_naming_context '<target DRM naming context>']
- * 
+ *
  *            [-remove_id_offset <numeric offset>]
- * 
+ *
  *            AND OPTIONALLY, process requests and key records ONLY:
- * 
+ *
  *            [-process_requests_and_key_records_only]
- * 
+ *
  *        (d) (a) rewrap AND (b) append ID offset
  *            [AND OPTIONALLY, rename source DRM naming context --> target
  *            DRM naming context]
  *            [AND OPTIONALLY process requests and key records ONLY]
- * 
+ *
  *        (e) (a) rewrap AND (c) remove ID offset
  *            [AND OPTIONALLY, rename source DRM naming context --> target
  *            DRM naming context]
  *            [AND OPTIONALLY process requests and key records ONLY]
- * 
+ *
  *        NOTE:  Options (b) and (c) are mutually exclusive!
- * 
+ *
  * 
- * + * * @author mharmsen * @version $Revision$, $Date$ */ @@ -993,7 +993,7 @@ public class DRMTool { /** * This method is used to get the current date and time. *

- * + * * @param pattern string containing desired format of date and time * @return a formatted string containing the current date and time */ @@ -1322,7 +1322,7 @@ public class DRMTool { /** * This method opens a new log file for writing. *

- * + * * @param logfile string containing the name of the log file to be opened */ private static void open_log(String logfile) { @@ -1344,7 +1344,7 @@ public class DRMTool { /** * This method closes the specified log file. *

- * + * * @param logfile string containing the name of the log file to be closed */ private static void close_log(String logfile) { @@ -1355,7 +1355,7 @@ public class DRMTool { * This method writes the specified message to the log file, and also * to 'stderr' if the boolean flag is set to 'true'. *

- * + * * @param msg string containing the message to be written to the log file * @param stderr boolean which also writes the message to 'stderr' if 'true' */ @@ -1377,10 +1377,10 @@ public class DRMTool { /** * Helper method to determine if two arrays contain the same values. - * + * * This method is based upon code from 'com.netscape.kra.StorageKeyUnit'. *

- * + * * @param bytes first array of bytes * @param ints second array of bytes * @return true if the two arrays are identical @@ -1406,10 +1406,10 @@ public class DRMTool { /** * This method is used to obtain the private RSA storage key from * the "source" DRM instance's security databases. - * + * * This method is based upon code from 'com.netscape.kra.StorageKeyUnit'. *

- * + * * @return the private RSA storage key from the "source" DRM */ private static PrivateKey getPrivateKey() { @@ -1439,11 +1439,11 @@ public class DRMTool { * This method gets the public key from the certificate stored * in the "target" DRM storage certificate file. It also obtains * the keysize of this RSA key. - * + * * This method is based upon code from * 'com.netscape.cmstools.PrettyPrintCert'. *

- * + * * @return the public RSA storage key from the "target" DRM */ private static PublicKey getPublicKey() { @@ -1567,7 +1567,7 @@ public class DRMTool { * the public RSA storage key from the certificate stored in * the "target" DRM storage certificate file. *

- * + * * @return true if successfully able to obtain both keys */ private static boolean obtain_RSA_rewrapping_keys() { @@ -1797,16 +1797,16 @@ public class DRMTool { * "mStorageUnit.decryptInternalPrivate( byte wrappedKeyData[] )" and * "mStorageUnit.encryptInternalPrivate( byte priKey[] )", where * "wrappedKeyData" uses the following structure: - * + * * SEQUENCE { * encryptedSession OCTET STRING, * encryptedPrivate OCTET STRING * } - * + * * This method is based upon code from * 'com.netscape.kra.EncryptionUnit'. *

- * + * * @return a byte[] containing the rewrappedKeyData */ private static byte[] rewrap_wrapped_key_data(byte[] wrappedKeyData) @@ -1969,7 +1969,7 @@ public class DRMTool { * Helper method used to remove all EOLs ('\n' and '\r') * from the passed in string. *

- * + * * @param data consisting of a string containing EOLs * @return a string consisting of a string with no EOLs */ @@ -1994,7 +1994,7 @@ public class DRMTool { * into a string containing formatted data suitable as an entry for * an LDIF file. *

- * + * * @param length the length of the first line of data * @param data a string containing unformatted data * @return formatted data consisting of data formatted for an LDIF record @@ -2040,24 +2040,24 @@ public class DRMTool { /** * Helper method which converts an "indexed" BigInteger into * its String representation. - * + * *

-     * 
+     *
      *     NOTE:  Indexed data means that the numeric data
      *            is stored with a prepended length
      *            (e. g. - record '73' is stored as '0273').
-     * 
+     *
      *            Indexed data is currently limited to '99' digits
      *            (an index of '00' is invalid).  See
      *            'com.netscape.cmscore.dbs.BigIntegerMapper.java'
      *            for details.
-     * 
+     *
      * 
- * + * * This method is based upon code from * 'com.netscape.cmscore.dbs.BigIntegerMapper'. *

- * + * * @param i an "indexed " BigInteger * @return the string representation of the "indexed" BigInteger */ @@ -2076,22 +2076,22 @@ public class DRMTool { /** * Helper method which converts the string representation of an * "indexed" integer into a BigInteger. - * + * *

      *     NOTE:  Indexed data means that the numeric data
      *            is stored with a prepended length
      *            (e. g. - record '73' is stored as '0273').
-     * 
+     *
      *            Indexed data is currently limited to '99' digits
      *            (an index of '00' is invalid).  See
      *            'com.netscape.cmscore.dbs.BigIntegerMapper.java'
      *            for details.
      * 
- * + * * This method is based upon code from * 'com.netscape.cmscore.dbs.BigIntegerMapper'. *

- * + * * @param i the string representation of the "indexed" integer * @return an "indexed " BigInteger */ @@ -2106,9 +2106,9 @@ public class DRMTool { * This method accepts an "attribute", its "delimiter", a string * representation of numeric data, and a flag indicating whether * or not the string representation is "indexed". - * + * * An "attribute" consists of one of the following values: - * + * *

      *     DRM_LDIF_CN = "cn:";
      *     DRM_LDIF_DN_EMBEDDED_CN_DATA = "dn: cn";
@@ -2117,20 +2117,20 @@ public class DRMTool {
      *     DRM_LDIF_EXTDATA_SERIAL_NUMBER = "extdata-serialnumber:";
      *     DRM_LDIF_REQUEST_ID = "requestId:";
      *     DRM_LDIF_SERIAL_NO = "serialno:";
-     * 
-     * 
+     *
+     *
      *     NOTE:  Indexed data means that the numeric data
      *            is stored with a prepended length
      *            (e. g. - record '73' is stored as '0273').
-     * 
+     *
      *            Indexed data is currently limited to '99' digits
      *            (an index of '00' is invalid).  See
      *            'com.netscape.cmscore.dbs.BigIntegerMapper.java'
      *            for details.
      * 
- * + * *

- * + * * @param attribute the string representation of the "name" * @param delimiter the separator between the attribute and its contents * @param source_line the string containing the "name" and "value" @@ -2269,7 +2269,7 @@ public class DRMTool { /** * Helper method which composes the output line for DRM_LDIF_CN. *

- * + * * @param record_type the string representation of the input record type * @param line the string representation of the input line * @return the composed output line @@ -2344,7 +2344,7 @@ public class DRMTool { /** * Helper method which composes the output line for DRM_LDIF_DATE_OF_MODIFY. *

- * + * * @param record_type the string representation of the input record type * @param line the string representation of the input line * @return the composed output line @@ -2443,7 +2443,7 @@ public class DRMTool { /** * Helper method which composes the output line for DRM_LDIF_DN. *

- * + * * @param record_type the string representation of the input record type * @param line the string representation of the input line * @return the composed output line @@ -2685,7 +2685,7 @@ public class DRMTool { * Helper method which composes the output line for * DRM_LDIF_EXTDATA_KEY_RECORD. *

- * + * * @param record_type the string representation of the input record type * @param line the string representation of the input line * @return the composed output line @@ -2728,7 +2728,7 @@ public class DRMTool { * Helper method which composes the output line for * DRM_LDIF_EXTDATA_REQUEST_ID. *

- * + * * @param record_type the string representation of the input record type * @param line the string representation of the input line * @return the composed output line @@ -2776,7 +2776,7 @@ public class DRMTool { * Helper method which composes the output line for * DRM_LDIF_EXTDATA_REQUEST_NOTES. *

- * + * * @param record_type the string representation of the input record type * @param line the string representation of the input line * @return the composed output line @@ -3315,7 +3315,7 @@ public class DRMTool { * Helper method which composes the output line for * DRM_LDIF_EXTDATA_REQUEST_NOTES. *

- * + * * @param record_type the string representation of the input record type * @param previous_line the string representation of the previous input line * @param writer the PrintWriter used to output this new LDIF line @@ -3629,7 +3629,7 @@ public class DRMTool { * Helper method which composes the output line for * DRM_LDIF_EXTDATA_SERIAL_NUMBER. *

- * + * * @param record_type the string representation of the input record type * @param line the string representation of the input line * @return the composed output line @@ -3663,7 +3663,7 @@ public class DRMTool { * Helper method which composes the output line for * DRM_LDIF_PRIVATE_KEY_DATA. *

- * + * * @param record_type the string representation of the input record type * @param line the string representation of the input line * @return the composed output line @@ -3849,7 +3849,7 @@ public class DRMTool { /** * Helper method which composes the output line for DRM_LDIF_REQUEST_ID. *

- * + * * @param record_type the string representation of the input record type * @param line the string representation of the input line * @return the composed output line @@ -3900,7 +3900,7 @@ public class DRMTool { /** * Helper method which composes the output line for DRM_LDIF_SERIAL_NO. *

- * + * * @param record_type the string representation of the input record type * @param line the string representation of the input line * @return the composed output line @@ -3949,7 +3949,7 @@ public class DRMTool { * Helper method which composes the output line for * DRM_LDIF_EXTDATA_AUTH_TOKEN_USER. *

- * + * * @param record_type the string representation of the input record type * @param line the string representation of the input line * @return the composed output line @@ -3996,7 +3996,7 @@ public class DRMTool { * Helper method which composes the output line for * DRM_LDIF_EXTDATA_AUTH_TOKEN_USER_DN. *

- * + * * @param record_type the string representation of the input record type * @param line the string representation of the input line * @return the composed output line @@ -4043,7 +4043,7 @@ public class DRMTool { * This method performs the actual parsing of the "source" LDIF file * and produces the "target" LDIF file. *

- * + * * @return true if the "target" LDIF file is successfully created */ private static boolean convert_source_ldif_to_target_ldif() { @@ -4305,7 +4305,7 @@ public class DRMTool { * This method performs the actual parsing of the DRMTOOL config file * and initializes how the DRM Record Fields should be processed. *

- * + * * @return true if the DRMTOOL config file is successfully processed */ private static boolean process_drmtool_config_file() { @@ -4414,7 +4414,7 @@ public class DRMTool { /** * The main DRMTool method. *

- * + * * @param args DRMTool options */ public static void main(String[] args) { diff --git a/base/java-tools/src/com/netscape/cmstools/ExtJoiner.java b/base/java-tools/src/com/netscape/cmstools/ExtJoiner.java index 48f180add..95c3162f4 100644 --- a/base/java-tools/src/com/netscape/cmstools/ExtJoiner.java +++ b/base/java-tools/src/com/netscape/cmstools/ExtJoiner.java @@ -30,19 +30,19 @@ import netscape.security.util.DerValue; * so that the final output can be used in configuration * wizard for specifing extra extensions in default * certificates (i.e. CA certificate, SSL certificate). - * + * * Usage: - * + * *

  *  ExtJoiner \
  *    <ext_file0> <ext_file1> ... <ext_fileN>
- * 
+ *
  *  where,
- *    <ext_file> is a file that has the base64 
+ *    <ext_file> is a file that has the base64
  *    encoded DER encoding of an X509 Extension
- * 
+ *
  *  ExtensionSequence ::= SEQUENCE OF Extension;
- * 
+ *
  *  0 30  142: SEQUENCE {
  *  3 30   69:   SEQUENCE {
  *  5 06    3:     OBJECT IDENTIFIER issuerAltName (2 5 29 18)
@@ -62,7 +62,7 @@ import netscape.security.util.DerValue;
  *           :     }
  *           :   }
  * 
- * + * * @version $Revision$, $Date$ */ public class ExtJoiner { diff --git a/base/java-tools/src/com/netscape/cmstools/GenExtKeyUsage.java b/base/java-tools/src/com/netscape/cmstools/GenExtKeyUsage.java index 35072aae3..9476d3ee4 100644 --- a/base/java-tools/src/com/netscape/cmstools/GenExtKeyUsage.java +++ b/base/java-tools/src/com/netscape/cmstools/GenExtKeyUsage.java @@ -32,7 +32,7 @@ import netscape.security.x509.Extension; * The OIDs to be included in the extension are passed as command-line * arguments. The OIDs are described in RFC 2459. For example, * the OID for code signing is 1.3.6.1.5.5.7.3.3. - * + * * @version $Revision$, $Date$ */ public class GenExtKeyUsage { diff --git a/base/java-tools/src/com/netscape/cmstools/GenIssuerAltNameExt.java b/base/java-tools/src/com/netscape/cmstools/GenIssuerAltNameExt.java index 5c905278f..193912a88 100644 --- a/base/java-tools/src/com/netscape/cmstools/GenIssuerAltNameExt.java +++ b/base/java-tools/src/com/netscape/cmstools/GenIssuerAltNameExt.java @@ -37,16 +37,16 @@ import netscape.security.x509.X500Name; * This program generates an issuer alternative name extension * in base-64 encoding. The encoding output can be used with * the configuration wizard. - * + * * Usage: - * + * *
  *  GenIssuerAltNameExt \
  *    <general_type0> <general_name0> ... <general_typeN> <general_nameN>
- * 
+ *
  *  where,
  *    <general_type> can be one of the following string:
- *      DNSName 
+ *      DNSName
  *      EDIPartyName
  *      IPAddressName
  *      URIName
@@ -55,7 +55,7 @@ import netscape.security.x509.X500Name;
  *      X500Name
  *    <general_name> is string
  * 
- * + * * @version $Revision$, $Date$ */ public class GenIssuerAltNameExt { diff --git a/base/java-tools/src/com/netscape/cmstools/GenSubjectAltNameExt.java b/base/java-tools/src/com/netscape/cmstools/GenSubjectAltNameExt.java index 35e07f772..d6cad4ce8 100644 --- a/base/java-tools/src/com/netscape/cmstools/GenSubjectAltNameExt.java +++ b/base/java-tools/src/com/netscape/cmstools/GenSubjectAltNameExt.java @@ -37,16 +37,16 @@ import netscape.security.x509.X500Name; * This program generates an subject alternative name extension * in base-64 encoding. The encoding output can be used with * the configuration wizard. - * + * * Usage: - * + * *
  *  GenSubjectAltNameExt \
  *    <general_type0> <general_name0> ... <general_typeN> <general_nameN>
- * 
+ *
  *  where,
  *    <general_type> can be one of the following string:
- *      DNSName 
+ *      DNSName
  *      EDIPartyName
  *      IPAddressName
  *      URIName
@@ -55,7 +55,7 @@ import netscape.security.x509.X500Name;
  *      X500Name
  *    <general_name> is string
  * 
- * + * * @version $Revision$, $Date$ */ public class GenSubjectAltNameExt { diff --git a/base/java-tools/src/com/netscape/cmstools/HttpClient.java b/base/java-tools/src/com/netscape/cmstools/HttpClient.java index c8817b52f..2188737a3 100644 --- a/base/java-tools/src/com/netscape/cmstools/HttpClient.java +++ b/base/java-tools/src/com/netscape/cmstools/HttpClient.java @@ -45,7 +45,7 @@ import com.netscape.cmsutil.util.Utils; /** * This class implements a CMC Enroll client for testing. - * + * * @version $Revision$, $Date$ */ public class HttpClient { @@ -166,7 +166,7 @@ public class HttpClient { is = socket.getInputStream(); } - // send request + // send request if (servlet == null) { System.out.println("Missing servlet name."); printUsage(); diff --git a/base/java-tools/src/com/netscape/cmstools/OCSPClient.java b/base/java-tools/src/com/netscape/cmstools/OCSPClient.java index 5b9abe495..fc2f081e9 100644 --- a/base/java-tools/src/com/netscape/cmstools/OCSPClient.java +++ b/base/java-tools/src/com/netscape/cmstools/OCSPClient.java @@ -58,7 +58,7 @@ import com.netscape.cmsutil.util.Utils; /** * This class implements a OCSP client for testing. - * + * * @version $Revision$, $Date$ */ public class OCSPClient { @@ -92,7 +92,7 @@ public class OCSPClient { throws Exception { MessageDigest md = MessageDigest.getInstance("SHA"); - // calculate issuer key hash + // calculate issuer key hash X509CertImpl x509Cert = new X509CertImpl(caCert.getEncoded()); X509Key x509key = (X509Key) x509Cert.getPublicKey(); byte issuerKeyHash[] = md.digest(x509key.getKey()); @@ -118,7 +118,7 @@ public class OCSPClient { byte request_data[], String output) throws Exception { Socket socket = new Socket(host, port); - // send request + // send request System.out.println("URI: " + uri); DataOutputStream dos = new DataOutputStream(socket.getOutputStream()); @@ -156,12 +156,12 @@ public class OCSPClient { hack = true; } } - } // while + } // while } catch (IOException e) { } fof.close(); - // parse OCSPResponse + // parse OCSPResponse BufferedInputStream fis = new BufferedInputStream( new FileInputStream(output)); diff --git a/base/java-tools/src/com/netscape/cmstools/PKCS10Client.java b/base/java-tools/src/com/netscape/cmstools/PKCS10Client.java index 7cd50a37a..1e60a1c0e 100644 --- a/base/java-tools/src/com/netscape/cmstools/PKCS10Client.java +++ b/base/java-tools/src/com/netscape/cmstools/PKCS10Client.java @@ -59,7 +59,7 @@ import com.netscape.cmsutil.util.Utils; * approved, a certificate is created for the request, and certificate attributes, such as extensions, are populated * according to certificate profiles. *

- * + * * @version $Revision$, $Date$ */ public class PKCS10Client { diff --git a/base/java-tools/src/com/netscape/cmstools/PKCS12Export.java b/base/java-tools/src/com/netscape/cmstools/PKCS12Export.java index 8d8e858f2..ad1c485c0 100644 --- a/base/java-tools/src/com/netscape/cmstools/PKCS12Export.java +++ b/base/java-tools/src/com/netscape/cmstools/PKCS12Export.java @@ -54,11 +54,11 @@ import org.mozilla.jss.util.Password; /** * Tool for creating PKCS12 file - * + * *

- * + * * @version $Revision$, $Date$ - * + * */ public class PKCS12Export { diff --git a/base/java-tools/src/com/netscape/cmstools/PasswordCache.java b/base/java-tools/src/com/netscape/cmstools/PasswordCache.java index ba7fb72a4..cdddb5f1e 100644 --- a/base/java-tools/src/com/netscape/cmstools/PasswordCache.java +++ b/base/java-tools/src/com/netscape/cmstools/PasswordCache.java @@ -45,17 +45,17 @@ import com.netscape.cmsutil.util.Utils; /** * Tool for interacting with the PWcache - * + * * @version $Revision$, $Date$ */ public class PasswordCache { - /* These are the tags that identify various passwords - * They should probably be converted instances of some - * class so that we can expose an API to add additional + /* These are the tags that identify various passwords + * They should probably be converted instances of some + * class so that we can expose an API to add additional * TAG's for use if I want to add a password for use - * with my own authenticaion module + * with my own authenticaion module */ public static final String PROP_PWC_NICKNAME = "sso_key"; public static final String PW_TAG_INTERNAL_LDAP_DB = "Internal LDAP Database"; @@ -89,7 +89,7 @@ public class PasswordCache { /** * clean up an argv by removing the trailing, empty arguments - * + * * This is necessary to support the script wrapper which calls the * tool with arguments in quotes such as: * "$1" "$2" @@ -342,7 +342,7 @@ public class PasswordCache { } } -/* +/* * A class for managing passwords in the SDR password cache * * @author Christina Fu diff --git a/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java b/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java index 382c4e312..88d8cb05b 100644 --- a/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java +++ b/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java @@ -42,21 +42,21 @@ import netscape.security.x509.X509CertInfo; * program via the command line, and that the contents contain a certificate * encoded in an ASCII BASE 64 format. Note that the data file may contain * an optional "-----BEGIN" header and/or an optional "-----END" trailer. - * + * *

* The program may be invoked as follows: - * + * *

- * 
+ *
  *      PrettyPrintCert <input filename> [output filename]
- * 
+ *
  *      NOTE:  <input filename>   must contain an ASCII
  *                                BASE 64 encoded certificate
- * 
+ *
  *             <output filename>  contains a certificate displayed
  *                                in a "pretty print" ASCII format
  * 
- * + * * @version $Revision$, $Date$ */ diff --git a/base/java-tools/src/com/netscape/cmstools/PrettyPrintCrl.java b/base/java-tools/src/com/netscape/cmstools/PrettyPrintCrl.java index 8801b2423..6bb43aee7 100644 --- a/base/java-tools/src/com/netscape/cmstools/PrettyPrintCrl.java +++ b/base/java-tools/src/com/netscape/cmstools/PrettyPrintCrl.java @@ -45,21 +45,21 @@ import netscape.security.x509.X509ExtensionException; * program via the command line, and that the contents contain a CRL * encoded in an ASCII BASE 64 format. Note that the data file may contain * an optional "-----BEGIN" header and/or an optional "-----END" trailer. - * + * *

* The program may be invoked as follows: - * + * *

- * 
+ *
  *      PrettyPrintCrl <input filename> [output filename]
- * 
+ *
  *      NOTE:  <input filename>   must contain an ASCII
  *                                BASE 64 encoded CRL
- * 
+ *
  *             <output filename>  contains a CRL displayed
  *                                in a "pretty print" ASCII format
  * 
- * + * * @version $Revision$, $Date$ */ diff --git a/base/java-tools/src/com/netscape/cmstools/TestCRLSigning.java b/base/java-tools/src/com/netscape/cmstools/TestCRLSigning.java index 369010abf..0f41e0fc7 100644 --- a/base/java-tools/src/com/netscape/cmstools/TestCRLSigning.java +++ b/base/java-tools/src/com/netscape/cmstools/TestCRLSigning.java @@ -35,9 +35,9 @@ import org.mozilla.jss.util.Password; /** * Tool used to test out signing a CRL - * + * *

- * + * * @version $Revision$ Date: $ */ public class TestCRLSigning { @@ -59,7 +59,7 @@ public class TestCRLSigning { CryptoManager.initialize(vals); cm = CryptoManager.getInstance(); - // Login to token + // Login to token CryptoToken token = null; if (tokenname.equals("internal")) { token = cm.getInternalKeyStorageToken(); diff --git a/base/java-tools/src/com/netscape/cmstools/TokenInfo.java b/base/java-tools/src/com/netscape/cmstools/TokenInfo.java index fc3d13b42..7efd8aa34 100644 --- a/base/java-tools/src/com/netscape/cmstools/TokenInfo.java +++ b/base/java-tools/src/com/netscape/cmstools/TokenInfo.java @@ -27,9 +27,9 @@ import org.mozilla.jss.pkcs11.PK11Module; * Tool used to determine which external hardware tokens are visible to the * Certificate System subsystem. This can be used to diagnose whether problems * using tokens are related to the Certificate System being unable to detect it. - * + * *

- * + * * @version $Revision$ Date: $ */ public class TokenInfo { -- cgit