summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/common/src/com/netscape/cms/profile/input/CMCCertReqInput.java5
-rw-r--r--base/common/src/com/netscape/cms/profile/input/CertReqInput.java5
-rw-r--r--base/common/src/com/netscape/cms/profile/input/DualKeyGenInput.java5
-rw-r--r--base/common/src/com/netscape/cms/profile/input/EncryptionKeyGenInput.java5
-rw-r--r--base/common/src/com/netscape/cms/profile/input/KeyGenInput.java5
-rw-r--r--base/common/src/com/netscape/cms/profile/input/SigningKeyGenInput.java5
6 files changed, 30 insertions, 0 deletions
diff --git a/base/common/src/com/netscape/cms/profile/input/CMCCertReqInput.java b/base/common/src/com/netscape/cms/profile/input/CMCCertReqInput.java
index 901cf5c71..8ce1be3ee 100644
--- a/base/common/src/com/netscape/cms/profile/input/CMCCertReqInput.java
+++ b/base/common/src/com/netscape/cms/profile/input/CMCCertReqInput.java
@@ -89,6 +89,11 @@ public class CMCCertReqInput extends EnrollInput implements IProfileInput {
X509CertInfo info =
request.getExtDataInCertInfo(EnrollProfile.REQUEST_CERTINFO);
+ if (cert_request == null) {
+ CMS.debug("CMCCertReqInput: populate - invalid certificate request");
+ throw new EProfileException(CMS.getUserMessage(
+ getLocale(request), "CMS_PROFILE_NO_CERT_REQ"));
+ }
TaggedRequest msgs[] = mEnrollProfile.parseCMC(getLocale(request), cert_request);
if (msgs == null) {
diff --git a/base/common/src/com/netscape/cms/profile/input/CertReqInput.java b/base/common/src/com/netscape/cms/profile/input/CertReqInput.java
index 50fac5a41..e67f5b501 100644
--- a/base/common/src/com/netscape/cms/profile/input/CertReqInput.java
+++ b/base/common/src/com/netscape/cms/profile/input/CertReqInput.java
@@ -102,6 +102,11 @@ public class CertReqInput extends EnrollInput implements IProfileInput {
"CMS_PROFILE_UNKNOWN_CERT_REQ_TYPE",
""));
}
+ if (cert_request == null) {
+ CMS.debug("CertReqInput: populate - invalid certificate request");
+ throw new EProfileException(CMS.getUserMessage(
+ getLocale(request), "CMS_PROFILE_NO_CERT_REQ"));
+ }
if (cert_request_type.equals(EnrollProfile.REQ_TYPE_PKCS10)) {
PKCS10 pkcs10 = mEnrollProfile.parsePKCS10(getLocale(request), cert_request);
diff --git a/base/common/src/com/netscape/cms/profile/input/DualKeyGenInput.java b/base/common/src/com/netscape/cms/profile/input/DualKeyGenInput.java
index 3205fca0a..8a2629667 100644
--- a/base/common/src/com/netscape/cms/profile/input/DualKeyGenInput.java
+++ b/base/common/src/com/netscape/cms/profile/input/DualKeyGenInput.java
@@ -104,6 +104,11 @@ public class DualKeyGenInput extends EnrollInput implements IProfileInput {
"CMS_PROFILE_UNKNOWN_CERT_REQ_TYPE",
""));
}
+ if (keygen_request == null) {
+ CMS.debug("DualKeyGenInput: populate - invalid certificate request");
+ throw new EProfileException(CMS.getUserMessage(
+ getLocale(request), "CMS_PROFILE_NO_CERT_REQ"));
+ }
if (keygen_request_type.startsWith("pkcs10")) {
PKCS10 pkcs10 = mEnrollProfile.parsePKCS10(getLocale(request), keygen_request);
diff --git a/base/common/src/com/netscape/cms/profile/input/EncryptionKeyGenInput.java b/base/common/src/com/netscape/cms/profile/input/EncryptionKeyGenInput.java
index 63c18483c..dae8143ee 100644
--- a/base/common/src/com/netscape/cms/profile/input/EncryptionKeyGenInput.java
+++ b/base/common/src/com/netscape/cms/profile/input/EncryptionKeyGenInput.java
@@ -104,6 +104,11 @@ public class EncryptionKeyGenInput extends EnrollInput implements IProfileInput
"CMS_PROFILE_UNKNOWN_CERT_REQ_TYPE",
""));
}
+ if (keygen_request == null) {
+ CMS.debug("EncryptionKeyGenInput: populate - invalid certificate request");
+ throw new EProfileException(CMS.getUserMessage(
+ getLocale(request), "CMS_PROFILE_NO_CERT_REQ"));
+ }
if (keygen_request_type.startsWith(EnrollProfile.REQ_TYPE_PKCS10)) {
PKCS10 pkcs10 = mEnrollProfile.parsePKCS10(getLocale(request), keygen_request);
diff --git a/base/common/src/com/netscape/cms/profile/input/KeyGenInput.java b/base/common/src/com/netscape/cms/profile/input/KeyGenInput.java
index 8be954024..1b3564ab7 100644
--- a/base/common/src/com/netscape/cms/profile/input/KeyGenInput.java
+++ b/base/common/src/com/netscape/cms/profile/input/KeyGenInput.java
@@ -104,6 +104,11 @@ public class KeyGenInput extends EnrollInput implements IProfileInput {
"CMS_PROFILE_UNKNOWN_CERT_REQ_TYPE",
""));
}
+ if (keygen_request == null) {
+ CMS.debug("KeyGenInput: populate - invalid certificate request");
+ throw new EProfileException(CMS.getUserMessage(
+ getLocale(request), "CMS_PROFILE_NO_CERT_REQ"));
+ }
if (keygen_request_type.startsWith(EnrollProfile.REQ_TYPE_PKCS10)) {
PKCS10 pkcs10 = mEnrollProfile.parsePKCS10(getLocale(request), keygen_request);
diff --git a/base/common/src/com/netscape/cms/profile/input/SigningKeyGenInput.java b/base/common/src/com/netscape/cms/profile/input/SigningKeyGenInput.java
index d60ed551f..6ee2fd42e 100644
--- a/base/common/src/com/netscape/cms/profile/input/SigningKeyGenInput.java
+++ b/base/common/src/com/netscape/cms/profile/input/SigningKeyGenInput.java
@@ -104,6 +104,11 @@ public class SigningKeyGenInput extends EnrollInput implements IProfileInput {
"CMS_PROFILE_UNKNOWN_CERT_REQ_TYPE",
""));
}
+ if (keygen_request == null) {
+ CMS.debug("SigningKeyGenInput: populate - invalid certificate request");
+ throw new EProfileException(CMS.getUserMessage(
+ getLocale(request), "CMS_PROFILE_NO_CERT_REQ"));
+ }
if (keygen_request_type.startsWith(EnrollProfile.REQ_TYPE_PKCS10)) {
PKCS10 pkcs10 = mEnrollProfile.parsePKCS10(getLocale(request), keygen_request);