]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/api/IssueCert.java
upd: split certificate issuance as organisation into seperate
[gigi.git] / tests / org / cacert / gigi / api / IssueCert.java
index 74240b26d3a804ac547267ea69e074122b915c68..b49435910655b6572303dacdf812a429c670d29f 100644 (file)
@@ -28,9 +28,9 @@ public class IssueCert extends ClientTest {
     public void testIssueCert() throws Exception {
         KeyPair kp = generateKeypair();
         String key1 = generatePEMCSR(kp, "EMAIL=testmail@example.com");
     public void testIssueCert() throws Exception {
         KeyPair kp = generateKeypair();
         String key1 = generatePEMCSR(kp, "EMAIL=testmail@example.com");
-        Certificate c = new Certificate(u, Certificate.buildDN("EMAIL", "testmail@example.com"), "sha256", key1, CSRType.CSR, CertificateProfile.getById(1));
+        Certificate c = new Certificate(u, u, Certificate.buildDN("EMAIL", "testmail@example.com"), "sha256", key1, CSRType.CSR, CertificateProfile.getById(1));
         final PrivateKey pk = kp.getPrivate();
         final PrivateKey pk = kp.getPrivate();
-        c.issue(null, "2y").waitFor(60000);
+        c.issue(null, "2y", u).waitFor(60000);
         final X509Certificate ce = c.cert();
         HttpURLConnection connection = (HttpURLConnection) new URL("https://" + getServerName().replaceFirst("^www.", "api.") + "/account/certs/new").openConnection();
         authenticateClientCert(pk, ce, connection);
         final X509Certificate ce = c.cert();
         HttpURLConnection connection = (HttpURLConnection) new URL("https://" + getServerName().replaceFirst("^www.", "api.") + "/account/certs/new").openConnection();
         authenticateClientCert(pk, ce, connection);