]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/pages/account/domain/PingConfigForm.java
upd: removes ToS check from certificate generation
[gigi.git] / src / org / cacert / gigi / pages / account / domain / PingConfigForm.java
index 9e8c0b027957bf8269c8c321295f5ddcff5cc2fe..1810b7ae0543b0249e161116840058f40f449f9c 100644 (file)
@@ -87,9 +87,11 @@ public class PingConfigForm extends Form {
             case SSL: {
                 doSSL = true;
                 String[] parts = dpc.getInfo().split(":");
-                ports[portpos] = Integer.parseInt(parts[0]);
-                if (parts.length == 2) {
-                    sslTypes[portpos] = SSLType.valueOf(parts[1].toUpperCase());
+                tokenName = parts[0];
+                tokenValue = parts[1];
+                ports[portpos] = Integer.parseInt(parts[2]);
+                if (parts.length == 4) {
+                    sslTypes[portpos] = SSLType.valueOf(parts[3].toUpperCase());
                 } else {
                     sslTypes[portpos] = SSLType.DIRECT;
                 }
@@ -106,6 +108,7 @@ public class PingConfigForm extends Form {
 
     @Override
     public boolean submit(PrintWriter out, HttpServletRequest req) throws GigiApiException {
+        target.clearPings();
         if (req.getParameter("emailType") != null && req.getParameter("email") != null) {
             try {
                 String mail = AUTHORATIVE_EMAILS[Integer.parseInt(req.getParameter("email"))];
@@ -130,9 +133,9 @@ public class PingConfigForm extends Form {
                 }
                 int portInt = Integer.parseInt(port);
                 if ("direct".equals(type)) {
-                    target.addPing(DomainPingType.SSL, port);
+                    target.addPing(DomainPingType.SSL, tokenName + ":" + tokenValue + ":" + port);
                 } else if (types.contains(type)) {
-                    target.addPing(DomainPingType.SSL, portInt + ":" + type);
+                    target.addPing(DomainPingType.SSL, tokenName + ":" + tokenValue + ":" + portInt + ":" + type);
                 }
 
             }