summaryrefslogtreecommitdiffstats
path: root/base/ca/src/com/netscape/ca/CertificateAuthority.java
diff options
context:
space:
mode:
Diffstat (limited to 'base/ca/src/com/netscape/ca/CertificateAuthority.java')
-rw-r--r--base/ca/src/com/netscape/ca/CertificateAuthority.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/base/ca/src/com/netscape/ca/CertificateAuthority.java b/base/ca/src/com/netscape/ca/CertificateAuthority.java
index d4b8d7ecd..31a0c03b6 100644
--- a/base/ca/src/com/netscape/ca/CertificateAuthority.java
+++ b/base/ca/src/com/netscape/ca/CertificateAuthority.java
@@ -2312,6 +2312,11 @@ public class CertificateAuthority
}
TBSRequest tbsReq = request.getTBSRequest();
+ if (tbsReq.getRequestCount() == 0) {
+ CMS.debug("CertificateAuthority: No request found");
+ log(ILogger.LL_FAILURE, CMS.getLogMessage("OCSP_REQUEST_FAILURE", "No Request Found"));
+ throw new EBaseException("OCSP request is empty");
+ }
/* An OCSP request can contain CertIDs for certificates
* issued by different CAs, but each SingleResponse is valid
@@ -2451,10 +2456,10 @@ public class CertificateAuthority
mTotalTime += endTime - startTime;
return response;
- } catch (Exception e) {
+ } catch (EBaseException e) {
log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_CA_CA_OCSP_REQUEST", e.toString()));
- throw new EBaseException(e.toString(), e);
+ throw e;
}
}