summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/cms/servlet/key
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-04-05 14:49:11 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-04-09 10:03:25 -0500
commit7c7b9d023cd466c1771068badc020dab36beb553 (patch)
tree178877eb83e25336be7577953945fbdb0b9e1a15 /base/common/src/com/netscape/cms/servlet/key
parentda1e6e2f49f66fd46c8039ff1aa4386309fba8f4 (diff)
downloadpki-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/common/src/com/netscape/cms/servlet/key')
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/ConfirmRecoverBySerial.java4
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/DisplayBySerial.java8
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/DisplayBySerialForRecovery.java8
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/DisplayTransport.java4
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java6
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java8
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/GetAsyncPk12.java8
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/GetPk12.java6
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/GrantAsyncRecovery.java12
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java12
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/KeyRecordParser.java4
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/KeyResource.java4
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/KeyResourceService.java20
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/KeysResource.java6
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/KeysResourceService.java24
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java2
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/SrchKey.java6
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java10
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/model/KeyDAO.java26
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/model/KeyData.java6
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfo.java8
-rw-r--r--base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfos.java6
22 files changed, 99 insertions, 99 deletions
diff --git a/base/common/src/com/netscape/cms/servlet/key/ConfirmRecoverBySerial.java b/base/common/src/com/netscape/cms/servlet/key/ConfirmRecoverBySerial.java
index 59b01f26a..aa51ec35f 100644
--- a/base/common/src/com/netscape/cms/servlet/key/ConfirmRecoverBySerial.java
+++ b/base/common/src/com/netscape/cms/servlet/key/ConfirmRecoverBySerial.java
@@ -46,7 +46,7 @@ import com.netscape.cms.servlet.common.ECMSGWException;
* shows key information and presents a list of text boxes
* so that recovery agents can type in their identifiers
* and passwords.
- *
+ *
* @version $Revision$, $Date$
*/
public class ConfirmRecoverBySerial extends CMSServlet {
@@ -105,7 +105,7 @@ public class ConfirmRecoverBySerial extends CMSServlet {
public void process(CMSRequest cmsReq) throws EBaseException {
// Note that we should try to handle all the exceptions
- // instead of passing it up back to the servlet
+ // instead of passing it up back to the servlet
// framework.
HttpServletRequest req = cmsReq.getHttpReq();
diff --git a/base/common/src/com/netscape/cms/servlet/key/DisplayBySerial.java b/base/common/src/com/netscape/cms/servlet/key/DisplayBySerial.java
index 8876d9350..e414dde9a 100644
--- a/base/common/src/com/netscape/cms/servlet/key/DisplayBySerial.java
+++ b/base/common/src/com/netscape/cms/servlet/key/DisplayBySerial.java
@@ -46,7 +46,7 @@ import com.netscape.cms.servlet.common.ECMSGWException;
/**
* Display a specific Key Archival Request
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class DisplayBySerial extends CMSServlet {
@@ -76,7 +76,7 @@ public class DisplayBySerial extends CMSServlet {
/**
* initialize the servlet. This servlet uses the template file
* "displayBySerial.template" to process the response.
- *
+ *
* @param sc servlet configuration, read from the web.xml file
*/
public void init(ServletConfig sc) throws ServletException {
@@ -101,7 +101,7 @@ public class DisplayBySerial extends CMSServlet {
* <ul>
* <li>http.param serialNumber serial number of the key archival request
* </ul>
- *
+ *
* @param cmsReq the object holding the request and response information
*/
public void process(CMSRequest cmsReq) throws EBaseException {
@@ -141,7 +141,7 @@ public class DisplayBySerial extends CMSServlet {
}
// Note that we should try to handle all the exceptions
- // instead of passing it up back to the servlet
+ // instead of passing it up back to the servlet
// framework.
IArgBlock header = CMS.createArgBlock();
diff --git a/base/common/src/com/netscape/cms/servlet/key/DisplayBySerialForRecovery.java b/base/common/src/com/netscape/cms/servlet/key/DisplayBySerialForRecovery.java
index 29cc2b3b3..9bc1c1b4f 100644
--- a/base/common/src/com/netscape/cms/servlet/key/DisplayBySerialForRecovery.java
+++ b/base/common/src/com/netscape/cms/servlet/key/DisplayBySerialForRecovery.java
@@ -47,7 +47,7 @@ import com.netscape.cms.servlet.common.ECMSGWException;
/**
* Display a Specific Key Archival Request, and initiate
* key recovery process
- *
+ *
* @version $Revision$, $Date$
*/
public class DisplayBySerialForRecovery extends CMSServlet {
@@ -78,7 +78,7 @@ public class DisplayBySerialForRecovery extends CMSServlet {
/**
* initialize the servlet. This servlet uses the template file
* "displayBySerialForRecovery.template" to process the response.
- *
+ *
* @param sc servlet configuration, read from the web.xml file
*/
public void init(ServletConfig sc) throws ServletException {
@@ -103,7 +103,7 @@ public class DisplayBySerialForRecovery extends CMSServlet {
* <li>http.param serialNumber request ID of key archival request
* <li>http.param publicKeyData
* </ul>
- *
+ *
* @param cmsReq the object holding the request and response information
*/
public void process(CMSRequest cmsReq) throws EBaseException {
@@ -143,7 +143,7 @@ public class DisplayBySerialForRecovery extends CMSServlet {
}
// Note that we should try to handle all the exceptions
- // instead of passing it up back to the servlet
+ // instead of passing it up back to the servlet
// framework.
IArgBlock header = CMS.createArgBlock();
diff --git a/base/common/src/com/netscape/cms/servlet/key/DisplayTransport.java b/base/common/src/com/netscape/cms/servlet/key/DisplayTransport.java
index dd224cc8a..5c0fc73e9 100644
--- a/base/common/src/com/netscape/cms/servlet/key/DisplayTransport.java
+++ b/base/common/src/com/netscape/cms/servlet/key/DisplayTransport.java
@@ -35,7 +35,7 @@ import com.netscape.cms.servlet.common.ECMSGWException;
/**
* Retrieve Transport Certificate used to
* wrap Private key Archival requests
- *
+ *
* @version $Revision$, $Date$
*/
public class DisplayTransport extends CMSServlet {
@@ -70,7 +70,7 @@ public class DisplayTransport extends CMSServlet {
/**
* Process the HTTP request.
- *
+ *
* @param cmsReq the object holding the request and response information
*/
public void process(CMSRequest cmsReq) throws EBaseException {
diff --git a/base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java b/base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java
index cd440da08..630ef1b14 100644
--- a/base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java
+++ b/base/common/src/com/netscape/cms/servlet/key/ExamineRecovery.java
@@ -47,7 +47,7 @@ import com.netscape.cms.servlet.common.ECMSGWException;
/**
* View the Key Recovery Request
- *
+ *
* @version $Revision$, $Date$
*/
public class ExamineRecovery extends CMSServlet {
@@ -107,7 +107,7 @@ public class ExamineRecovery extends CMSServlet {
* <ul>
* <li>http.param recoveryID recovery request ID
* </ul>
- *
+ *
* @param cmsReq the object holding the request and response information
*/
@@ -167,7 +167,7 @@ public class ExamineRecovery extends CMSServlet {
/*
catch (NumberFormatException e) {
error = eBaseException(
-
+
header.addStringValue(OUT_ERROR,
MessageFormatter.getLocalizedString(
locale[0],
diff --git a/base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java b/base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java
index 55d79b1ab..4989c1245 100644
--- a/base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java
+++ b/base/common/src/com/netscape/cms/servlet/key/GetApprovalStatus.java
@@ -46,7 +46,7 @@ import com.netscape.cms.servlet.common.ECMSGWException;
/**
* Check to see if a Key Recovery Request has been approved
- *
+ *
* @version $Revision$, $Date$
*/
public class GetApprovalStatus extends CMSServlet {
@@ -79,7 +79,7 @@ public class GetApprovalStatus extends CMSServlet {
* initialize the servlet. This servlet uses the template files
* "getApprovalStatus.template" and "finishRecovery.template"
* to process the response.
- *
+ *
* @param sc servlet configuration, read from the web.xml file
*/
public void init(ServletConfig sc) throws ServletException {
@@ -102,7 +102,7 @@ public class GetApprovalStatus extends CMSServlet {
* <ul>
* <li>http.param recoveryID request ID to check
* </ul>
- *
+ *
* @param cmsReq the object holding the request and response information
*/
public void process(CMSRequest cmsReq) throws EBaseException {
@@ -189,7 +189,7 @@ public class GetApprovalStatus extends CMSServlet {
}
*/
} else if (((IKeyRecoveryAuthority) mService).getError(recoveryID) != null) {
- // error in recovery process
+ // error in recovery process
header.addStringValue(OUT_ERROR,
((IKeyRecoveryAuthority) mService).getError(recoveryID));
rComplete = 1;
diff --git a/base/common/src/com/netscape/cms/servlet/key/GetAsyncPk12.java b/base/common/src/com/netscape/cms/servlet/key/GetAsyncPk12.java
index 9d67cab8d..dfc7d4d3b 100644
--- a/base/common/src/com/netscape/cms/servlet/key/GetAsyncPk12.java
+++ b/base/common/src/com/netscape/cms/servlet/key/GetAsyncPk12.java
@@ -44,7 +44,7 @@ import com.netscape.cms.servlet.common.ECMSGWException;
/**
* Get the recovered key in PKCS#12 format
* - for asynchronous key recovery only
- *
+ *
*/
public class GetAsyncPk12 extends CMSServlet {
@@ -83,7 +83,7 @@ public class GetAsyncPk12 extends CMSServlet {
/**
* initialize the servlet. This servlet uses the template file
* "finishAsyncRecovery.template" to process the response.
- *
+ *
* @param sc servlet configuration, read from the web.xml file
*/
public void init(ServletConfig sc) throws ServletException {
@@ -108,7 +108,7 @@ public class GetAsyncPk12 extends CMSServlet {
* <ul>
* <li>http.param reqID request id for recovery
* </ul>
- *
+ *
* @param cmsReq the object holding the request and response information
*/
public void process(CMSRequest cmsReq) throws EBaseException {
@@ -228,7 +228,7 @@ public class GetAsyncPk12 extends CMSServlet {
CMS.getUserMessage(locale[0], "CMS_BASE_INTERNAL_ERROR", e.toString()));
}
} else if (((IKeyRecoveryAuthority) mService).getError(reqID) != null) {
- // error in recovery process
+ // error in recovery process
header.addStringValue(OUT_ERROR,
((IKeyRecoveryAuthority) mService).getError(reqID));
} else {
diff --git a/base/common/src/com/netscape/cms/servlet/key/GetPk12.java b/base/common/src/com/netscape/cms/servlet/key/GetPk12.java
index 96fe7c85d..fdcbf40bc 100644
--- a/base/common/src/com/netscape/cms/servlet/key/GetPk12.java
+++ b/base/common/src/com/netscape/cms/servlet/key/GetPk12.java
@@ -44,7 +44,7 @@ import com.netscape.cms.servlet.common.ECMSGWException;
/**
* Get the recovered key in PKCS#12 format
- *
+ *
* @version $Revision$, $Date$
*/
public class GetPk12 extends CMSServlet {
@@ -82,7 +82,7 @@ public class GetPk12 extends CMSServlet {
/**
* initialize the servlet. This servlet uses the template file
* "finishRecovery.template" to process the response.
- *
+ *
* @param sc servlet configuration, read from the web.xml file
*/
public void init(ServletConfig sc) throws ServletException {
@@ -107,7 +107,7 @@ public class GetPk12 extends CMSServlet {
* <ul>
* <li>http.param recoveryID ID of request to recover
* </ul>
- *
+ *
* @param cmsReq the object holding the request and response information
*/
public void process(CMSRequest cmsReq) throws EBaseException {
diff --git a/base/common/src/com/netscape/cms/servlet/key/GrantAsyncRecovery.java b/base/common/src/com/netscape/cms/servlet/key/GrantAsyncRecovery.java
index 7c0c0cb1c..fee739f29 100644
--- a/base/common/src/com/netscape/cms/servlet/key/GrantAsyncRecovery.java
+++ b/base/common/src/com/netscape/cms/servlet/key/GrantAsyncRecovery.java
@@ -42,7 +42,7 @@ import com.netscape.cms.servlet.common.ECMSGWException;
/**
* Approve an asynchronous key recovery request
- *
+ *
*/
public class GrantAsyncRecovery extends CMSServlet {
@@ -80,7 +80,7 @@ public class GrantAsyncRecovery extends CMSServlet {
/**
* initialize the servlet. This servlet uses the template file
* 'grantAsyncRecovery.template' to process the response.
- *
+ *
* @param sc servlet configuration, read from the web.xml file
*/
public void init(ServletConfig sc) throws ServletException {
@@ -106,9 +106,9 @@ public class GrantAsyncRecovery extends CMSServlet {
* <ul>
* <li>http.param reqID request ID of the request to approve
* <li>http.param agentID User ID of the agent approving the request
- *
+ *
* </ul>
- *
+ *
* @param cmsReq the object holding the request and response information
*/
public void process(CMSRequest cmsReq) throws EBaseException {
@@ -183,12 +183,12 @@ public class GrantAsyncRecovery extends CMSServlet {
/**
* Update agent approval list
* <P>
- *
+ *
* <ul>
* <li>signed.audit LOGGING_SIGNED_AUDIT_KEY_RECOVERY_AGENT_LOGIN used whenever DRM agents login as recovery agents
* to approve key recovery requests
* </ul>
- *
+ *
* @param argSet CMS template parameters
* @param header argument block
* @param reqID string containing the recovery request ID
diff --git a/base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java b/base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java
index 02aacc31c..9c4ccc8be 100644
--- a/base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java
+++ b/base/common/src/com/netscape/cms/servlet/key/GrantRecovery.java
@@ -43,7 +43,7 @@ import com.netscape.cms.servlet.common.ECMSGWException;
/**
* Approve a key recovery request
- *
+ *
* @version $Revision$, $Date$
*/
public class GrantRecovery extends CMSServlet {
@@ -84,7 +84,7 @@ public class GrantRecovery extends CMSServlet {
/**
* initialize the servlet. This servlet uses the template file
* 'grantRecovery.template' to process the response.
- *
+ *
* @param sc servlet configuration, read from the web.xml file
*/
public void init(ServletConfig sc) throws ServletException {
@@ -111,9 +111,9 @@ public class GrantRecovery extends CMSServlet {
* <li>http.param recoveryID ID of the request to approve
* <li>http.param agentID User ID of the agent approving the request
* <li>http.param agentPWD Password of the agent approving the request
- *
+ *
* </ul>
- *
+ *
* @param cmsReq the object holding the request and response information
*/
public void process(CMSRequest cmsReq) throws EBaseException {
@@ -189,12 +189,12 @@ public class GrantRecovery extends CMSServlet {
* Recovers a key. The p12 will be protected by the password
* provided by the administrator.
* <P>
- *
+ *
* <ul>
* <li>signed.audit LOGGING_SIGNED_AUDIT_KEY_RECOVERY_AGENT_LOGIN used whenever DRM agents login as recovery agents
* to approve key recovery requests
* </ul>
- *
+ *
* @param argSet CMS template parameters
* @param header argument block
* @param recoveryID string containing the recovery ID
diff --git a/base/common/src/com/netscape/cms/servlet/key/KeyRecordParser.java b/base/common/src/com/netscape/cms/servlet/key/KeyRecordParser.java
index ed770ea91..b599cc7f5 100644
--- a/base/common/src/com/netscape/cms/servlet/key/KeyRecordParser.java
+++ b/base/common/src/com/netscape/cms/servlet/key/KeyRecordParser.java
@@ -28,7 +28,7 @@ import com.netscape.certsrv.dbs.keydb.IKeyRecord;
/**
* Output a 'pretty print' of a Key Archival record
- *
+ *
* @version $Revision$, $Date$
*/
public class KeyRecordParser {
@@ -60,7 +60,7 @@ public class KeyRecordParser {
rec.getSerialNumber(), 10);
rarg.addStringValue(OUT_KEY_ALGORITHM,
rec.getAlgorithm());
- // Possible Enhancement: sun's BASE64Encode is not
+ // Possible Enhancement: sun's BASE64Encode is not
// fast. We may may to have our native implmenetation.
IPrettyPrintFormat pp = CMS.getPrettyPrintFormat(":");
diff --git a/base/common/src/com/netscape/cms/servlet/key/KeyResource.java b/base/common/src/com/netscape/cms/servlet/key/KeyResource.java
index a47c46d86..13960b23e 100644
--- a/base/common/src/com/netscape/cms/servlet/key/KeyResource.java
+++ b/base/common/src/com/netscape/cms/servlet/key/KeyResource.java
@@ -12,7 +12,7 @@ import com.netscape.cms.servlet.request.model.RecoveryRequestData;
@Path("/key")
public interface KeyResource {
-
+
/**
* Used to retrieve a key
* @param data
@@ -23,7 +23,7 @@ public interface KeyResource {
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.TEXT_XML })
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public KeyData retrieveKey(RecoveryRequestData data);
-
+
// retrieval - used to test integration with a browser
@POST
@Path("retrieve")
diff --git a/base/common/src/com/netscape/cms/servlet/key/KeyResourceService.java b/base/common/src/com/netscape/cms/servlet/key/KeyResourceService.java
index 88f2f8a82..0ec84b8f6 100644
--- a/base/common/src/com/netscape/cms/servlet/key/KeyResourceService.java
+++ b/base/common/src/com/netscape/cms/servlet/key/KeyResourceService.java
@@ -37,10 +37,10 @@ import com.netscape.certsrv.dbs.keydb.KeyId;
/**
* @author alee
- *
+ *
*/
public class KeyResourceService extends CMSResourceService implements KeyResource{
-
+
/**
* Used to retrieve a key
* @param data
@@ -64,15 +64,15 @@ public class KeyResourceService extends CMSResourceService implements KeyResourc
}
return keyData;
}
-
+
// retrieval - used to test integration with a browser
public KeyData retrieveKey(MultivaluedMap<String, String> form) {
RecoveryRequestData data = new RecoveryRequestData(form);
return retrieveKey(data);
}
-
+
private KeyId validateRequest(RecoveryRequestData data) {
-
+
// confirm request exists
RequestId reqId = data.getRequestId();
if (reqId == null) {
@@ -100,24 +100,24 @@ public class KeyResourceService extends CMSResourceService implements KeyResourc
// request not found
throw new WebApplicationException(Response.Status.GONE);
}
-
+
//confirm request is of the right type
String type = reqInfo.getRequestType();
if (!type.equals(IRequest.SECURITY_DATA_RECOVERY_REQUEST)) {
// log error
throw new WebApplicationException(Response.Status.BAD_REQUEST);
}
-
- //confirm that agent is originator of request, else throw 401
+
+ //confirm that agent is originator of request, else throw 401
// TO-DO
-
+
// confirm request is in approved state
String status = reqInfo.getRequestStatus();
if (!status.equals(RequestStatus.APPROVED.toString())) {
// log error
throw new WebApplicationException(Response.Status.UNAUTHORIZED);
}
-
+
return reqInfo.getKeyId();
}
diff --git a/base/common/src/com/netscape/cms/servlet/key/KeysResource.java b/base/common/src/com/netscape/cms/servlet/key/KeysResource.java
index c93ffa4c9..67d29cc52 100644
--- a/base/common/src/com/netscape/cms/servlet/key/KeysResource.java
+++ b/base/common/src/com/netscape/cms/servlet/key/KeysResource.java
@@ -7,17 +7,17 @@ import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import com.netscape.cms.servlet.key.model.KeyDataInfos;
-
+
@Path("/keys")
public interface KeysResource {
public static final int DEFAULT_MAXTIME = 10;
public static final int DEFAULT_MAXRESULTS = 100;
-
+
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.TEXT_XML })
public KeyDataInfos listKeys(@QueryParam("clientID") String clientID,
@QueryParam("status") String status,
@DefaultValue(""+DEFAULT_MAXRESULTS) @QueryParam("maxResults") int maxResults,
@DefaultValue(""+DEFAULT_MAXTIME) @QueryParam("maxTime") int maxTime);
-
+
}
diff --git a/base/common/src/com/netscape/cms/servlet/key/KeysResourceService.java b/base/common/src/com/netscape/cms/servlet/key/KeysResourceService.java
index d525d5a77..080d4871b 100644
--- a/base/common/src/com/netscape/cms/servlet/key/KeysResourceService.java
+++ b/base/common/src/com/netscape/cms/servlet/key/KeysResourceService.java
@@ -16,13 +16,13 @@
// All rights reserved.
// --- END COPYRIGHT BLOCK ---
/**
- *
+ *
*/
package com.netscape.cms.servlet.key;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
-
+
import com.netscape.certsrv.apps.CMS;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.cms.servlet.base.CMSResourceService;
@@ -32,20 +32,20 @@ import com.netscape.cmsutil.ldap.LDAPUtil;
/**
* @author alee
- *
+ *
*/
public class KeysResourceService extends CMSResourceService implements KeysResource {
/**
* Used to generate list of key infos based on the search parameters
*/
- public KeyDataInfos listKeys(String clientID, String status, int maxResults, int maxTime) {
+ public KeyDataInfos listKeys(String clientID, String status, int maxResults, int maxTime) {
// auth and authz
-
+
// get ldap filter
String filter = createSearchFilter(status, clientID);
CMS.debug("listKeys: filter is " + filter);
-
+
KeyDAO dao = new KeyDAO();
KeyDataInfos infos;
try {
@@ -56,30 +56,30 @@ public class KeysResourceService extends CMSResourceService implements KeysResou
}
return infos;
}
-
+
private String createSearchFilter(String status, String clientID) {
String filter = "";
int matches = 0;
-
+
if ((status == null) && (clientID == null)) {
filter = "(serialno=*)";
return filter;
}
-
+
if (status != null) {
filter += "(status=" + LDAPUtil.escape(status) + ")";
matches ++;
}
-
+
if (clientID != null) {
filter += "(clientID=" + LDAPUtil.escape(clientID) + ")";
matches ++;
}
-
+
if (matches > 1) {
filter = "(&" + filter + ")";
}
-
+
return filter;
}
diff --git a/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java b/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java
index 28ff30803..bedfa911d 100644
--- a/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java
+++ b/base/common/src/com/netscape/cms/servlet/key/RecoverBySerial.java
@@ -50,7 +50,7 @@ import com.netscape.cmsutil.util.Cert;
/**
* A class representing a recoverBySerial servlet.
- *
+ *
* @version $Revision$, $Date$
*/
public class RecoverBySerial extends CMSServlet {
diff --git a/base/common/src/com/netscape/cms/servlet/key/SrchKey.java b/base/common/src/com/netscape/cms/servlet/key/SrchKey.java
index bff14e9f2..b249b663f 100644
--- a/base/common/src/com/netscape/cms/servlet/key/SrchKey.java
+++ b/base/common/src/com/netscape/cms/servlet/key/SrchKey.java
@@ -47,7 +47,7 @@ import com.netscape.cms.servlet.common.ECMSGWException;
/**
* Retrieve archived keys matching search criteria
- *
+ *
* @version $Revision$, $Date$
*/
public class SrchKey extends CMSServlet {
@@ -92,7 +92,7 @@ public class SrchKey extends CMSServlet {
/**
* initialize the servlet. This servlet uses the template file
* "srchKey.template" to process the response.
- *
+ *
* @param sc servlet configuration, read from the web.xml file
*/
public void init(ServletConfig sc) throws ServletException {
@@ -144,7 +144,7 @@ public class SrchKey extends CMSServlet {
* <li>http.param querySentinel ID of first request to show
* <li>http.param timeLimit number of seconds to limit ldap search to
* </ul>
- *
+ *
* @param cmsReq the object holding the request and response information
*/
public void process(CMSRequest cmsReq) throws EBaseException {
diff --git a/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java b/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java
index 95c777701..c3e6bba53 100644
--- a/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java
+++ b/base/common/src/com/netscape/cms/servlet/key/SrchKeyForRecovery.java
@@ -47,8 +47,8 @@ import com.netscape.cms.servlet.common.ECMSGWException;
/**
* Retrieve archived keys matching given public key material
- *
- *
+ *
+ *
* @version $Revision$, $Date$
*/
public class SrchKeyForRecovery extends CMSServlet {
@@ -93,7 +93,7 @@ public class SrchKeyForRecovery extends CMSServlet {
/**
* initialize the servlet. This servlet uses the template file
* "srchKeyForRecovery.template" to process the response.
- *
+ *
* @param sc servlet configuration, read from the web.xml file
*/
public void init(ServletConfig sc) throws ServletException {
@@ -143,7 +143,7 @@ public class SrchKeyForRecovery extends CMSServlet {
* <li>http.param querySentinel ID of first request to show
* <li>http.param timeLimit number of seconds to limit ldap search to
* </ul>
- *
+ *
* @param cmsReq the object holding the request and response information
*/
@@ -295,7 +295,7 @@ public class SrchKeyForRecovery extends CMSServlet {
IKeyRecord rec = e.nextElement();
// rec is null when we specify maxResults
// DS will return an err=4, which triggers
- // a LDAPException.SIZE_LIMIT_ExCEEDED
+ // a LDAPException.SIZE_LIMIT_ExCEEDED
// in DSSearchResults.java
if (rec != null) {
IArgBlock rarg = CMS.createArgBlock();
diff --git a/base/common/src/com/netscape/cms/servlet/key/model/KeyDAO.java b/base/common/src/com/netscape/cms/servlet/key/model/KeyDAO.java
index f479c6f0d..c34c1752f 100644
--- a/base/common/src/com/netscape/cms/servlet/key/model/KeyDAO.java
+++ b/base/common/src/com/netscape/cms/servlet/key/model/KeyDAO.java
@@ -48,7 +48,7 @@ public class KeyDAO {
private IKeyRepository repo;
private IKeyRecoveryAuthority kra;
private IRequestQueue queue;
-
+
public KeyDAO() {
kra = ( IKeyRecoveryAuthority ) CMS.getSubsystem( "kra" );
repo = kra.getKeyRepository();
@@ -57,7 +57,7 @@ public class KeyDAO {
/**
* Returns list of keys meeting specified search filter.
* Currently, vlv searches are not used for keys.
- *
+ *
* @param filter
* @param maxResults
* @param maxTime
@@ -65,29 +65,29 @@ public class KeyDAO {
* @return
* @throws EBaseException
*/
- public KeyDataInfos listKeys(String filter, int maxResults, int maxTime, UriInfo uriInfo)
+ public KeyDataInfos listKeys(String filter, int maxResults, int maxTime, UriInfo uriInfo)
throws EBaseException {
List <KeyDataInfo> list = new ArrayList<KeyDataInfo>();
Enumeration<IKeyRecord> e = null;
-
- e = repo.searchKeys(filter, maxResults, maxTime);
+
+ e = repo.searchKeys(filter, maxResults, maxTime);
if (e == null) {
throw new EBaseException("search results are null");
}
-
+
while (e.hasMoreElements()) {
IKeyRecord rec = e.nextElement();
if (rec != null) {
list.add(createKeyDataInfo(rec, uriInfo));
}
}
-
+
KeyDataInfos ret = new KeyDataInfos();
ret.setKeyInfos(list);
-
+
return ret;
}
-
+
public KeyData getKey(KeyId keyId, RecoveryRequestData data) throws EBaseException {
KeyData keyData;
@@ -105,7 +105,7 @@ public class KeyDAO {
// get wrapped key
IKeyRecord rec = repo.readKeyRecord(keyId.toBigInteger());
if (rec == null) {
- return null;
+ return null;
}
Hashtable<String, Object> requestParams = kra.getVolatileRequest(
@@ -182,10 +182,10 @@ public class KeyDAO {
kra.destroyVolatileRequest(request.getRequestId());
queue.markAsServiced(request);
-
+
return keyData;
}
-
+
public KeyDataInfo createKeyDataInfo(IKeyRecord rec, UriInfo uriInfo) throws EBaseException {
KeyDataInfo ret = new KeyDataInfo();
@@ -198,5 +198,5 @@ public class KeyDAO {
return ret;
}
-
+
}
diff --git a/base/common/src/com/netscape/cms/servlet/key/model/KeyData.java b/base/common/src/com/netscape/cms/servlet/key/model/KeyData.java
index 4f303e27d..2ff2b5d0c 100644
--- a/base/common/src/com/netscape/cms/servlet/key/model/KeyData.java
+++ b/base/common/src/com/netscape/cms/servlet/key/model/KeyData.java
@@ -17,7 +17,7 @@
// --- END COPYRIGHT BLOCK ---
/**
- *
+ *
*/
package com.netscape.cms.servlet.key.model;
@@ -35,7 +35,7 @@ import javax.xml.bind.annotation.XmlElement;
public class KeyData {
@XmlElement
String wrappedPrivateData;
-
+
@XmlElement
String nonceData;
@@ -56,7 +56,7 @@ public class KeyData {
public void setWrappedPrivateData(String wrappedPrivateData) {
this.wrappedPrivateData = wrappedPrivateData;
}
-
+
/**
* @return the nonceData
*/
diff --git a/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfo.java b/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfo.java
index 88b31b4d1..6fd9649fb 100644
--- a/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfo.java
+++ b/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfo.java
@@ -16,11 +16,11 @@
// All rights reserved.
// --- END COPYRIGHT BLOCK ---
/**
- *
+ *
*/
package com.netscape.cms.servlet.key.model;
-
+
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -35,13 +35,13 @@ import com.netscape.certsrv.dbs.keydb.KeyId;
@XmlRootElement(name="SecurityDataInfo")
@XmlAccessorType(XmlAccessType.FIELD)
public class KeyDataInfo {
-
+
@XmlElement
protected String keyURL;
@XmlElement
protected String clientID;
-
+
public KeyDataInfo() {
// required for JAXB (defaults)
}
diff --git a/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfos.java b/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfos.java
index b01184708..79e5add95 100644
--- a/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfos.java
+++ b/base/common/src/com/netscape/cms/servlet/key/model/KeyDataInfos.java
@@ -28,10 +28,10 @@ import com.netscape.cms.servlet.base.model.Link;
@XmlRootElement(name = "SecurityDataInfos")
public class KeyDataInfos {
-
+
protected Collection<KeyDataInfo> keyInfos;
protected List<Link> links;
-
+
/**
* @return the keyInfos
*/
@@ -58,7 +58,7 @@ public class KeyDataInfos {
public void setLinks(List<Link> links) {
this.links = links;
}
-
+
@XmlTransient
public String getNext() {
if (links == null) {