summaryrefslogtreecommitdiffstats
path: root/pki/base/common
diff options
context:
space:
mode:
authorjmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-05-25 20:45:26 +0000
committerjmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-05-25 20:45:26 +0000
commit4aa0cc3ed8294117293c59d1dce48304c8033f7c (patch)
treee5e6960d1025d8c13511c57831dee7006ccf6664 /pki/base/common
parent371b0b155e5dc22918d9340d2e3d51695782d43d (diff)
downloadpki-4aa0cc3ed8294117293c59d1dce48304c8033f7c.tar.gz
pki-4aa0cc3ed8294117293c59d1dce48304c8033f7c.tar.xz
pki-4aa0cc3ed8294117293c59d1dce48304c8033f7c.zip
Fix Bugzilla Bug#661142 - Verification should fail when a revoked certificate is added. Add better error feedback to user.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@2012 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/common')
-rw-r--r--pki/base/common/src/UserMessages.properties1
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java7
2 files changed, 7 insertions, 1 deletions
diff --git a/pki/base/common/src/UserMessages.properties b/pki/base/common/src/UserMessages.properties
index f1570198..4cb83e5a 100644
--- a/pki/base/common/src/UserMessages.properties
+++ b/pki/base/common/src/UserMessages.properties
@@ -292,6 +292,7 @@ CMS_ADMIN_SRVLT_RS_ID_BS=Resource ID (RS_ID) can not contain backslashes
CMS_ADMIN_SRVLT_SPECIAL_ID=Not allowed to create this special user: {0}
CMS_ADMIN_SRVLT_COMMIT_FAILED=Failed to save changes to the configuration file
CMS_ADMIN_SRVLT_PERFORM_FAILED=Failed to perform
+CMS_ADMIN_SRVLT_CERT_VALIDATE_FAILED=Imported cert has not been verified to be valid. Please review the usual validity properties of this certificate before using it as part of the system.
#######################################################
# Authentication
#
diff --git a/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java b/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java
index b735f0f1..afbf0c6c 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/admin/CMSAdminServlet.java
@@ -2437,7 +2437,12 @@ private void createMasterKey(HttpServletRequest req,
audit(auditMessage);
mConfig.commit(true);
- sendResponse(SUCCESS, null, null, resp);
+ if(verified == true) {
+ sendResponse(SUCCESS, null, null, resp);
+ } else {
+ sendResponse(ERROR, CMS.getUserMessage(getLocale(req), "CMS_ADMIN_SRVLT_CERT_VALIDATE_FAILED"),
+ null, resp);
+ }
} catch (EBaseException eAudit1) {
// store a message in the signed audit log file
auditMessage = CMS.getLogMessage(