summaryrefslogtreecommitdiffstats
path: root/pki/base/silent/src
diff options
context:
space:
mode:
authorvakwetu <vakwetu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2010-10-05 20:50:00 +0000
committervakwetu <vakwetu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2010-10-05 20:50:00 +0000
commit31c9a52ec74f4edf26e152e99d591ebf1992375e (patch)
treed7ecd02a85191bf59a3deb8b4f4cbd4dd589b20e /pki/base/silent/src
parent4e5a8a92afa24ea23e572bbe539d00c007238492 (diff)
downloadpki-31c9a52ec74f4edf26e152e99d591ebf1992375e.tar.gz
pki-31c9a52ec74f4edf26e152e99d591ebf1992375e.tar.xz
pki-31c9a52ec74f4edf26e152e99d591ebf1992375e.zip
Bugzilla BZ640091 pkisilent panels need to match with changed java subsystems
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1333 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/silent/src')
-rw-r--r--pki/base/silent/src/ca/ConfigureCA.java145
-rw-r--r--pki/base/silent/src/drm/ConfigureDRM.java142
-rw-r--r--pki/base/silent/src/ocsp/ConfigureOCSP.java142
-rw-r--r--pki/base/silent/src/subca/ConfigureSubCA.java147
-rw-r--r--pki/base/silent/src/tks/ConfigureTKS.java142
5 files changed, 359 insertions, 359 deletions
diff --git a/pki/base/silent/src/ca/ConfigureCA.java b/pki/base/silent/src/ca/ConfigureCA.java
index 226ff9df9..e3a92dd88 100644
--- a/pki/base/silent/src/ca/ConfigureCA.java
+++ b/pki/base/silent/src/ca/ConfigureCA.java
@@ -211,6 +211,53 @@ public class ConfigureCA {
}
}
+ public boolean TokenChoicePanel() {
+ try {
+ boolean st = false;
+ HTTPResponse hr = null;
+ ByteArrayInputStream bais = null;
+ ParseXML px = new ParseXML();
+
+ String query_string = null;
+
+ // Software Token
+ if (token_name.equalsIgnoreCase("internal")) {
+ query_string = "p=1" + "&op=next" + "&xml=true" + "&choice="
+ + URLEncoder.encode("Internal Key Storage Token") + "";
+ hr = hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
+ // parse xml
+ bais = new ByteArrayInputStream(hr.getHTML().getBytes());
+ px.parse(bais);
+ px.prettyprintxml();
+ } // HSM
+ else {
+ // login to hsm first
+ query_string = "p=2" + "&op=next" + "&xml=true" + "&uTokName="
+ + URLEncoder.encode(token_name) + "&__uPasswd="
+ + URLEncoder.encode(token_pwd) + "";
+ hr = hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
+ // parse xml
+ bais = new ByteArrayInputStream(hr.getHTML().getBytes());
+ px.parse(bais);
+ px.prettyprintxml();
+
+ // choice with token name now
+ query_string = "p=1" + "&op=next" + "&xml=true" + "&choice="
+ + URLEncoder.encode(token_name) + "";
+ hr = hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
+ // parse xml
+ bais = new ByteArrayInputStream(hr.getHTML().getBytes());
+ px.parse(bais);
+ px.prettyprintxml();
+ }
+ return true;
+ } catch (Exception e) {
+ System.out.println("Exception in TokenChoicePanel(): " + e.toString());
+ e.printStackTrace();
+ return false;
+ }
+ }
+
public boolean DomainPanel() {
try {
HTTPResponse hr = null;
@@ -223,12 +270,12 @@ public class ConfigureCA {
if (! clone) {
query_string = "sdomainURL=" + URLEncoder.encode(domain_url)
+ "&sdomainName=" + URLEncoder.encode(domain_name)
- + "&choice=newdomain" + "&p=1" + "&op=next" + "&xml=true";
+ + "&choice=newdomain" + "&p=3" + "&op=next" + "&xml=true";
} else {
domain_url = "https://" + sd_hostname + ":" + sd_admin_port ;
query_string = "sdomainURL=" + URLEncoder.encode(domain_url)
+ "&sdomainName="
- + "&choice=existingdomain" + "&p=1" + "&op=next" + "&xml=true";
+ + "&choice=existingdomain" + "&p=3" + "&op=next" + "&xml=true";
}
hr = hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
@@ -253,7 +300,7 @@ public class ConfigureCA {
public boolean DisplayCertChainPanel() {
try {
HTTPResponse hr = null;
- String query_string = "p=2" + "&op=next" + "&xml=true";
+ String query_string = "p=4" + "&op=next" + "&xml=true";
hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
return true;
} catch (Exception e) {
@@ -270,7 +317,7 @@ public class ConfigureCA {
ByteArrayInputStream bais = null;
ParseXML px = new ParseXML();
String subca_url = "https://" + cs_hostname + ":" + cs_port +
- "/ca/admin/console/config/wizard" + "?p=3&subsystem=CA" ;
+ "/ca/admin/console/config/wizard" + "?p=5&subsystem=CA" ;
String query_string = "url=" + URLEncoder.encode(subca_url);
@@ -292,7 +339,7 @@ public class ConfigureCA {
// use session id to connect back to subCA
- String query_string_2 = "p=3" + "&subsystem=CA" +
+ String query_string_2 = "p=5" + "&subsystem=CA" +
"&session_id=" + subca_session_id + "&xml=true" ;
hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri, query_string_2);
@@ -322,11 +369,11 @@ public class ConfigureCA {
String query_string = null;
if (!clone) {
- query_string = "p=3" + "&op=next" + "&xml=true"
+ query_string = "p=5" + "&op=next" + "&xml=true"
+ "&choice=newsubsystem" + "&subsystemName="
+ URLEncoder.encode(subsystem_name);
} else {
- query_string = "p=3" + "&op=next" + "&xml=true"
+ query_string = "p=5" + "&op=next" + "&xml=true"
+ "&choice=clonesubsystem" + "&subsystemName="
+ URLEncoder.encode(subsystem_name)
+ "&urls=" + urls + "";
@@ -342,7 +389,7 @@ public class ConfigureCA {
if (clone) {
hr = null;
- query_string = "p=4" + "&op=next" + "&xml=true";
+ query_string = "p=6" + "&op=next" + "&xml=true";
hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
// parse xml
@@ -365,7 +412,7 @@ public class ConfigureCA {
HTTPResponse hr = null;
ParseXML px = new ParseXML();
- String query_string = "p=5" + "&op=next" + "&xml=true"
+ String query_string = "p=7" + "&op=next" + "&xml=true"
+ "&__password=" + URLEncoder.encode(clone_p12_passwd)
+ "&path=" + URLEncoder.encode(clone_p12_file) + "";
@@ -391,7 +438,7 @@ public class ConfigureCA {
ByteArrayInputStream bais = null;
ParseXML px = new ParseXML();
- String query_string = "p=6" + "&op=next" + "&xml=true" ;
+ String query_string = "p=8" + "&op=next" + "&xml=true" ;
if (external_ca.equalsIgnoreCase("true"))
query_string += "&choice=join";
else
@@ -431,7 +478,7 @@ public class ConfigureCA {
ByteArrayInputStream bais = null;
ParseXML px = new ParseXML();
- String query_string = "p=7" + "&op=next" + "&xml=true" + "&host="
+ String query_string = "p=9" + "&op=next" + "&xml=true" + "&host="
+ URLEncoder.encode(ldap_host) + "&port="
+ URLEncoder.encode(ldap_port) + "&binddn="
+ URLEncoder.encode(bind_dn) + "&__bindpwd="
@@ -455,53 +502,6 @@ public class ConfigureCA {
}
}
- public boolean TokenChoicePanel() {
- try {
- boolean st = false;
- HTTPResponse hr = null;
- ByteArrayInputStream bais = null;
- ParseXML px = new ParseXML();
-
- String query_string = null;
-
- // Software Token
- if (token_name.equalsIgnoreCase("internal")) {
- query_string = "p=8" + "&op=next" + "&xml=true" + "&choice="
- + URLEncoder.encode("Internal Key Storage Token") + "";
- hr = hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
- // parse xml
- bais = new ByteArrayInputStream(hr.getHTML().getBytes());
- px.parse(bais);
- px.prettyprintxml();
- } // HSM
- else {
- // login to hsm first
- query_string = "p=9" + "&op=next" + "&xml=true" + "&uTokName="
- + URLEncoder.encode(token_name) + "&__uPasswd="
- + URLEncoder.encode(token_pwd) + "";
- hr = hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
- // parse xml
- bais = new ByteArrayInputStream(hr.getHTML().getBytes());
- px.parse(bais);
- px.prettyprintxml();
-
- // choice with token name now
- query_string = "p=8" + "&op=next" + "&xml=true" + "&choice="
- + URLEncoder.encode(token_name) + "";
- hr = hc.sslConnect(cs_hostname, cs_port, wizard_uri, query_string);
- // parse xml
- bais = new ByteArrayInputStream(hr.getHTML().getBytes());
- px.parse(bais);
- px.prettyprintxml();
- }
- return true;
- } catch (Exception e) {
- System.out.println("Exception in TokenChoicePanel(): " + e.toString());
- e.printStackTrace();
- return false;
- }
- }
-
public boolean KeyPanel() {
try {
boolean st = false;
@@ -1170,7 +1170,16 @@ public class ConfigureCA {
}
sleep_time();
- // 2. domain panel
+ // 2. Token Choice Panel
+ boolean disp_token = TokenChoicePanel();
+
+ if (!disp_token) {
+ System.out.println("ERROR: ConfigureCA: TokenChoicePanel() failure");
+ return false;
+ }
+ sleep_time();
+
+ // 3. domain panel
boolean dom_st = DomainPanel();
if (!dom_st) {
@@ -1179,7 +1188,7 @@ public class ConfigureCA {
}
sleep_time();
- // 3. display cert chain panel and security domain login
+ // 4. display cert chain panel and security domain login
if (clone) {
boolean disp_st = DisplayCertChainPanel();
if(!disp_st) {
@@ -1197,7 +1206,7 @@ public class ConfigureCA {
}
sleep_time();
- // 4. display create CA panel
+ // 5. display create CA panel
boolean disp_cert = CreateCAPanel();
if (!disp_cert) {
@@ -1206,7 +1215,7 @@ public class ConfigureCA {
}
sleep_time();
- // 5. display restore key cert panel
+ // 6. display restore key cert panel
if (clone) {
boolean restore_st = RestoreKeyCertPanel();
if (!restore_st) {
@@ -1224,7 +1233,7 @@ public class ConfigureCA {
// }
sleep_time();
- // 5. hierarchy panel
+ // 7. hierarchy panel
if (! clone) {
boolean disp_h = HierarchyPanel();
@@ -1243,7 +1252,7 @@ public class ConfigureCA {
// }
sleep_time();
- // 7. ldap connection panel
+ // 8. ldap connection panel
boolean disp_ldap = LdapConnectionPanel();
if (!disp_ldap) {
@@ -1253,14 +1262,6 @@ public class ConfigureCA {
}
sleep_time();
- // 8. Token Choice Panel
- boolean disp_token = TokenChoicePanel();
-
- if (!disp_token) {
- System.out.println("ERROR: ConfigureCA: TokenChoicePanel() failure");
- return false;
- }
-
sleep_time();
// 9. Key Panel
boolean disp_key = KeyPanel();
diff --git a/pki/base/silent/src/drm/ConfigureDRM.java b/pki/base/silent/src/drm/ConfigureDRM.java
index 7c82aeb47..fd2b37d29 100644
--- a/pki/base/silent/src/drm/ConfigureDRM.java
+++ b/pki/base/silent/src/drm/ConfigureDRM.java
@@ -201,6 +201,60 @@ public class ConfigureDRM
return st;
}
+ public boolean TokenChoicePanel()
+ {
+ boolean st = false;
+ HTTPResponse hr = null;
+ ByteArrayInputStream bais = null;
+ ParseXML px = new ParseXML();
+
+ String query_string = null;
+
+ // Software Token
+ if(token_name.equalsIgnoreCase("internal"))
+ {
+ query_string = "p=1" + "&op=next" + "&xml=true" +
+ "&choice=" +
+ URLEncoder.encode("Internal Key Storage Token") +
+ "";
+ hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
+ // parse xml
+ bais = new ByteArrayInputStream(hr.getHTML().getBytes());
+ px.parse(bais);
+ px.prettyprintxml();
+ }
+ // HSM
+ else
+ {
+ // login to hsm first
+ query_string = "p=2" + "&op=next" + "&xml=true" +
+ "&uTokName=" +
+ URLEncoder.encode(token_name) +
+ "&__uPasswd=" +
+ URLEncoder.encode(token_pwd) +
+ "";
+ hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
+ // parse xml
+ bais = new ByteArrayInputStream(hr.getHTML().getBytes());
+ px.parse(bais);
+ px.prettyprintxml();
+
+ // choice with token name now
+ query_string = "p=1" + "&op=next" + "&xml=true" +
+ "&choice=" +
+ URLEncoder.encode(token_name) +
+ "";
+ hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
+ // parse xml
+ bais = new ByteArrayInputStream(hr.getHTML().getBytes());
+ px.parse(bais);
+ px.prettyprintxml();
+
+ }
+
+ return true;
+ }
+
public boolean DomainPanel()
{
boolean st = false;
@@ -214,7 +268,7 @@ public class ConfigureDRM
String query_string = "sdomainURL=" +
URLEncoder.encode(domain_url) +
"&choice=existingdomain"+
- "&p=1" +
+ "&p=3" +
"&op=next" +
"&xml=true";
@@ -237,7 +291,7 @@ public class ConfigureDRM
ParseXML px = new ParseXML();
String query_string = null;
- query_string = "p=2" + "&op=next" + "&xml=true";
+ query_string = "p=4" + "&op=next" + "&xml=true";
hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
// parse xml
// bais = new ByteArrayInputStream(hr.getHTML().getBytes());
@@ -258,7 +312,7 @@ public class ConfigureDRM
String kra_url = "https://" + cs_hostname + ":" + cs_port +
"/kra/admin/console/config/wizard" +
- "?p=3&subsystem=KRA" ;
+ "?p=5&subsystem=KRA" ;
String query_string = "url=" + URLEncoder.encode(kra_url);
@@ -281,7 +335,7 @@ public class ConfigureDRM
// use session id to connect back to KRA
- String query_string_2 = "p=3" +
+ String query_string_2 = "p=5" +
"&subsystem=KRA" +
"&session_id=" + kra_session_id +
"&xml=true" ;
@@ -305,7 +359,7 @@ public class ConfigureDRM
ByteArrayInputStream bais = null;
ParseXML px = new ParseXML();
- String query_string = "p=3" + "&op=next" + "&xml=true" +
+ String query_string = "p=5" + "&op=next" + "&xml=true" +
"&subsystemName=" +
URLEncoder.encode(subsystem_name) +
"&choice=newsubsystem" ;
@@ -327,7 +381,7 @@ public class ConfigureDRM
ParseXML px = new ParseXML();
- String query_string = "p=5" + "&op=next" + "&xml=true" +
+ String query_string = "p=7" + "&op=next" + "&xml=true" +
"&host=" + URLEncoder.encode(ldap_host) +
"&port=" + URLEncoder.encode(ldap_port) +
"&binddn=" + URLEncoder.encode(bind_dn) +
@@ -347,60 +401,6 @@ public class ConfigureDRM
return true;
}
- public boolean TokenChoicePanel()
- {
- boolean st = false;
- HTTPResponse hr = null;
- ByteArrayInputStream bais = null;
- ParseXML px = new ParseXML();
-
- String query_string = null;
-
- // Software Token
- if(token_name.equalsIgnoreCase("internal"))
- {
- query_string = "p=6" + "&op=next" + "&xml=true" +
- "&choice=" +
- URLEncoder.encode("Internal Key Storage Token") +
- "";
- hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
- // parse xml
- bais = new ByteArrayInputStream(hr.getHTML().getBytes());
- px.parse(bais);
- px.prettyprintxml();
- }
- // HSM
- else
- {
- // login to hsm first
- query_string = "p=7" + "&op=next" + "&xml=true" +
- "&uTokName=" +
- URLEncoder.encode(token_name) +
- "&__uPasswd=" +
- URLEncoder.encode(token_pwd) +
- "";
- hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
- // parse xml
- bais = new ByteArrayInputStream(hr.getHTML().getBytes());
- px.parse(bais);
- px.prettyprintxml();
-
- // choice with token name now
- query_string = "p=6" + "&op=next" + "&xml=true" +
- "&choice=" +
- URLEncoder.encode(token_name) +
- "";
- hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
- // parse xml
- bais = new ByteArrayInputStream(hr.getHTML().getBytes());
- px.parse(bais);
- px.prettyprintxml();
-
- }
-
- return true;
- }
-
public boolean KeyPanel()
{
boolean st = false;
@@ -829,7 +829,16 @@ public class ConfigureDRM
}
sleep_time();
- // 2. domain panel
+ // 2. Token Choice Panel
+ boolean disp_token = TokenChoicePanel();
+ if(!disp_token)
+ {
+ System.out.println("ERROR: ConfigureDRM: TokenChoicePanel() failure");
+ return false;
+ }
+
+ sleep_time();
+ // 3. domain panel
boolean dom_st = DomainPanel();
if(!dom_st)
{
@@ -838,7 +847,7 @@ public class ConfigureDRM
}
sleep_time();
- // 3. display cert chain panel
+ // 4. display cert chain panel
boolean disp_st = DisplayChainPanel();
if(!disp_st)
{
@@ -875,15 +884,6 @@ public class ConfigureDRM
sleep_time();
sleep_time();
- // 8. Token Choice Panel
- boolean disp_token = TokenChoicePanel();
- if(!disp_token)
- {
- System.out.println("ERROR: ConfigureDRM: TokenChoicePanel() failure");
- return false;
- }
-
- sleep_time();
// 9. Key Panel
boolean disp_key = KeyPanel();
if(!disp_key)
diff --git a/pki/base/silent/src/ocsp/ConfigureOCSP.java b/pki/base/silent/src/ocsp/ConfigureOCSP.java
index 707d66995..dc05d8a67 100644
--- a/pki/base/silent/src/ocsp/ConfigureOCSP.java
+++ b/pki/base/silent/src/ocsp/ConfigureOCSP.java
@@ -193,6 +193,59 @@ public class ConfigureOCSP
return st;
}
+ public boolean TokenChoicePanel()
+ {
+ boolean st = false;
+ HTTPResponse hr = null;
+ ByteArrayInputStream bais = null;
+ ParseXML px = new ParseXML();
+
+ String query_string = null;
+
+ // Software Token
+ if(token_name.equalsIgnoreCase("internal"))
+ {
+ query_string = "p=1" + "&op=next" + "&xml=true" +
+ "&choice=" +
+ URLEncoder.encode("Internal Key Storage Token") +
+ "";
+ hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
+ // parse xml
+ bais = new ByteArrayInputStream(hr.getHTML().getBytes());
+ px.parse(bais);
+ px.prettyprintxml();
+ }
+ // HSM
+ else
+ {
+ // login to hsm first
+ query_string = "p=2" + "&op=next" + "&xml=true" +
+ "&uTokName=" +
+ URLEncoder.encode(token_name) +
+ "&__uPasswd=" +
+ URLEncoder.encode(token_pwd) +
+ "";
+ hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
+ // parse xml
+ bais = new ByteArrayInputStream(hr.getHTML().getBytes());
+ px.parse(bais);
+ px.prettyprintxml();
+
+ // choice with token name now
+ query_string = "p=1" + "&op=next" + "&xml=true" +
+ "&choice=" +
+ URLEncoder.encode(token_name) +
+ "";
+ hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
+ // parse xml
+ bais = new ByteArrayInputStream(hr.getHTML().getBytes());
+ px.parse(bais);
+ px.prettyprintxml();
+
+ }
+ return true;
+ }
+
public boolean DomainPanel()
{
boolean st = false;
@@ -206,7 +259,7 @@ public class ConfigureOCSP
String query_string = "sdomainURL=" +
URLEncoder.encode(domain_url) +
"&choice=existingdomain"+
- "&p=1" +
+ "&p=3" +
"&op=next" +
"&xml=true";
@@ -229,7 +282,7 @@ public class ConfigureOCSP
ParseXML px = new ParseXML();
String query_string = null;
- query_string = "p=2" + "&op=next" + "&xml=true";
+ query_string = "p=4" + "&op=next" + "&xml=true";
hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
// parse xml
// bais = new ByteArrayInputStream(hr.getHTML().getBytes());
@@ -250,7 +303,7 @@ public class ConfigureOCSP
String ocsp_url = "https://" + cs_hostname + ":" + cs_port +
"/ocsp/admin/console/config/wizard" +
- "?p=3&subsystem=OCSP" ;
+ "?p=5&subsystem=OCSP" ;
String query_string = "url=" + URLEncoder.encode(ocsp_url);
@@ -273,7 +326,7 @@ public class ConfigureOCSP
// use session id to connect back to OCSP
- String query_string_2 = "p=3" +
+ String query_string_2 = "p=5" +
"&subsystem=OCSP" +
"&session_id=" + ocsp_session_id +
"&xml=true" ;
@@ -297,7 +350,7 @@ public class ConfigureOCSP
ByteArrayInputStream bais = null;
ParseXML px = new ParseXML();
- String query_string = "p=3" + "&op=next" + "&xml=true" +
+ String query_string = "p=5" + "&op=next" + "&xml=true" +
"&subsystemName=" +
URLEncoder.encode(subsystem_name) +
"&choice=newsubsystem" ;
@@ -319,7 +372,7 @@ public class ConfigureOCSP
ParseXML px = new ParseXML();
- String query_string = "p=5" + "&op=next" + "&xml=true" +
+ String query_string = "p=7" + "&op=next" + "&xml=true" +
"&host=" + URLEncoder.encode(ldap_host) +
"&port=" + URLEncoder.encode(ldap_port) +
"&binddn=" + URLEncoder.encode(bind_dn) +
@@ -339,61 +392,6 @@ public class ConfigureOCSP
return true;
}
- public boolean TokenChoicePanel()
- {
- boolean st = false;
- HTTPResponse hr = null;
- ByteArrayInputStream bais = null;
- ParseXML px = new ParseXML();
-
- String query_string = null;
-
- // Software Token
- if(token_name.equalsIgnoreCase("internal"))
- {
- query_string = "p=6" + "&op=next" + "&xml=true" +
- "&choice=" +
- URLEncoder.encode("Internal Key Storage Token") +
- "";
- hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
- // parse xml
- bais = new ByteArrayInputStream(hr.getHTML().getBytes());
- px.parse(bais);
- px.prettyprintxml();
- }
- // HSM
- else
- {
- // login to hsm first
- query_string = "p=7" + "&op=next" + "&xml=true" +
- "&uTokName=" +
- URLEncoder.encode(token_name) +
- "&__uPasswd=" +
- URLEncoder.encode(token_pwd) +
- "";
- hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
- // parse xml
- bais = new ByteArrayInputStream(hr.getHTML().getBytes());
- px.parse(bais);
- px.prettyprintxml();
-
- // choice with token name now
- query_string = "p=6" + "&op=next" + "&xml=true" +
- "&choice=" +
- URLEncoder.encode(token_name) +
- "";
- hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
- // parse xml
- bais = new ByteArrayInputStream(hr.getHTML().getBytes());
- px.parse(bais);
- px.prettyprintxml();
-
- }
-
-
- return true;
- }
-
public boolean KeyPanel()
{
boolean st = false;
@@ -800,7 +798,16 @@ public class ConfigureOCSP
}
sleep_time();
- // 2. domain panel
+ // 2. Token Choice Panel
+ boolean disp_token = TokenChoicePanel();
+ if(!disp_token)
+ {
+ System.out.println("ERROR: ConfigureOCSP: TokenChoicePanel() failure");
+ return false;
+ }
+
+ sleep_time();
+ // 3. domain panel
boolean dom_st = DomainPanel();
if(!dom_st)
{
@@ -809,7 +816,7 @@ public class ConfigureOCSP
}
sleep_time();
- // 3. display cert chain panel
+ // 4. display cert chain panel
boolean disp_st = DisplayChainPanel();
if(!disp_st)
{
@@ -846,15 +853,6 @@ public class ConfigureOCSP
sleep_time();
sleep_time();
- // 8. Token Choice Panel
- boolean disp_token = TokenChoicePanel();
- if(!disp_token)
- {
- System.out.println("ERROR: ConfigureOCSP: TokenChoicePanel() failure");
- return false;
- }
-
- sleep_time();
// 9. Key Panel
boolean disp_key = KeyPanel();
if(!disp_key)
diff --git a/pki/base/silent/src/subca/ConfigureSubCA.java b/pki/base/silent/src/subca/ConfigureSubCA.java
index 25ea43ed5..38e39bf62 100644
--- a/pki/base/silent/src/subca/ConfigureSubCA.java
+++ b/pki/base/silent/src/subca/ConfigureSubCA.java
@@ -199,6 +199,61 @@ public class ConfigureSubCA
return st;
}
+ public boolean TokenChoicePanel()
+ {
+ boolean st = false;
+ HTTPResponse hr = null;
+ ByteArrayInputStream bais = null;
+ ParseXML px = new ParseXML();
+
+ ///////////////////////////////////////////////////////
+ String query_string = null;
+
+ // Software Token
+ if(token_name.equalsIgnoreCase("internal"))
+ {
+ query_string = "p=1" + "&op=next" + "&xml=true" +
+ "&choice=" +
+ URLEncoder.encode("Internal Key Storage Token") +
+ "";
+ hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
+ // parse xml
+ bais = new ByteArrayInputStream(hr.getHTML().getBytes());
+ px.parse(bais);
+ px.prettyprintxml();
+ }
+ // HSM
+ else
+ {
+ // login to hsm first
+ query_string = "p=2" + "&op=next" + "&xml=true" +
+ "&uTokName=" +
+ URLEncoder.encode(token_name) +
+ "&__uPasswd=" +
+ URLEncoder.encode(token_pwd) +
+ "";
+ hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
+ // parse xml
+ bais = new ByteArrayInputStream(hr.getHTML().getBytes());
+ px.parse(bais);
+ px.prettyprintxml();
+
+ // choice with token name now
+ query_string = "p=1" + "&op=next" + "&xml=true" +
+ "&choice=" +
+ URLEncoder.encode(token_name) +
+ "";
+ hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
+ // parse xml
+ bais = new ByteArrayInputStream(hr.getHTML().getBytes());
+ px.parse(bais);
+ px.prettyprintxml();
+
+ }
+
+ return true;
+ }
+
public boolean DomainPanel()
{
boolean st = false;
@@ -214,7 +269,7 @@ public class ConfigureSubCA
"&sdomainName="+
URLEncoder.encode(domain_name) +
"&choice=existingdomain"+
- "&p=1" +
+ "&p=3" +
"&op=next" +
"&xml=true";
@@ -225,7 +280,7 @@ public class ConfigureSubCA
px.parse(bais);
px.prettyprintxml();
- String query_string_1 = "p=2" +
+ String query_string_1 = "p=4" +
"&op=next" +
"&xml=true";
@@ -245,7 +300,7 @@ public class ConfigureSubCA
String subca_url = "https://" + cs_hostname + ":" + cs_port +
"/ca/admin/console/config/wizard" +
- "?p=3&subsystem=CA" ;
+ "?p=5&subsystem=CA" ;
String query_string = "url=" + URLEncoder.encode(subca_url);
@@ -268,7 +323,7 @@ public class ConfigureSubCA
// use session id to connect back to subCA
- String query_string_2 = "p=3" +
+ String query_string_2 = "p=5" +
"&subsystem=CA" +
"&session_id=" + subca_session_id +
"&xml=true" ;
@@ -288,7 +343,7 @@ public class ConfigureSubCA
ParseXML px = new ParseXML();
String query_string = null;
- query_string = "p=3" + "&op=next" + "&xml=true" +
+ query_string = "p=5" + "&op=next" + "&xml=true" +
"&choice=newsubsystem" +
"&subsystemName=" +
URLEncoder.encode(subsystem_name) +
@@ -312,7 +367,7 @@ public class ConfigureSubCA
ParseXML px = new ParseXML();
- String query_string = "p=6" + "&op=next" + "&xml=true" +
+ String query_string = "p=8" + "&op=next" + "&xml=true" +
"&choice=join" ;
hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
@@ -335,7 +390,7 @@ public class ConfigureSubCA
ParseXML px = new ParseXML();
- String query_string = "p=7" + "&op=next" + "&xml=true" +
+ String query_string = "p=9" + "&op=next" + "&xml=true" +
"&host=" + URLEncoder.encode(ldap_host) +
"&port=" + URLEncoder.encode(ldap_port) +
"&basedn=" + URLEncoder.encode(base_dn) +
@@ -355,61 +410,6 @@ public class ConfigureSubCA
return true;
}
- public boolean TokenChoicePanel()
- {
- boolean st = false;
- HTTPResponse hr = null;
- ByteArrayInputStream bais = null;
- ParseXML px = new ParseXML();
-
- ///////////////////////////////////////////////////////
- String query_string = null;
-
- // Software Token
- if(token_name.equalsIgnoreCase("internal"))
- {
- query_string = "p=8" + "&op=next" + "&xml=true" +
- "&choice=" +
- URLEncoder.encode("Internal Key Storage Token") +
- "";
- hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
- // parse xml
- bais = new ByteArrayInputStream(hr.getHTML().getBytes());
- px.parse(bais);
- px.prettyprintxml();
- }
- // HSM
- else
- {
- // login to hsm first
- query_string = "p=9" + "&op=next" + "&xml=true" +
- "&uTokName=" +
- URLEncoder.encode(token_name) +
- "&__uPasswd=" +
- URLEncoder.encode(token_pwd) +
- "";
- hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
- // parse xml
- bais = new ByteArrayInputStream(hr.getHTML().getBytes());
- px.parse(bais);
- px.prettyprintxml();
-
- // choice with token name now
- query_string = "p=8" + "&op=next" + "&xml=true" +
- "&choice=" +
- URLEncoder.encode(token_name) +
- "";
- hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
- // parse xml
- bais = new ByteArrayInputStream(hr.getHTML().getBytes());
- px.parse(bais);
- px.prettyprintxml();
-
- }
-
- return true;
- }
-
public boolean KeyPanel()
{
boolean st = false;
@@ -822,7 +822,16 @@ public class ConfigureSubCA
}
sleep_time();
- // 1. domain panel
+ // 1. Token Choice Panel
+ boolean disp_token = TokenChoicePanel();
+ if(!disp_token)
+ {
+ System.out.println("ERROR: ConfigureSubCA: TokenChoicePanel() failure");
+ return false;
+ }
+
+ sleep_time();
+ // 2. domain panel
boolean dom_st = DomainPanel();
if(!dom_st)
{
@@ -831,7 +840,7 @@ public class ConfigureSubCA
}
sleep_time();
- // 2. domain panel
+ // 3. domain panel
boolean sd_st = SecurityDomainLoginPanel();
if(!sd_st)
{
@@ -840,7 +849,7 @@ public class ConfigureSubCA
}
sleep_time();
- // 3. display cert chain panel
+ // 4. display cert chain panel
boolean disp_st = DisplayChainPanel();
if(!disp_st)
{
@@ -867,14 +876,6 @@ public class ConfigureSubCA
}
sleep_time();
- // 8. Token Choice Panel
- boolean disp_token = TokenChoicePanel();
- if(!disp_token)
- {
- System.out.println("ERROR: ConfigureSubCA: TokenChoicePanel() failure");
- return false;
- }
-
sleep_time();
// 10. Key Panel
boolean disp_key = KeyPanel();
diff --git a/pki/base/silent/src/tks/ConfigureTKS.java b/pki/base/silent/src/tks/ConfigureTKS.java
index 5c7389753..2bf935fee 100644
--- a/pki/base/silent/src/tks/ConfigureTKS.java
+++ b/pki/base/silent/src/tks/ConfigureTKS.java
@@ -186,6 +186,60 @@ public class ConfigureTKS
return st;
}
+ public boolean TokenChoicePanel()
+ {
+ boolean st = false;
+ HTTPResponse hr = null;
+ ByteArrayInputStream bais = null;
+ ParseXML px = new ParseXML();
+
+ String query_string = null;
+
+ // Software Token
+ if(token_name.equalsIgnoreCase("internal"))
+ {
+ query_string = "p=1" + "&op=next" + "&xml=true" +
+ "&choice=" +
+ URLEncoder.encode("Internal Key Storage Token") +
+ "";
+ hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
+ // parse xml
+ bais = new ByteArrayInputStream(hr.getHTML().getBytes());
+ px.parse(bais);
+ px.prettyprintxml();
+ }
+ // HSM
+ else
+ {
+ // login to hsm first
+ query_string = "p=2" + "&op=next" + "&xml=true" +
+ "&uTokName=" +
+ URLEncoder.encode(token_name) +
+ "&__uPasswd=" +
+ URLEncoder.encode(token_pwd) +
+ "";
+ hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
+ // parse xml
+ bais = new ByteArrayInputStream(hr.getHTML().getBytes());
+ px.parse(bais);
+ px.prettyprintxml();
+
+ // choice with token name now
+ query_string = "p=1" + "&op=next" + "&xml=true" +
+ "&choice=" +
+ URLEncoder.encode(token_name) +
+ "";
+ hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
+ // parse xml
+ bais = new ByteArrayInputStream(hr.getHTML().getBytes());
+ px.parse(bais);
+ px.prettyprintxml();
+
+ }
+
+ return true;
+ }
+
public boolean DomainPanel()
{
boolean st = false;
@@ -199,7 +253,7 @@ public class ConfigureTKS
String query_string = "sdomainURL=" +
URLEncoder.encode(domain_url) +
"&choice=existingdomain"+
- "&p=1" +
+ "&p=3" +
"&op=next" +
"&xml=true";
@@ -222,7 +276,7 @@ public class ConfigureTKS
ParseXML px = new ParseXML();
String query_string = null;
- query_string = "p=2" + "&op=next" + "&xml=true";
+ query_string = "p=4" + "&op=next" + "&xml=true";
hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
// parse xml
// bais = new ByteArrayInputStream(hr.getHTML().getBytes());
@@ -243,7 +297,7 @@ public class ConfigureTKS
String tks_url = "https://" + cs_hostname + ":" + cs_port +
"/tks/admin/console/config/wizard" +
- "?p=3&subsystem=TKS" ;
+ "?p=5&subsystem=TKS" ;
String query_string = "url=" + URLEncoder.encode(tks_url);
@@ -266,7 +320,7 @@ public class ConfigureTKS
// use session id to connect back to TKS
- String query_string_2 = "p=3" +
+ String query_string_2 = "p=5" +
"&subsystem=TKS" +
"&session_id=" + tks_session_id +
"&xml=true" ;
@@ -290,7 +344,7 @@ public class ConfigureTKS
ByteArrayInputStream bais = null;
ParseXML px = new ParseXML();
- String query_string = "p=3" + "&op=next" + "&xml=true" +
+ String query_string = "p=5" + "&op=next" + "&xml=true" +
"&subsystemName=" +
URLEncoder.encode(subsystem_name) +
"&choice=newsubsystem" ;
@@ -312,7 +366,7 @@ public class ConfigureTKS
ParseXML px = new ParseXML();
- String query_string = "p=5" + "&op=next" + "&xml=true" +
+ String query_string = "p=7" + "&op=next" + "&xml=true" +
"&host=" + URLEncoder.encode(ldap_host) +
"&port=" + URLEncoder.encode(ldap_port) +
"&binddn=" + URLEncoder.encode(bind_dn) +
@@ -332,60 +386,6 @@ public class ConfigureTKS
return true;
}
- public boolean TokenChoicePanel()
- {
- boolean st = false;
- HTTPResponse hr = null;
- ByteArrayInputStream bais = null;
- ParseXML px = new ParseXML();
-
- String query_string = null;
-
- // Software Token
- if(token_name.equalsIgnoreCase("internal"))
- {
- query_string = "p=6" + "&op=next" + "&xml=true" +
- "&choice=" +
- URLEncoder.encode("Internal Key Storage Token") +
- "";
- hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
- // parse xml
- bais = new ByteArrayInputStream(hr.getHTML().getBytes());
- px.parse(bais);
- px.prettyprintxml();
- }
- // HSM
- else
- {
- // login to hsm first
- query_string = "p=7" + "&op=next" + "&xml=true" +
- "&uTokName=" +
- URLEncoder.encode(token_name) +
- "&__uPasswd=" +
- URLEncoder.encode(token_pwd) +
- "";
- hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
- // parse xml
- bais = new ByteArrayInputStream(hr.getHTML().getBytes());
- px.parse(bais);
- px.prettyprintxml();
-
- // choice with token name now
- query_string = "p=6" + "&op=next" + "&xml=true" +
- "&choice=" +
- URLEncoder.encode(token_name) +
- "";
- hr = hc.sslConnect(cs_hostname,cs_port,wizard_uri,query_string);
- // parse xml
- bais = new ByteArrayInputStream(hr.getHTML().getBytes());
- px.parse(bais);
- px.prettyprintxml();
-
- }
-
- return true;
- }
-
public boolean KeyPanel()
{
boolean st = false;
@@ -775,7 +775,16 @@ public class ConfigureTKS
}
sleep_time();
- // 2. domain panel
+ // 2. Token Choice Panel
+ boolean disp_token = TokenChoicePanel();
+ if(!disp_token)
+ {
+ System.out.println("ERROR: ConfigureTKS: TokenChoicePanel() failure");
+ return false;
+ }
+
+ sleep_time();
+ // 3. domain panel
boolean dom_st = DomainPanel();
if(!dom_st)
{
@@ -784,7 +793,7 @@ public class ConfigureTKS
}
sleep_time();
- // 3. display cert chain panel
+ // 4. display cert chain panel
boolean disp_st = DisplayChainPanel();
if(!disp_st)
{
@@ -821,15 +830,6 @@ public class ConfigureTKS
sleep_time();
sleep_time();
- // 8. Token Choice Panel
- boolean disp_token = TokenChoicePanel();
- if(!disp_token)
- {
- System.out.println("ERROR: ConfigureTKS: TokenChoicePanel() failure");
- return false;
- }
-
- sleep_time();
// 9. Key Panel
boolean disp_key = KeyPanel();
if(!disp_key)