]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/ping/TestSSL.java
ADD: Verify, only act on POST (+CSRF)
[gigi.git] / tests / org / cacert / gigi / ping / TestSSL.java
index 71ee55ebd64659757f53be836f8cbbfe32a0c611..fccd97ebab28031bcd1d6d58da56cce40c8c0fba 100644 (file)
@@ -121,8 +121,7 @@ public class TestSSL extends PingTest {
 
         TestMail mail = getMailReciever().recieve();
         if (emailVariant == 0) {
-            String link = mail.extractLink();
-            new URL(link).openConnection().getHeaderField("");
+            mail.verify();
         }
         waitForPings(3);
 
@@ -139,7 +138,7 @@ public class TestSSL extends PingTest {
     private void createCertificate(String test, CertificateProfile profile) throws GeneralSecurityException, IOException, SQLException, InterruptedException, GigiApiException {
         kp = generateKeypair();
         String csr = generatePEMCSR(kp, "CN=" + test);
-        c = new Certificate(User.getById(userid), "/CN=" + test, "sha256", csr, CSRType.CSR, profile);
+        c = new Certificate(User.getById(id), Certificate.buildDN("CN", test), "sha256", csr, CSRType.CSR, profile);
         c.issue(null, "2y").waitFor(60000);
     }