]> WPIA git - gigi.git/commitdiff
ToS: replacement of CCA/ToS in certs/CertificateIssueForm
authorINOPIAE <m.maengel@inopiae.de>
Mon, 16 May 2016 17:56:46 +0000 (19:56 +0200)
committerFelix Dörre <felix@dogcraft.de>
Thu, 9 Jun 2016 07:42:44 +0000 (09:42 +0200)
Change-Id: I6b2eaf11213ae57b213be4d5edb9624ecc839f76

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 79b7ae7f8aeb1b73ff36604eb32c7e691c32c5d1..5dfaa5d6a1709ae88727979633fc594b58e7fe86 100644 (file)
@@ -287,7 +287,7 @@ public class Certificate implements IdCachable {
         if (getStatus() != CertificateStatus.DRAFT) {
             throw new IllegalStateException();
         }
-        Notary.writeUserAgreement(actor, "CCA", "issue certificate", "", true, 0);
+        Notary.writeUserAgreement(actor, "ToS", "certificate issuance", "", true, 0);
 
         return Job.sign(this, start, period);
 
index 7774fd814ea8007b619df1c67d9c75216aff0232..a3e4b80fc91616b3460c811193899b234286bbe9 100644 (file)
@@ -79,8 +79,8 @@ public class CertificateIssueForm extends Form {
                     } catch (GigiApiException e) {
                         error.mergeInto(e);
                     }
-                    if (req.getParameter("CCA") == null) {
-                        error.mergeInto(new GigiApiException("You need to accept the CCA."));
+                    if (req.getParameter("tos_agree") == null) {
+                        error.mergeInto(new GigiApiException("You need to accept the ToS."));
                     }
                     Certificate result = null;
                     try {
@@ -132,7 +132,7 @@ 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("CCA", "<a href='/policy/CAcertCommunityAgreement.html'>CCA</a>");
+        vars2.put("ToS", "<a href='/policy/TermsOfService.html'>ToS</a>");
 
         StringBuffer content = new StringBuffer();
         for (SubjectAlternateName SAN : cr.getSANs()) {
index 0d807dec682fcf38f9f7c8d08a816cb3923ca447..7b64dc72c12ddec25ad032010b8d9d5b899a60f1 100644 (file)
   </tr>
     <tr>
     <td class='check'>
-      <input type="checkbox" id="CCA" name="CCA" />
+      <input type="checkbox" id="tos_agree" name="tos_agree" />
     </td>
     <td align="left">
-      <label for="CCA"><strong><?=_I accept the SomeCA Community Agreement ($!{CCA}).?> </strong><br />
-      <?=_Please note: You need to accept the CCA to proceed.?></label>
+      <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 97bc69c3c1d9e91f339c78d378cf1949178bf8b4..401d883826b51272c3467b401d1c152fbc3fceaa 100644 (file)
@@ -132,7 +132,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&CCA=y").getBytes("UTF-8"));
+        out.write(("&hash_alg=SHA512&tos_agree=y").getBytes("UTF-8"));
         URLConnection uc = authenticate(new URL(huc.getHeaderField("Location") + ".crt"));
         String crt = IOUtils.readURL(new InputStreamReader(uc.getInputStream(), "UTF-8"));
 
@@ -255,7 +255,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&CCA=y&").getBytes("UTF-8"));
+        out.write(("&hash_alg=SHA512&tos_agree=y&").getBytes("UTF-8"));
         out.write(validity.getBytes("UTF-8"));
 
         String certurl = huc.getHeaderField("Location");