]> WPIA git - gigi.git/commitdiff
upd: removes ToS check from certificate generation
authorINOPIAE <m.maengel@inopiae.de>
Sat, 9 Jul 2016 18:25:30 +0000 (20:25 +0200)
committerFelix Dörre <felix@dogcraft.de>
Sun, 10 Jul 2016 10:56:18 +0000 (12:56 +0200)
fixes #73

Change-Id: I97addd9600ef073b9c7d305b2a4a755b332fec91

src/org/cacert/gigi/dbObjects/Certificate.java
src/org/cacert/gigi/pages/account/certs/CertificateIssueForm.java
src/org/cacert/gigi/pages/account/certs/CertificateIssueForm.templ
tests/org/cacert/gigi/pages/account/TestCertificateAdd.java

index 5dfaa5d6a1709ae88727979633fc594b58e7fe86..2e35c33e48a9f8580b8e1db1096a487ba4c5c6f5 100644 (file)
@@ -22,7 +22,6 @@ import org.cacert.gigi.database.GigiResultSet;
 import org.cacert.gigi.output.template.Outputable;
 import org.cacert.gigi.output.template.TranslateCommand;
 import org.cacert.gigi.util.KeyStorage;
-import org.cacert.gigi.util.Notary;
 
 public class Certificate implements IdCachable {
 
@@ -287,7 +286,6 @@ public class Certificate implements IdCachable {
         if (getStatus() != CertificateStatus.DRAFT) {
             throw new IllegalStateException();
         }
-        Notary.writeUserAgreement(actor, "ToS", "certificate issuance", "", true, 0);
 
         return Job.sign(this, start, period);
 
index a3e4b80fc91616b3460c811193899b234286bbe9..672b28f9a03501eca9fc1a5df80cf57278ada5d4 100644 (file)
@@ -79,9 +79,7 @@ public class CertificateIssueForm extends Form {
                     } catch (GigiApiException e) {
                         error.mergeInto(e);
                     }
-                    if (req.getParameter("tos_agree") == null) {
-                        error.mergeInto(new GigiApiException("You need to accept the ToS."));
-                    }
+
                     Certificate result = null;
                     try {
                         result = cr.draft();
@@ -132,7 +130,6 @@ public class CertificateIssueForm extends Form {
     @Override
     protected void outputContent(PrintWriter out, Language l, Map<String, Object> vars) {
         HashMap<String, Object> vars2 = new HashMap<String, Object>(vars);
-        vars2.put("ToS", "<a href='/policy/TermsOfService.html'>ToS</a>");
 
         StringBuffer content = new StringBuffer();
         for (SubjectAlternateName SAN : cr.getSANs()) {
index e1404ce56b69209882fdcada6f2355daa8ddbfcf..0bc3d1c2764c7a36a95d0659474b3a80f1cfb8a2 100644 (file)
     <td>
         <?=$validity?>(<?=_start: "now" or YYYY-MM-DD date, end: e.g. 2y, 6m or YYYY-MM-DD date?>)
     </td>
-  </tr>
-    <tr>
-    <td class='check'>
-      <input type="checkbox" id="tos_agree" name="tos_agree" />
-    </td>
-    <td align="left">
-      <label for="tos_agree"><strong><?=_I accept the Terms of Service ($!{ToS}).?> </strong><br />
-      <?=_Please note: You need to accept the ToS to proceed.?></label>
-    </td>
   </tr>
   <tr><td colspan='2'>&nbsp;</td></tr>
 
index 2a1555f7adc0b34bb2b7278e709d3ee349f5cae8..5aebe2d87698d1fdc769f61b34075805c23a64a1 100644 (file)
@@ -139,7 +139,7 @@ public class TestCertificateAdd extends ClientTest {
         OutputStream out = huc.getOutputStream();
         out.write(("csrf=" + URLEncoder.encode(csrf, "UTF-8")).getBytes("UTF-8"));
         out.write(("&CN=CAcert+WoT+User&profile=client&SANs=" + URLEncoder.encode("email:" + email + "\n", "UTF-8")).getBytes("UTF-8"));
-        out.write(("&hash_alg=SHA512&tos_agree=y").getBytes("UTF-8"));
+        out.write(("&hash_alg=SHA512").getBytes("UTF-8"));
         URLConnection uc = authenticate(new URL(huc.getHeaderField("Location") + ".crt"));
         String crt = IOUtils.readURL(new InputStreamReader(uc.getInputStream(), "UTF-8"));
 
@@ -262,7 +262,7 @@ public class TestCertificateAdd extends ClientTest {
         OutputStream out = huc.getOutputStream();
         out.write(("csrf=" + URLEncoder.encode(csrf, "UTF-8")).getBytes("UTF-8"));
         out.write(("&profile=client&CN=" + CertificateRequest.DEFAULT_CN + "&SANs=" + URLEncoder.encode("email:" + email + "\n", "UTF-8")).getBytes("UTF-8"));
-        out.write(("&hash_alg=SHA512&tos_agree=y&").getBytes("UTF-8"));
+        out.write(("&hash_alg=SHA512&").getBytes("UTF-8"));
         out.write(validity.getBytes("UTF-8"));
 
         String certurl = huc.getHeaderField("Location");