summaryrefslogtreecommitdiffstats
path: root/base/common/src
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2013-04-27 02:13:33 -0400
committerAde Lee <alee@redhat.com>2013-04-28 01:07:08 -0400
commit4d22a2caaeb77a78e2e962efa60e30772b1227be (patch)
treec117374a31ef19e460c4b6e02e57c3160446288e /base/common/src
parentbc03ee6c31e5390e76d2f92d00931d19a71eea7b (diff)
Added separate CLI option for client database password.
Previously the -w option is used to specify the password for either the username/password authentication or client database password to do client certificate authentication. Since the passwords now may be used at the same time, a new -c option has been added for the client database password.
Diffstat (limited to 'base/common/src')
-rw-r--r--base/common/src/com/netscape/certsrv/client/ClientConfig.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/base/common/src/com/netscape/certsrv/client/ClientConfig.java b/base/common/src/com/netscape/certsrv/client/ClientConfig.java
index 885b60a26..6be7abae2 100644
--- a/base/common/src/com/netscape/certsrv/client/ClientConfig.java
+++ b/base/common/src/com/netscape/certsrv/client/ClientConfig.java
@@ -52,6 +52,7 @@ public class ClientConfig {
String certDatabase;
String certNickname;
+ String certPassword;
String username;
String password;
@@ -86,6 +87,15 @@ public class ClientConfig {
this.certNickname = certNickname;
}
+ @XmlElement(name="CertPassword")
+ public String getCertPassword() {
+ return certPassword;
+ }
+
+ public void setCertPassword(String certPassword) {
+ this.certPassword = certPassword;
+ }
+
@XmlElement(name="Username")
public String getUsername() {
return username;
@@ -110,6 +120,7 @@ public class ClientConfig {
int result = 1;
result = prime * result + ((certDatabase == null) ? 0 : certDatabase.hashCode());
result = prime * result + ((certNickname == null) ? 0 : certNickname.hashCode());
+ result = prime * result + ((certPassword == null) ? 0 : certPassword.hashCode());
result = prime * result + ((password == null) ? 0 : password.hashCode());
result = prime * result + ((serverURI == null) ? 0 : serverURI.hashCode());
result = prime * result + ((username == null) ? 0 : username.hashCode());
@@ -135,6 +146,11 @@ public class ClientConfig {
return false;
} else if (!certNickname.equals(other.certNickname))
return false;
+ if (certPassword == null) {
+ if (other.certPassword != null)
+ return false;
+ } else if (!certPassword.equals(other.certPassword))
+ return false;
if (password == null) {
if (other.password != null)
return false;