diff options
author | Endi S. Dewata <edewata@redhat.com> | 2015-01-27 00:35:59 -0500 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2015-01-28 14:44:12 -0500 |
commit | 7de81fedeba1a3904c127dc612a937903e622d81 (patch) | |
tree | 47a52fdf47d30fee5d23576ace5985d22e5f05d4 /base/common | |
parent | 22ff1fbd2de37395e219a7e7362722517a3f4dc3 (diff) | |
download | pki-7de81fedeba1a3904c127dc612a937903e622d81.tar.gz pki-7de81fedeba1a3904c127dc612a937903e622d81.tar.xz pki-7de81fedeba1a3904c127dc612a937903e622d81.zip |
Refactored CRMFPopClient.
The CRMFPopClient has been refactored such that it is easier
to understand and reuse. The code has been fixed such that it
can read a normal PEM transport certificate. It also has been
fixed to parse the request submission result properly.
The client-cert-request CLI command was modified to support CRMF
requests.
The MainCLI and ClientConfig were modified to accept a security
token name.
The pki_java_command_wrapper.in was modified to include the Apache
Commons IO library.
https://fedorahosted.org/pki/ticket/1074
Diffstat (limited to 'base/common')
-rw-r--r-- | base/common/src/com/netscape/certsrv/client/ClientConfig.java | 22 |
1 files changed, 22 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 f59f7320e..a81669536 100644 --- a/base/common/src/com/netscape/certsrv/client/ClientConfig.java +++ b/base/common/src/com/netscape/certsrv/client/ClientConfig.java @@ -51,10 +51,13 @@ public class ClientConfig { URI serverURI; String certDatabase; + String tokenName; String certNickname; String certPassword; + String username; String password; + String messageFormat; public ClientConfig() { @@ -62,11 +65,15 @@ public class ClientConfig { public ClientConfig(ClientConfig config) { serverURI = config.serverURI; + certDatabase = config.certDatabase; + tokenName = config.tokenName; certNickname = config.certNickname; certPassword = config.certPassword; + username = config.username; password = config.password; + messageFormat = config.messageFormat; } @@ -101,6 +108,15 @@ public class ClientConfig { this.certDatabase = certDatabase; } + @XmlElement(name="Token") + public String getTokenName() { + return tokenName; + } + + public void setTokenName(String tokenName) { + this.tokenName = tokenName; + } + @XmlElement(name="CertNickname") public String getCertNickname() { return certNickname; @@ -156,6 +172,7 @@ public class ClientConfig { result = prime * result + ((messageFormat == null) ? 0 : messageFormat.hashCode()); result = prime * result + ((password == null) ? 0 : password.hashCode()); result = prime * result + ((serverURI == null) ? 0 : serverURI.hashCode()); + result = prime * result + ((tokenName == null) ? 0 : tokenName.hashCode()); result = prime * result + ((username == null) ? 0 : username.hashCode()); return result; } @@ -199,6 +216,11 @@ public class ClientConfig { return false; } else if (!serverURI.equals(other.serverURI)) return false; + if (tokenName == null) { + if (other.tokenName != null) + return false; + } else if (!tokenName.equals(other.tokenName)) + return false; if (username == null) { if (other.username != null) return false; |