diff options
author | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2011-09-15 19:32:34 +0000 |
---|---|---|
committer | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2011-09-15 19:32:34 +0000 |
commit | b40d1828acdc04a6651697afbb62682dabf04e61 (patch) | |
tree | b75fa294f9a46c2607c4a8f9cc03239fd5e3ca7f /pki/base/common/src/com/netscape | |
parent | 383c9f2d57b35a7c43e6ff4f87da919dc9aff688 (diff) | |
download | pki-b40d1828acdc04a6651697afbb62682dabf04e61.tar.gz pki-b40d1828acdc04a6651697afbb62682dabf04e61.tar.xz pki-b40d1828acdc04a6651697afbb62682dabf04e61.zip |
Fixed bugzilla bug #737218, which is part of fix for bugzilla bug #598728.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@2203 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/common/src/com/netscape')
-rw-r--r-- | pki/base/common/src/com/netscape/cms/servlet/request/CertReqParser.java | 64 | ||||
-rw-r--r-- | pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java | 8 |
2 files changed, 39 insertions, 33 deletions
diff --git a/pki/base/common/src/com/netscape/cms/servlet/request/CertReqParser.java b/pki/base/common/src/com/netscape/cms/servlet/request/CertReqParser.java index da79324cd..2e0508ba0 100644 --- a/pki/base/common/src/com/netscape/cms/servlet/request/CertReqParser.java +++ b/pki/base/common/src/com/netscape/cms/servlet/request/CertReqParser.java @@ -123,7 +123,7 @@ public class CertReqParser extends ReqParser { if (mDetails) { // show all http parameters stored in request. - if (name.equals(IRequest.HTTP_PARAMS)) { + if (name.equalsIgnoreCase(IRequest.HTTP_PARAMS)) { Hashtable http_params = req.getExtDataInHashtable(name); // show certType specially String certType = (String) http_params.get(IRequest.CERT_TYPE); @@ -155,7 +155,7 @@ public class CertReqParser extends ReqParser { arg.set(parami, new RawJS(rawJS)); } } // show all http headers stored in request. - else if (name.equals(IRequest.HTTP_HEADERS)) { + else if (name.equalsIgnoreCase(IRequest.HTTP_HEADERS)) { Hashtable http_hdrs = req.getExtDataInHashtable(name); Enumeration elms = http_hdrs.keys(); int counter = 0; @@ -175,7 +175,7 @@ public class CertReqParser extends ReqParser { arg.set(parami, new RawJS(rawJS)); } } // show all auth token stored in request. - else if (name.equals(IRequest.AUTH_TOKEN)) { + else if (name.equalsIgnoreCase(IRequest.AUTH_TOKEN)) { IAuthToken auth_token = req.getExtDataInAuthToken(name); Enumeration elms = auth_token.getElements(); int counter = 0; @@ -223,16 +223,16 @@ public class CertReqParser extends ReqParser { } } - if (name.equals(IRequest.REQUESTOR_PHONE) - || name.equals(IRequest.REQUESTOR_EMAIL) - || name.equals(IRequest.REQUESTOR_COMMENTS) - || name.equals(IRequest.RESULT) - || name.equals(IRequest.REQUEST_TRUSTEDMGR_PRIVILEGE) + if (name.equalsIgnoreCase(IRequest.REQUESTOR_PHONE) + || name.equalsIgnoreCase(IRequest.REQUESTOR_EMAIL) + || name.equalsIgnoreCase(IRequest.REQUESTOR_COMMENTS) + || name.equalsIgnoreCase(IRequest.RESULT) + || name.equalsIgnoreCase(IRequest.REQUEST_TRUSTEDMGR_PRIVILEGE) ) { arg.addStringValue(name, req.getExtDataInString(name)); } - if (name.equals(IRequest.REQUESTOR_NAME)) { + if (name.equalsIgnoreCase(IRequest.REQUESTOR_NAME)) { String requestorName = req.getExtDataInString(name); requestorName = requestorName.trim(); @@ -241,7 +241,7 @@ public class CertReqParser extends ReqParser { } } - if (name.equals(IRequest.ERRORS)) { + if (name.equalsIgnoreCase(IRequest.ERRORS)) { Vector errorStrings = req.getExtDataInStringVector(name); if (errorStrings != null) { StringBuffer errInfo = new StringBuffer(); @@ -253,11 +253,11 @@ public class CertReqParser extends ReqParser { arg.addStringValue(IRequest.ERRORS, errInfo.toString()); } } - if (name.equals(IRequest.ERROR)) { + if (name.equalsIgnoreCase(IRequest.ERROR)) { arg.addStringValue(IRequest.ERRORS, req.getExtDataInString(name)); } - if (name.equals(IRequest.CERT_INFO)) { + if (name.equalsIgnoreCase(IRequest.CERT_INFO)) { // Get the certificate info from the request X509CertInfo[] certInfo = req.getExtDataInCertInfoArray(IRequest.CERT_INFO); @@ -425,7 +425,7 @@ public class CertReqParser extends ReqParser { } } - if (name.equals(IRequest.OLD_SERIALS) && mDetails) { + if (name.equalsIgnoreCase(IRequest.OLD_SERIALS) && mDetails) { BigInteger oldSerialNo[] = req.getExtDataInBigIntegerArray(IRequest.OLD_SERIALS); if (oldSerialNo != null) { @@ -441,7 +441,7 @@ public class CertReqParser extends ReqParser { } } - if (name.equals(IRequest.ISSUED_CERTS) && mDetails && + if (name.equalsIgnoreCase(IRequest.ISSUED_CERTS) && mDetails && (req.getRequestStatus().toString().equals(RequestStatus.COMPLETE_STRING) || req.getRequestType().equals(IRequest.GETREVOCATIONINFO_REQUEST))) { X509CertImpl issuedCert[] = @@ -452,7 +452,7 @@ public class CertReqParser extends ReqParser { if (issuedCert.length == 2) arg.addBigIntegerValue("serialNumber2", issuedCert[1].getSerialNumber(), 16); } - if (name.equals(IRequest.OLD_CERTS) && mDetails) { + if (name.equalsIgnoreCase(IRequest.OLD_CERTS) && mDetails) { X509CertImpl oldCert[] = req.getExtDataInCertArray(IRequest.OLD_CERTS); @@ -471,7 +471,7 @@ public class CertReqParser extends ReqParser { } } - if (name.equals(IRequest.CACERTCHAIN) && mDetails) { + if (name.equalsIgnoreCase(IRequest.CACERTCHAIN) && mDetails) { byte[] certChainData = req.getExtDataInByteArray( IRequest.CACERTCHAIN); if (certChainData != null) { @@ -493,7 +493,7 @@ public class CertReqParser extends ReqParser { } } } - if (name.equals(IRequest.FINGERPRINTS) && mDetails) { + if (name.equalsIgnoreCase(IRequest.FINGERPRINTS) && mDetails) { Hashtable fingerprints = req.getExtDataInHashtable(IRequest.FINGERPRINTS); @@ -659,7 +659,7 @@ public class CertReqParser extends ReqParser { if (mDetails) { // show all http parameters stored in request. - if (name.equals(IRequest.HTTP_PARAMS)) { + if (name.equalsIgnoreCase(IRequest.HTTP_PARAMS)) { Hashtable http_params = req.getExtDataInHashtable(name); // show certType specially String certType = (String) http_params.get(IRequest.CERT_TYPE); @@ -686,7 +686,7 @@ public class CertReqParser extends ReqParser { arg.set(parami, new RawJS(rawJS)); } } // show all http headers stored in request. - else if (name.equals(IRequest.HTTP_HEADERS)) { + else if (name.equalsIgnoreCase(IRequest.HTTP_HEADERS)) { Hashtable http_hdrs = req.getExtDataInHashtable(name); Enumeration elms = http_hdrs.keys(); int counter = 0; @@ -706,7 +706,7 @@ public class CertReqParser extends ReqParser { arg.set(parami, new RawJS(rawJS)); } } // show all auth token stored in request. - else if (name.equals(IRequest.AUTH_TOKEN)) { + else if (name.equalsIgnoreCase(IRequest.AUTH_TOKEN)) { IAuthToken auth_token = req.getExtDataInAuthToken(name); Enumeration elms = auth_token.getElements(); int counter = 0; @@ -751,16 +751,16 @@ public class CertReqParser extends ReqParser { } } - if (name.equals(IRequest.REQUESTOR_PHONE) - || name.equals(IRequest.REQUESTOR_EMAIL) - || name.equals(IRequest.REQUESTOR_COMMENTS) - || name.equals(IRequest.RESULT) - || name.equals(IRequest.REQUEST_TRUSTEDMGR_PRIVILEGE) + if (name.equalsIgnoreCase(IRequest.REQUESTOR_PHONE) + || name.equalsIgnoreCase(IRequest.REQUESTOR_EMAIL) + || name.equalsIgnoreCase(IRequest.REQUESTOR_COMMENTS) + || name.equalsIgnoreCase(IRequest.RESULT) + || name.equalsIgnoreCase(IRequest.REQUEST_TRUSTEDMGR_PRIVILEGE) ) { arg.addStringValue(name, req.getExtDataInString(name)); } - if (name.equals(IRequest.REQUESTOR_NAME)) { + if (name.equalsIgnoreCase(IRequest.REQUESTOR_NAME)) { String requestorName = req.getExtDataInString(name); requestorName = requestorName.trim(); @@ -769,7 +769,7 @@ public class CertReqParser extends ReqParser { } } - if (name.equals(IRequest.ERRORS)) { + if (name.equalsIgnoreCase(IRequest.ERRORS)) { Vector errorsVector = req.getExtDataInStringVector(name); if (errorsVector != null) { StringBuffer errInfo = new StringBuffer(); @@ -781,11 +781,11 @@ public class CertReqParser extends ReqParser { arg.addStringValue(IRequest.ERRORS, errInfo.toString()); } } - if (name.equals(IRequest.ERROR)) { + if (name.equalsIgnoreCase(IRequest.ERROR)) { arg.addStringValue(IRequest.ERRORS, req.getExtDataInString(name)); } - if (name.equals(IRequest.CERT_INFO)) { + if (name.equalsIgnoreCase(IRequest.CERT_INFO)) { // Get the certificate info from the request RevokedCertImpl revokedCert[] = req.getExtDataInRevokedCertArray(IRequest.CERT_INFO); @@ -822,7 +822,7 @@ public class CertReqParser extends ReqParser { } } - if (name.equals(IRequest.OLD_SERIALS) && mDetails) { + if (name.equalsIgnoreCase(IRequest.OLD_SERIALS) && mDetails) { BigInteger oldSerialNo[] = req.getExtDataInBigIntegerArray(IRequest.OLD_SERIALS); if (oldSerialNo != null) { @@ -838,7 +838,7 @@ public class CertReqParser extends ReqParser { } } - if (name.equals(IRequest.OLD_CERTS) && mDetails) { + if (name.equalsIgnoreCase(IRequest.OLD_CERTS) && mDetails) { //X509CertImpl oldCert[] = // (X509CertImpl[])req.get(IRequest.OLD_CERTS); Certificate oldCert[] = @@ -864,7 +864,7 @@ public class CertReqParser extends ReqParser { } } - if (name.equals(IRequest.REVOKED_CERTS) && mDetails && + if (name.equalsIgnoreCase(IRequest.REVOKED_CERTS) && mDetails && req.getRequestType().equals("getRevocationInfo")) { RevokedCertImpl revokedCert[] = req.getExtDataInRevokedCertArray(IRequest.REVOKED_CERTS); diff --git a/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java b/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java index f6d23497a..8b06fffbe 100644 --- a/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java +++ b/pki/base/common/src/com/netscape/cmscore/request/ARequestQueue.java @@ -1346,7 +1346,13 @@ class Request Hashtable hashValue = getExtDataInHashtable(key); if (hashValue == null) { - return null; + String s = getExtDataInString(key); + if (s == null) { + return null; + } else { + String[] sa = { s }; + return sa; + } } Set arrayKeys = hashValue.keySet(); Vector listValue = new Vector(arrayKeys.size()); |