diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2012-07-10 14:21:45 -0500 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-07-18 19:52:51 -0500 |
commit | 2b95e5231debe5fb6bd97e06c61dc65f7942e38c (patch) | |
tree | f4f3b14a77ba114c31151e8a6f641df3be725a54 /base/console/src | |
parent | 6cd64781a7cda192bc2b0a555974037fd16cc2c5 (diff) | |
download | pki-2b95e5231debe5fb6bd97e06c61dc65f7942e38c.tar.gz pki-2b95e5231debe5fb6bd97e06c61dc65f7942e38c.tar.xz pki-2b95e5231debe5fb6bd97e06c61dc65f7942e38c.zip |
Merged changes in com.netscape.certsrv.common.
Due to packaging issue the source code in com.netscape.certsrv.common
were duplicated into common and console packages and over time they
have become out-of-sync. This patch merges the changes such that they
are now identical. When the packaging issue is fixed later the
duplicate copy can be removed.
Ticket #113
Diffstat (limited to 'base/console/src')
8 files changed, 73 insertions, 82 deletions
diff --git a/base/console/src/com/netscape/certsrv/common/ConfigConstants.java b/base/console/src/com/netscape/certsrv/common/ConfigConstants.java index a963bf1a4..4f3a05591 100644 --- a/base/console/src/com/netscape/certsrv/common/ConfigConstants.java +++ b/base/console/src/com/netscape/certsrv/common/ConfigConstants.java @@ -17,14 +17,16 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.common; - /** - * Constants that are used by daemon and UI configuration. + * This interface contains constants that are used + * in the protocol between the configuration daemon + * and UI configuration wizard. * * @author Christine Ho * @version $Revision$, $Date$ */ public interface ConfigConstants { + public static final String TRUE = "true"; public static final String FALSE = "false"; public static final String OPTYPE = "opType"; @@ -32,8 +34,8 @@ public interface ConfigConstants { // Stages public static final String STAGES = "stages"; - public static final String STAGE_CONNECT_DB = "stageConnectDB"; public static final String STAGE_INTERNAL_DB = "stageInternalDB"; + public static final String STAGE_CONNECT_DB = "stageConnectDB"; public static final String STAGE_SETUP_PORTS = "stageSetupPorts"; public static final String STAGE_SETUP_ADMINISTRATOR = "stageSetupAdmin"; public static final String STAGE_SETUP_SUBSYSTEMS = "stageSubsystems"; @@ -78,9 +80,9 @@ public interface ConfigConstants { public static final String STAGE_CACLONING = "stageCACloning"; public static final String STAGE_RACLONING = "stageRACloning"; public static final String STAGE_KRACLONING = "stageKRACloning"; + public static final String STAGE_TKSCLONING = "stageTKSCloning"; public static final String STAGE_SSLCLONING = "stageSSLCloning"; public static final String STAGE_OCSPCLONING = "stageOCSPCloning"; - public static final String STAGE_TKSCLONING = "stageTKSCloning"; public static final String STAGE_CLONEMASTER = "stageCloneMaster"; public static final String STAGE_UPDATE_DB_INFO = "stageUpdateDBInfo"; @@ -133,6 +135,7 @@ public interface ConfigConstants { public static final String PR_EE_SECURE_PORT = "eeGateway.https.port"; public static final String PR_AGENT_PORT = "agentGateway.https.port"; public static final String PR_RADM_PORT = "radm.https.port"; + public static final String PR_RADM_PORT_SETUP = "radm.port"; public static final String PR_EE_PORT_ENABLE = "eeGateway.http.enable"; public static final String PR_EE_PORTS_ENABLE = "eePortsEnable"; @@ -170,19 +173,19 @@ public interface ConfigConstants { public static final String PR_ADD_LDIF_PATH = "addLdifPath"; public static final String PR_MOD_LDIF_PATH = "modLdifPath"; public static final String PR_SIGNING_KEY_MIGRATION_TOKEN = - "signingKeyMigrationToken"; + "signingKeyMigrationToken"; public static final String PR_SSL_KEY_MIGRATION_TOKEN = - "sslKeyMigrationToken"; + "sslKeyMigrationToken"; public static final String PR_SIGNING_KEY_MIGRATION_TOKEN_PASSWD = - "signingKeyMigrationTokenPasswd"; + "signingKeyMigrationTokenPasswd"; public static final String PR_SIGNING_KEY_MIGRATION_TOKEN_SOPPASSWD = - "signingKeyMigrationTokenSOPPasswd"; + "signingKeyMigrationTokenSOPPasswd"; public static final String PR_SSL_KEY_MIGRATION_TOKEN_PASSWD = - "sslKeyMigrationTokenPasswd"; + "sslKeyMigrationTokenPasswd"; public static final String PR_SSL_KEY_MIGRATION_TOKEN_SOPPASSWD = - "sslKeyMigrationTokenSOPPasswd"; + "sslKeyMigrationTokenSOPPasswd"; public static final String PR_NUM_MIGRATION_WARNINGS = - "numMigrationWarnings"; + "numMigrationWarnings"; public static final String PR_MIGRATION_WARNING = "migrationWarning"; public static final String PR_CA_KEY_TYPE = "caKeyType"; public static final String PR_LDAP_PASSWORD = "ldapPassword"; @@ -330,4 +333,3 @@ public interface ConfigConstants { public static final String PR_AGREEMENT_NAME_2 = "agreementName2"; public static final String PR_REPLICATION_MANAGER_PASSWD_2 = "replicationManagerPwd2"; } - diff --git a/base/console/src/com/netscape/certsrv/common/Constants.java b/base/console/src/com/netscape/certsrv/common/Constants.java index cf2d57575..880e14643 100644 --- a/base/console/src/com/netscape/certsrv/common/Constants.java +++ b/base/console/src/com/netscape/certsrv/common/Constants.java @@ -17,10 +17,9 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.common; - /** - * Constants that are shared by certificate server - * and its client SDK. + * This interface contains constants that are shared + * by certificate server and its client SDK. * * @author Jack Pan-Chen * @author Christine Ho @@ -81,7 +80,7 @@ public interface Constants { public final static String PR_GATEWAY_S_BACKLOG = "gateway.https.backlog"; public final static String PR_GATEWAY_BACKLOG = "gateway.http.backlog"; public final static String PR_GATEWAY_PORT_ENABLED = - "gateway.http.enable"; + "gateway.http.enable"; public final static String PR_MASTER_AGENT_PORT = "master.ca.agent.port"; public final static String PR_MASTER_AGENT_HOST = "master.ca.agent.host"; @@ -151,7 +150,7 @@ public interface Constants { *========================================================*/ public final static String PR_NOTIFICATION_FORM_NAME = "emailTemplate"; public final static String PR_NOTIFICATION_SUBJECT = - "emailSubject"; + "emailSubject"; public final static String PR_NOTIFICATION_SENDER = "senderEmail"; public final static String PR_NOTIFICATION_RECEIVER = "recipientEmail"; @@ -326,9 +325,9 @@ public interface Constants { public final static String PR_RENEWAL_VALIDITY = "renewal.validity"; public final static String PR_RENEWAL_EMAIL = "renewal.email"; public final static String PR_RENEWAL_EXPIREDNOTIFIEDENABLED = - "renewal.expired.notification.enabled"; + "renewal.expired.notification.enabled"; public final static String PR_RENEWAL_NUMNOTIFICATION = - "renewal.numNotification"; + "renewal.numNotification"; public final static String PR_RENEWAL_INTERVAL = "renewal.interval"; public final static String PR_SERVLET_CLASS = "class"; public final static String PR_SERVLET_URI = "uri"; @@ -487,9 +486,9 @@ public interface Constants { //public final static String PR_CA_SIGNING_CERT = "cacert"; //public final static String PR_SERVER_CERT = "servercert"; public final static String PR_CLIENT_CERT = "clientcert"; - public final static String PR_FULL_INTERNAL_TOKEN_NAME="Internal Key Storage Token"; + public final static String PR_FULL_INTERNAL_TOKEN_NAME = "Internal Key Storage Token"; public final static String PR_INTERNAL_TOKEN_NAME = - "internal"; + "internal"; public final static String PR_TOKEN_NAME = "tokenName"; public final static String PR_TOKEN_PASSWD = "tokenPwd"; public final static String PR_KEY_LENGTH = "keyLength"; @@ -523,43 +522,28 @@ public interface Constants { /* SSL Cipher Preferences */ public final static String PR_CIPHER_PREF = "cipherpref"; + /* SSL EC Type */ + public final static String PR_ECTYPE = "ectype"; + /* values for SSL cipher preferences */ - public final static String - PR_SSL2_RC4_128_WITH_MD5 = "rc4"; - public final static String - PR_SSL2_RC4_128_EXPORT40_WITH_MD5 = "rc4export"; - public final static String - PR_SSL2_RC2_128_CBC_WITH_MD5 = "rc2"; - public final static String - PR_SSL2_RC2_128_CBC_EXPORT40_WITH_MD5 = "rc2export"; - public final static String - PR_SSL2_DES_64_CBC_WITH_MD5 = "des"; - public final static String - PR_SSL2_DES_192_EDE3_CBC_WITH_MD5 = "desede3"; - public final static String - PR_SSL3_RSA_WITH_NULL_MD5 = "rsa_null_md5"; - public final static String - PR_SSL3_RSA_EXPORT_WITH_RC4_40_MD5 = "rsa_rc4_40_md5"; - public final static String - PR_SSL3_RSA_WITH_RC4_128_MD5 = "rsa_rc4_128_md5"; - public final static String - PR_SSL3_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = "rsa_rc2_40_md5"; - public final static String - PR_SSL3_RSA_WITH_DES_CBC_SHA = "rsa_des_sha"; - public final static String - PR_SSL3_RSA_WITH_3DES_EDE_CBC_SHA = "rsa_3des_sha"; - public final static String - PR_SSL3_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA = "fortezza"; - public final static String - PR_SSL3_FORTEZZA_DMS_WITH_RC4_128_SHA = "fortezza_rc4_128_sha"; - public final static String - PR_SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA = "rsa_fips_3des_sha"; - public final static String - PR_SSL_RSA_FIPS_WITH_DES_CBC_SHA = "rsa_fips_des_sha"; - public final static String - PR_TLS_RSA_EXPORT1024_WITH_RC4_56_SHA = "tls_rsa_rc4_56_sha"; - public final static String - PR_TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA = "tls_rsa_des_sha"; + public final static String PR_SSL2_RC4_128_WITH_MD5 = "rc4"; + public final static String PR_SSL2_RC4_128_EXPORT40_WITH_MD5 = "rc4export"; + public final static String PR_SSL2_RC2_128_CBC_WITH_MD5 = "rc2"; + public final static String PR_SSL2_RC2_128_CBC_EXPORT40_WITH_MD5 = "rc2export"; + public final static String PR_SSL2_DES_64_CBC_WITH_MD5 = "des"; + public final static String PR_SSL2_DES_192_EDE3_CBC_WITH_MD5 = "desede3"; + public final static String PR_SSL3_RSA_WITH_NULL_MD5 = "rsa_null_md5"; + public final static String PR_SSL3_RSA_EXPORT_WITH_RC4_40_MD5 = "rsa_rc4_40_md5"; + public final static String PR_SSL3_RSA_WITH_RC4_128_MD5 = "rsa_rc4_128_md5"; + public final static String PR_SSL3_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = "rsa_rc2_40_md5"; + public final static String PR_SSL3_RSA_WITH_DES_CBC_SHA = "rsa_des_sha"; + public final static String PR_SSL3_RSA_WITH_3DES_EDE_CBC_SHA = "rsa_3des_sha"; + public final static String PR_SSL3_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA = "fortezza"; + public final static String PR_SSL3_FORTEZZA_DMS_WITH_RC4_128_SHA = "fortezza_rc4_128_sha"; + public final static String PR_SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA = "rsa_fips_3des_sha"; + public final static String PR_SSL_RSA_FIPS_WITH_DES_CBC_SHA = "rsa_fips_des_sha"; + public final static String PR_TLS_RSA_EXPORT1024_WITH_RC4_56_SHA = "tls_rsa_rc4_56_sha"; + public final static String PR_TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA = "tls_rsa_des_sha"; /*======================================================== * Watchdog and Server State Messages @@ -598,9 +582,9 @@ public interface Constants { public final static String PT_DN = "dn"; public final static String PV_SYSTEM_ADMINISTRATORS = - "SystemAdministrators"; + "SystemAdministrators"; public final static String PV_CERTIFICATE_ADMINISTRATORS = - "CertificateAdministrators"; + "CertificateAdministrators"; public final static String OP_AUTHENTICATE = "authenticate"; public final static String OP_RESTART = "restart"; @@ -635,9 +619,9 @@ public interface Constants { // certificate authority operations public final static String PT_PUBLISH_DN = "ldappublish.ldap.admin-dn"; public final static String PT_PUBLISH_PWD = - "ldappublish.ldap.admin-password"; + "ldappublish.ldap.admin-password"; public final static String PT_PUBLISH_FREQ = - "crl.crl0.autoUpdateInterval"; + "crl.crl0.autoUpdateInterval"; public final static String PT_SERIALNO = "serialno"; public final static String PT_NAMES = "names"; public final static String PT_CERTIFICATES = "certificates"; diff --git a/base/console/src/com/netscape/certsrv/common/DestDef.java b/base/console/src/com/netscape/certsrv/common/DestDef.java index 313ed9d22..188fb5c9f 100644 --- a/base/console/src/com/netscape/certsrv/common/DestDef.java +++ b/base/console/src/com/netscape/certsrv/common/DestDef.java @@ -17,10 +17,10 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.common; - /** * This interface defines all the operation destination - * currently in use. + * used in the administration protocol between the + * console and the server. * * @author Jack Pan-Chen * @version $Revision$, $Date$ diff --git a/base/console/src/com/netscape/certsrv/common/NameValuePairs.java b/base/console/src/com/netscape/certsrv/common/NameValuePairs.java index 5e7d79cde..30491cdd0 100644 --- a/base/console/src/com/netscape/certsrv/common/NameValuePairs.java +++ b/base/console/src/com/netscape/certsrv/common/NameValuePairs.java @@ -18,6 +18,7 @@ package com.netscape.certsrv.common; import java.util.LinkedHashMap; +import java.util.Map; import java.util.StringTokenizer; /** @@ -28,6 +29,8 @@ import java.util.StringTokenizer; */ public class NameValuePairs extends LinkedHashMap<String, String> { + private static final long serialVersionUID = 1494507857048437440L; + /** * Constructs name value pairs. */ @@ -41,12 +44,11 @@ public class NameValuePairs extends LinkedHashMap<String, String> { * @return string representation */ public String toString() { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); - for (String name : keySet()) { - String value = get(name); + for (Map.Entry<String, String> entry : entrySet()) { - buf.append(name + "=" + value); + buf.append(String.format("%s=%s", entry.getKey(), entry.getValue())); buf.append("\n"); } diff --git a/base/console/src/com/netscape/certsrv/common/OpDef.java b/base/console/src/com/netscape/certsrv/common/OpDef.java index 734cd75d3..28cc31f59 100644 --- a/base/console/src/com/netscape/certsrv/common/OpDef.java +++ b/base/console/src/com/netscape/certsrv/common/OpDef.java @@ -17,10 +17,10 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.common; - /** * This interface defines all the administration operations - * currently in use. + * used in the administration protocol between the console + * and the server. * * @author Jack Pan-Chen * @version $Revision$, $Date$ diff --git a/base/console/src/com/netscape/certsrv/common/PrefixDef.java b/base/console/src/com/netscape/certsrv/common/PrefixDef.java index 489594356..01a722f91 100644 --- a/base/console/src/com/netscape/certsrv/common/PrefixDef.java +++ b/base/console/src/com/netscape/certsrv/common/PrefixDef.java @@ -17,10 +17,10 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.common; - /** * This interface defines all the prefix tags - * currently in use. + * used in the administration protocol between + * the console and the server. * * @author Jack Pan-Chen * @version $Revision$, $Date$ diff --git a/base/console/src/com/netscape/certsrv/common/ScopeDef.java b/base/console/src/com/netscape/certsrv/common/ScopeDef.java index c500fb0ad..f689d1504 100644 --- a/base/console/src/com/netscape/certsrv/common/ScopeDef.java +++ b/base/console/src/com/netscape/certsrv/common/ScopeDef.java @@ -17,10 +17,10 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.common; - /** * This interface defines all the operation scope - * currently in use. + * used in the administration protocol between the + * console and the server. * * @author Jack Pan-Chen * @version $Revision$, $Date$ @@ -29,6 +29,7 @@ public interface ScopeDef { // users and groups public final static String SC_GROUPS = "groups"; + public final static String SC_GROUP_MEMBERS = "members"; public final static String SC_USERS = "users"; public final static String SC_USER_CERTS = "certs"; @@ -111,7 +112,7 @@ public interface ScopeDef { public final static String SC_MNSCHEME = "mnScheme"; //stat - public final static String SC_STAT = "stat"; + public final static String SC_STAT = "stat"; // RA public final static String SC_GENERAL = "general"; @@ -159,9 +160,9 @@ public interface ScopeDef { public final static String SC_SUBJECT_NAME = "subjectName"; public final static String SC_CERTINFO = "certInfo"; public final static String SC_CERT_REQUEST = "certRequest"; - public final static String SC_IMPORT_CROSS_CERT = "importXCert"; public final static String SC_ISSUE_IMPORT_CERT = "issueImportCert"; public final static String SC_INSTALL_CERT = "installCert"; + public final static String SC_IMPORT_CROSS_CERT = "importXCert"; public final static String SC_CA_CERTLIST = "caCertList"; public final static String SC_ALL_CERTLIST = "allCertList"; public final static String SC_DELETE_CERTS = "deleteCert"; @@ -188,6 +189,6 @@ public interface ScopeDef { // Manage certificate admin public final static String SC_USERCERTSLIST = "userCertsList"; public final static String SC_TKSKEYSLIST = "tksKeysList"; - public final static String SC_ROOTCERTSLIST = "rootCertsList"; + public final static String SC_ROOTCERTSLIST = "rootCertsList"; public final static String SC_ROOTCERT_TRUSTBIT = "rootTrustBit"; } diff --git a/base/console/src/com/netscape/certsrv/common/TaskId.java b/base/console/src/com/netscape/certsrv/common/TaskId.java index e20bb334d..bd6f970b3 100644 --- a/base/console/src/com/netscape/certsrv/common/TaskId.java +++ b/base/console/src/com/netscape/certsrv/common/TaskId.java @@ -17,15 +17,17 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.common; - /** - * This interface defines all the tasks currently in use for the - * certificate server configuration. + * This interface defines all the tasks used in + * the configuration protocol between the + * configuration wizard and the configuration + * daemon. * * @author Christine Ho * @version $Revision$, $Date$ */ public interface TaskId { + // list out all the previously performed tasks public final static String TASK_LIST_PREVIOUS_STAGES = "listPreviousStages"; @@ -65,7 +67,7 @@ public interface TaskId { // get information about all cryptotokens public final static String TASK_TOKEN_INFO = "tokenInfo"; - // get master or clone setting + // get master or clone setting public final static String TASK_MASTER_OR_CLONE = "SetMasterOrClone"; // single signon @@ -99,10 +101,10 @@ public interface TaskId { // set CA starting serial number public final static String TASK_SET_CA_SERIAL = "setCASerial"; - // set KRA request and key starting and ending number + // set KRA request and key starting and ending number public final static String TASK_SET_KRA_NUMBER = "setKRANumber"; - // check key length + // check key length public final static String TASK_CHECK_KEYLENGTH = "checkKeyLength"; // check certificate extension |