summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorAndrew Wnuk <awnuk@redhat.com>2012-07-24 11:44:32 -0700
committerAndrew Wnuk <awnuk@redhat.com>2012-07-24 11:44:32 -0700
commit87c92d0d2e170e0c7a6c307fcf98c8b7a0438dda (patch)
tree759e7bbc0f22fc9a4c20bc15af255b6d1fd45149 /base
parent6ff5c1754cac41727f76269d3a1be547a382f3ac (diff)
downloadpki-87c92d0d2e170e0c7a6c307fcf98c8b7a0438dda.tar.gz
pki-87c92d0d2e170e0c7a6c307fcf98c8b7a0438dda.tar.xz
pki-87c92d0d2e170e0c7a6c307fcf98c8b7a0438dda.zip
elimination of CA crash
This patch eliminates CA crash caused by default Android browser. Bug: 819123.
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 4c368c03e..d2a2fc718 100644
--- a/base/common/src/com/netscape/cms/profile/input/CMCCertReqInput.java
+++ b/base/common/src/com/netscape/cms/profile/input/CMCCertReqInput.java
@@ -96,6 +96,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 565b7795e..958845335 100644
--- a/base/common/src/com/netscape/cms/profile/input/CertReqInput.java
+++ b/base/common/src/com/netscape/cms/profile/input/CertReqInput.java
@@ -106,6 +106,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 dfb7be887..178977f86 100644
--- a/base/common/src/com/netscape/cms/profile/input/DualKeyGenInput.java
+++ b/base/common/src/com/netscape/cms/profile/input/DualKeyGenInput.java
@@ -105,6 +105,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 4fb7ae863..b70a800d5 100644
--- a/base/common/src/com/netscape/cms/profile/input/EncryptionKeyGenInput.java
+++ b/base/common/src/com/netscape/cms/profile/input/EncryptionKeyGenInput.java
@@ -107,6 +107,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 cc8f9a70d..abf5d334f 100644
--- a/base/common/src/com/netscape/cms/profile/input/KeyGenInput.java
+++ b/base/common/src/com/netscape/cms/profile/input/KeyGenInput.java
@@ -107,6 +107,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 93aaa11b9..5a35bd0ab 100644
--- a/base/common/src/com/netscape/cms/profile/input/SigningKeyGenInput.java
+++ b/base/common/src/com/netscape/cms/profile/input/SigningKeyGenInput.java
@@ -107,6 +107,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);