diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2013-02-01 14:31:15 -0500 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2013-02-04 18:47:02 -0500 |
commit | 3e0df521290e8159e36d1bdef52df297f20a809d (patch) | |
tree | 23e45d68f72567162496081b590b314ed3aea94c /base/common/src/com/netscape/cms/servlet | |
parent | 6259ba064f4c17b7f6891fcb61501103348936be (diff) | |
download | pki-3e0df521290e8159e36d1bdef52df297f20a809d.tar.gz pki-3e0df521290e8159e36d1bdef52df297f20a809d.tar.xz pki-3e0df521290e8159e36d1bdef52df297f20a809d.zip |
Fixed getInstallToken() invocation.
The configuration code has been modified to use the REST interface
to get the installation token and ignore CA cert validation errors.
Ticket #476
Diffstat (limited to 'base/common/src/com/netscape/cms/servlet')
-rw-r--r-- | base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java b/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java index a7ec566ce..f8869fc06 100644 --- a/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java +++ b/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java @@ -314,17 +314,19 @@ public class ConfigurationUtils { public static String getInstallToken(String sdhost, int sdport, String user, String passwd) throws Exception { IConfigStore cs = CMS.getConfigStore(); - boolean oldtoken = cs.getBoolean("cs.useOldTokenInterface", true); + boolean oldtoken = cs.getBoolean("cs.useOldTokenInterface", false); if (oldtoken) { return ConfigurationUtils.getOldToken(sdhost, sdport, user, passwd); } + String csType = cs.getString("cs.type"); ClientConfig config = new ClientConfig(); config.setServerURI("https://" + sdhost + ":" + sdport + "/ca"); config.setUsername(user); config.setPassword(passwd); + config.setInstanceCreationMode(true); PKIConnection connection = new PKIConnection(config); AccountClient accountClient = new AccountClient(connection); |