summaryrefslogtreecommitdiffstats
path: root/base/kra
diff options
context:
space:
mode:
authorAbhishek Koneru <akoneru@redhat.com>2012-05-31 17:04:47 -0400
committerEndi Sukma Dewata <edewata@redhat.com>2012-06-05 14:46:04 -0500
commitc2128339ba046ceb7ab32954ae07dbb4b41d4e73 (patch)
tree78b83b2992faa71ad57e83d60b25dda1470c4a0b /base/kra
parent500fe4441a5d458818138cc9b536c3b19ac23dc8 (diff)
downloadpki-c2128339ba046ceb7ab32954ae07dbb4b41d4e73.tar.gz
pki-c2128339ba046ceb7ab32954ae07dbb4b41d4e73.tar.xz
pki-c2128339ba046ceb7ab32954ae07dbb4b41d4e73.zip
Fixes for Null_Returns Cases - 1 For Commit
Diffstat (limited to 'base/kra')
-rw-r--r--base/kra/src/com/netscape/kra/EnrollmentService.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/base/kra/src/com/netscape/kra/EnrollmentService.java b/base/kra/src/com/netscape/kra/EnrollmentService.java
index c881decdf..666619cdb 100644
--- a/base/kra/src/com/netscape/kra/EnrollmentService.java
+++ b/base/kra/src/com/netscape/kra/EnrollmentService.java
@@ -734,7 +734,9 @@ public class EnrollmentService implements IService {
X509CertInfo certInfo[] =
request.getExtDataInCertInfoArray(IRequest.CERT_INFO);
CertificateX509Key pX509Key = null;
-
+ if (certInfo == null) {
+ throw new EBaseException(CMS.getLogMessage("CMS_BASE_CERT_NOT_FOUND"));
+ }
try {
pX509Key = (CertificateX509Key)
certInfo[i].get(X509CertInfo.KEY);
@@ -785,6 +787,9 @@ public class EnrollmentService implements IService {
X509CertInfo certInfo[] =
request.getExtDataInCertInfoArray(IRequest.CERT_INFO);
+ if (certInfo == null) {
+ throw new EBaseException(CMS.getLogMessage("CMS_BASE_CERT_NOT_FOUND"));
+ }
CertificateSubjectName pSub = null;
try {