diff options
Diffstat (limited to 'base/silent/src/com/netscape/pkisilent/common')
14 files changed, 152 insertions, 152 deletions
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 |