summaryrefslogtreecommitdiffstats
path: root/base/common
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2013-08-16 13:14:05 -0400
committerAde Lee <alee@redhat.com>2013-08-20 11:15:06 -0400
commit5ecf890b135bb3bcbe30298000b7ecbad404bce2 (patch)
tree541fac1f40d5db5c3cbfd2412f85a35eb232ceb7 /base/common
parent6e700e531fc79247946dd97daa07ff31b264d180 (diff)
Add TPS self tests
Added self tests analogous to the tests previously performed inthe C subsystem.
Diffstat (limited to 'base/common')
-rw-r--r--base/common/src/LogMessages.properties7
-rw-r--r--base/common/src/UserMessages.properties2
-rw-r--r--base/common/src/com/netscape/cmscore/cert/CertUtils.java17
3 files changed, 19 insertions, 7 deletions
diff --git a/base/common/src/LogMessages.properties b/base/common/src/LogMessages.properties
index 550df1b5e..67ca36957 100644
--- a/base/common/src/LogMessages.properties
+++ b/base/common/src/LogMessages.properties
@@ -2464,6 +2464,13 @@ SELFTESTS_RA_IS_CORRUPT={0}: RA public key is corrupt
SELFTESTS_RA_IS_PRESENT={0}: RA is present
SELFTESTS_TKS_FAILED={0}: TKS self test called {1} FAILED!
SELFTESTS_TKS_SUCCEEDED={0}: TKS self test called {1} ran SUCCESSFULLY
+SELFTESTS_TPS_IS_NOT_PRESENT={0}: TPS is NOT present
+SELFTESTS_TPS_IS_NOT_INITIALIZED={0}: TPS is NOT yet initialized
+SELFTESTS_TPS_IS_CORRUPT={0}: TPS public key is corrupt
+SELFTESTS_TPS_IS_PRESENT={0}: TPS is present
+SELFTESTS_TPS_IS_NOT_YET_VALID={0}: TPS is not yet valid
+SELFTESTS_TPS_IS_EXPIRED={0}: TPS is expired
+SELFTESTS_TPS_IS_VALID={0}: TPS is valid
SELFTESTS_RUN_ON_DEMAND_REQUEST={0}: the passed in request parameter {1}, used to invoke running self tests on-demand, was missing
SELFTESTS_RUN_ON_DEMAND={0}: Running self test plugins specified to be executed on-demand:
SELFTESTS_NOT_RUN_ON_DEMAND={0}: There were NO self test plugins specified to be run on-demand!
diff --git a/base/common/src/UserMessages.properties b/base/common/src/UserMessages.properties
index 4bc2115ec..57e7ee381 100644
--- a/base/common/src/UserMessages.properties
+++ b/base/common/src/UserMessages.properties
@@ -1086,6 +1086,8 @@ CMS_SELFTESTS_OCSP_VALIDITY_DESCRIPTION=This self test is used to check whether
CMS_SELFTESTS_RA_PRESENCE_DESCRIPTION=This self test is used to check whether or not the RA is present.
CMS_SELFTESTS_KRA_PRESENCE_DESCRIPTION=This self test is used to check whether or not the KRA is present.
CMS_SELFTESTS_TKS_PRESENCE_DESCRIPTION=This self test is used to check whether or not the TKS is present.
+CMS_SELFTESTS_TPS_PRESENCE_DESCRIPTION=This self test is used to check whether or not the TPS is present.
+CMS_SELFTESTS_TPS_VALIDITY_DESCRIPTION=This self test is used to check whether or not the TPS is valid.
#######################################################
# ACL
#
diff --git a/base/common/src/com/netscape/cmscore/cert/CertUtils.java b/base/common/src/com/netscape/cmscore/cert/CertUtils.java
index 37444eff5..9dc33e541 100644
--- a/base/common/src/com/netscape/cmscore/cert/CertUtils.java
+++ b/base/common/src/com/netscape/cmscore/cert/CertUtils.java
@@ -1081,18 +1081,21 @@ public class CertUtils {
}
public static String toLowerCaseSubsystemType(String s) {
- String x = null;
+ if (s == null) {
+ return null;
+ }
if (s.equalsIgnoreCase("CA")) {
- x = "ca";
+ return "ca";
} else if (s.equalsIgnoreCase("KRA")) {
- x = "kra";
+ return "kra";
} else if (s.equalsIgnoreCase("OCSP")) {
- x = "ocsp";
+ return "ocsp";
} else if (s.equalsIgnoreCase("TKS")) {
- x = "tks";
+ return "tks";
+ } else if (s.equalsIgnoreCase("TPS")) {
+ return "tps";
}
-
- return x;
+ return null;
}
/**